From aa19a42293b064c272eba92725f74d81fa242a65 Mon Sep 17 00:00:00 2001 From: "Craig P. Motlin" Date: Sun, 29 Sep 2024 14:03:09 -0400 Subject: [PATCH] Improve error message by including the event type when the action fails. --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index ce2f672..4e51e9c 100644 --- a/action.yml +++ b/action.yml @@ -25,8 +25,8 @@ runs: if: ${{ github.event_name != 'pull_request' }} shell: bash run: | - echo "::warning::This action is intended to be used in pull_request events only. See: https://github.com/motlin/forbid-merge-commits-action#how-to-add-this-action-to-your-repository." - echo "## This action is intended to be used in pull_request events only." >> $GITHUB_STEP_SUMMARY + echo "::warning::This action is intended to be used in pull_request events only. The event type was '${{ github.event_name }}'. See: https://github.com/motlin/forbid-merge-commits-action#how-to-add-this-action-to-your-repository." + echo "## This action is intended to be used in pull_request events only. The event type was '${{ github.event_name }}'." >> $GITHUB_STEP_SUMMARY echo "See: [How to add this action to your repository](https://github.com/motlin/forbid-merge-commits-action#how-to-add-this-action-to-your-repository)." >> $GITHUB_STEP_SUMMARY exit 1