Improvement: Automatically check to see if a PR actually triggered the action
Maybe GitHub Actions automatically support this and so this is redundant, but it is common to have actions that have multiple triggers. Since this one inherently requires a PR trigger, it would be nice to cleanly exit when that's not the current type.
You can do tests such as if: github.event_name != 'pull_request' to run steps conditionally.
- https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
- https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
You can do tests such as
if: github.event_name != 'pull_request'to run steps conditionally.
That's how I have it set up. My point is that consumers shouldn't need to do that because this action is exclusively for commenting on PRs
AFAIK, you can't provide this kind of condition in the action itself