touchstone icon indicating copy to clipboard operation
touchstone copied to clipboard

Fix the PR number artifact when triggered from a comment.

Open plietar opened this issue 1 year ago • 1 comments
trafficstars

The receive action was storing github.event.number as an artefact for the comment action to use. However, this field is only set for pull request events. If the workflow is configured to trigger on a comment, the event type is now issue_comment as the field is absent.

There is an equivalent field at github.event.issue.number, but that field is absent for PR events. The easiest way to get the number in a uniform and consistent way is to use the PR metadata we already have at the start of the action.

plietar avatar May 16 '24 13:05 plietar

Thanks. @assignUser do you agree? I lack the competence to approve this PR.

lorenzwalthert avatar May 16 '24 14:05 lorenzwalthert

Thanks to both.

lorenzwalthert avatar May 17 '24 05:05 lorenzwalthert