Skip to content
check

GitHub Action

PR number

1.0.7 Latest version

PR number

check

PR number

Replaces [#PR] with an actual PR number in a description body

Installation

Copy and paste the following snippet into your .yml file.

              

- name: PR number

uses: matyas-igor/pr-number-action@1.0.7

Learn more about this action in matyas-igor/pr-number-action

Choose a version

Replaces [#PR] with an actual number in a pull request description

This action looks at the description of a pull-request and replaces [#PR] with an actual number.

Inputs

github-token

Required ${{ secrets.GITHUB_TOKEN }}

pattern

Pattern to use for ID replacement.

Optional [#PR]

Usage

Inside .github/PULL_REQUEST_TEMPLATE.md:

Preview: https://deploy-preview-[#PR]--some-app.netlify.app

And inside .github/workflows/PR.yml:

name: Update PR number
on: [pull_request]

jobs:
  update:
    name: Update PR number
    runs-on: ubuntu-latest
    steps:
    - uses: matyas-igor/pr-number-action@v1
      with:
        github-token: "${{ secrets.GITHUB_TOKEN }}"
        # pattern: "[#PR]"