Skip to content

Get current PR data from any event trigger, including: issue_comment, merge_group, and push.

License

Notifications You must be signed in to change notification settings

OP5dev/Current-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

11 Commits
 
 
 
 
 
 
 
 
 
 

GitHub license GitHub release tag * GitHub repository stargazers

Get Current PR Data

Supported event triggers:

  • issue_comment
  • merge_group
  • push
  • pull_request (of course!)


Usage Examples

on:
  issue_comment:
  merge_group:
  push:

jobs:
  test:
    runs-on: ubuntu-latest

    permissions:
      pull-requests: read # Required to get PR data.

    steps:
      - id: pr
        uses: op5dev/current-pr@v1
      - run: |
          echo "PR number ${{ steps.pr.outputs.number }}"
          echo "PR branch ${{ steps.pr.outputs.branch }}"

Parameters

Inputs

Name Description
token Specify a GitHub token (not required).
Default: ${{ github.token }}.

Outputs

Name Description
branch Current PR branch.
number Current PR number.

Security

View security policy and reporting instructions.


Changelog

View all notable changes to this project in Keep a Changelog format, which adheres to Semantic Versioning.

Tip

All forms of contribution are very welcome and deeply appreciated for fostering open-source projects.


To-Do

  • Workflow event triggers like workflow_dispatch, and workflow_run (fork) will be added in upcoming releases.

License

About

Get current PR data from any event trigger, including: issue_comment, merge_group, and push.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  
  •