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

v0.0.2 Pre-release

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@v0.0.2

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

Choose a version

Tests 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

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: [opened]

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

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

Acknowledgements

This Action is provided courtesty of the Forestry Suite of Applications, part of the Government of British Columbia.