Skip to content

Get PR Number

Actions
Get PR number for mergue queues and squash merges
v0.0.1
Latest
Star (3)

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 releases, merge queues and PR-backed merges can get tricky. This action makes that convenient in the following cases:

  • PR merge queues
  • Merged PR workflows
  • Release events (finds the most recently merged PR)
  • PRs themselves (just for consistency)

This process has been an integral part of PR-based workflows where images are promoted from development (PRs) to test/staging to production. It is also useful for release events where the most recent PR is tied to the release.

Usage

The build will return a PR number as output.

- id: vars
  uses: bcgov/[email protected]

- 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/[email protected]
  with:
    token: ${{ secrets.GITHUB_TOKEN }}

- name: Echo PR number
  run: echo "PR: ${{ steps.vars.outputs.pr }}"

Get PR Number is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Get PR number for mergue queues and squash merges
v0.0.1
Latest

Get PR Number is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.