This action adds to Pull Request descriptions using markdown. It checks if the message is already present before adding.
add_markdown
: The message to add to pull requests, in markdown.
github_token
: ${{ secrets.GITHUB_TOKEN }} or a Personal Access Token (PAT). Default is to inherit a token from the calling workflow.
limit_to_pr_opened
: Only take action when PR status is opened or reopened. Default = false.
Repositories can have different permissions for their tokens. It can't hurt to explicitly provide rights. Read more here.
permissions:
pull-requests: write
Forks receive purposefully limited rights, preventing this action from running successfully. It is recommended to avoid that with a condition.
if: "!github.event.pull_request.head.repo.fork"
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
steps:
- uses: bcgov-nr/action-pr-description-add@main
with:
add_markdown: |
---
# Things!
## Excitement!
[Links!](https://google.ca)
`Code!`
name: "Add to Pull Request Description"
on:
pull_request:
jobs:
test:
name: PR Greeting
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: bcgov-nr/action-pr-description-add@main
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
limit_to_pr_opened: "true"
add_markdown: |
---
# Things!
## Excitement!
[Links!](https://google.ca)
`Code!`
_Italics_
*Bold*
* Bullets!
* and [more reading!](https://github.github.com/gfm/)
Please submit issues (bugs, feature requests) and take part in discussions at the links below.
BC Government QuickStart for OpenShift - Issues
BC Government QuickStart for OpenShift - Discussions
Contributions are always welcome! Please send us pull requests or get in touch at the links above.
This Action is provided courtesty of NRIDS Architecture and Forestry Digital Services, parts of the Government of British Columbia.