Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
plus

GitHub Action

Add to PR Descriptions

v1.0.1

Add to PR Descriptions

plus

Add to PR Descriptions

Add to pull request descriptions using markdown

Installation

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

              

- name: Add to PR Descriptions

uses: bcgov-nr/action-pr-description-add@v1.0.1

Learn more about this action in bcgov-nr/action-pr-description-add

Choose a version

Build-Test Check dist/ CodeQL Contributors Forks Stargazers Issues MIT License Lifecycle

Add to Pull Request Descriptions

This action adds to Pull Request descriptions using markdown. It checks if the message is already present before adding.

Input

add_markdown: The message to add to pull requests

github_token: Usually ${{ secrets.GITHUB_TOKEN }}, but a personal access token can also be used

limit_to_pr_opened: Only take action when PR status is opened or reopened (default=false)

Permissions

Pull requests from forks have reduced job running rights. Provide your GITHUB_TOKEN with explicit permissions to change that. Read more here.

    permissions:
      pull-requests: write

Example

Create or modify a GitHub workflow, like below. E.g. ./github/workflows/pr-append.yml

name: "Add to Pull Request Description"
on:
  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write
    steps:
      - uses: bcgov-nr/action-pr-description-add@v0.0.2
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          add_markdown: |
            ---

            # Things!
            ## Excitement!
            [Links!](https://google.ca)
            `Code!`