Skip to content

Get Current PR Data

Actions
Get current PR data from any event trigger
v1.0.1
Latest
Star (2)

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

Get Current PR Data 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 current PR data from any event trigger
v1.0.1
Latest

Get Current PR Data 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.