Skip to content

Commit

Permalink
Improve error message by including the event type when the action fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
motlin committed Sep 29, 2024
1 parent 7b807ab commit aa19a42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aa19a42

Please sign in to comment.