actions-comment-pull-request icon indicating copy to clipboard operation
actions-comment-pull-request copied to clipboard

Get `pr_number` when triggered by `issue_comment`

Open ftzi opened this issue 2 years ago • 0 comments

I am using https://github.com/Khan/pull-request-comment-trigger with just on: issue_comment: types: [created] to trigger the Action when I write my command on the PR as a comment. I don't use pull_request: types: [opened] as I don't want it to mess up every PR with those checks.

However, I had this error:

image

I fixed it by adding this, as this guy said: https://github.com/actions/checkout/issues/331#issuecomment-1120113003 pr_number: ${{ github.event.issue.number }}

So, I think this action should try to get this var if the current one isn't available to handle the issue_comment event.

ftzi avatar Nov 17 '22 19:11 ftzi