Skip to content

Feature Request: Helpful details for building bots for PR-related actions #26109

Answered by chrispat
freakboy3742 asked this question in Actions
Discussion options

You must be logged in to vote

@freakboy3742 

One of the things GitHub Actions provides is the full payload for the event that triggered the workflow run and you can access that payload using the ${{ }} syntax.  As mentioned in the context document you can access the event payload through the github context.  You can navigate into the contents of the JSON object from the event payload by simply accessing the property.

The pull_request event: https://developer.github.com/v3/activity/events/types/#pullrequestevent

For example, to get the pull request number you would use ${{ github.event.number }}.  To get the head sha you would use ${{ github.event.pull_request.head.sha }}

As for different users for different workflows …

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants