A GitHub Action for finding pull requests.
Find a file
Julian Gruber 952b3bb1dd
1.10.0
2025-07-19 14:17:55 +02:00
.github/workflows run ci on pull requests 2024-03-24 16:12:01 +01:00
dist 1.10.0 2025-07-19 14:17:55 +02:00
.gitignore chore: git should ignore files created by JetBrains IDEs (#12) 2020-09-04 22:13:53 +02:00
action.yml Adding PR author to outputs (#53) 2025-07-19 14:17:17 +02:00
index.js Adding PR author to outputs (#53) 2025-07-19 14:17:17 +02:00
package-lock.json 1.10.0 2025-07-19 14:17:55 +02:00
package.json 1.10.0 2025-07-19 14:17:55 +02:00
README.md Adding PR author to outputs (#53) 2025-07-19 14:17:17 +02:00

find-pull-request-action

A GitHub Action for finding pull requests.

Usage

steps:
  - name: Find Pull Request
    uses: juliangruber/find-pull-request-action@v1
    id: find-pull-request
    with:
      branch: my-branch-name
  - run: echo "Pull Request ${number} (${sha})"
    env:
      number: ${{ steps.find-pull-request.outputs.number }}
      sha: ${{ steps.find-pull-request.outputs.head-sha }}

Query pull requests based on these inputs:

  • branch
  • base
  • author
  • state
  • repo
  • sort
  • direction
  • labels

For the first matching pull request, these outputs will be set:

  • number
  • title
  • url
  • head-ref
  • head-sha
  • base-ref
  • base-sha
  • base-repo
  • state
  • author

See action.yml for more details.

License

MIT