Skip to content

Latest commit

 

History

History
92 lines (64 loc) · 2.99 KB

README.md

File metadata and controls

92 lines (64 loc) · 2.99 KB

GitHub license GitHub release tag * GitHub repository stargazers

Get Current PR Data

Supported event triggers:

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


Usage Examples

on:
  push:
  merge_group:
  issue_comment:
  workflow_dispatch:

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.


License