Skip to content

juliangruber/find-pull-request-action

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

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

See action.yml for more details.

Related

License

MIT