GitHub Action
Get PR Number
v0.0.1
Latest version
PR numbers are easy to come by in PRs, but passing those same numbers to merge queues and PR-backed merges can get tricky. This action makes that convenient in the following cases:
- PR merge queues
- Merged PR workflows
- PRs themselves (just for consistency)
The build will return a PR number as output.
- id: vars
uses: bcgov-nr/action-get-pr@vX.Y.Z
- name: Echo PR number
run: echo "PR: ${{ steps.vars.outputs.pr }}"
Private repositories may need to provide a GitHub token.
- id: vars
uses: bcgov-nr/action-get-pr@vX.Y.Z
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Echo PR number
run: echo "PR: ${{ steps.vars.outputs.pr }}"