Given the current commit, determine the PR number associated with it. Handles the case when there is no such PR.
This is expected to be used on a push or pull_request trigger.
Example:
- uses: UoMResearchIT/actions/get-pr-id@get-pr-id
id: pr
- run: echo PR=$PR
env:
PR: ${{ steps.pr.outputs.pr }}None
-
prThe PR number, or an empty string if the current event doesn't have a commit SHA that corresponds to a pull request.
Requires: pull-requests: read.