thollander / actions-comment-pull-request

GitHub action to comment pull request
MIT License
327 stars 89 forks source link

Improvement: Automatically check to see if a PR actually triggered the action #380

Open tanner-equi opened 6 months ago

tanner-equi commented 6 months ago

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.

pfeerick commented 5 months ago

You can do tests such as if: github.event_name != 'pull_request' to run steps conditionally.

tanner-equi commented 5 months ago

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

thollander commented 1 month ago

AFAIK, you can't provide this kind of condition in the action itself