Skip to content

Get PR number for merge and queue events

License

Notifications You must be signed in to change notification settings

bcgov-nr/action-get-pr

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Issues Pull Requests MIT License Lifecycle

Get PR Number - Merges and Queues

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)

Usage

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

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 }}"