This GitHub Action adds a comment to all pull requests that were included in a GitHub release. The comment includes a link to the release, along with a celebratory emoji 🎉
To use this action, you will need to provide your personal access token with public_repo
permission.
name: Comment on Pull Requests included in Release
on:
release:
types: [published]
jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Comment on Pull Requests
uses: nflaig/release-comment-on-pr@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
message: ":tada: This PR is included in [${releaseTag}](${releaseUrl}) :tada:"
Note that this action is triggered by the release.published
event, which occurs when a new release is published in your repository.
Important: It is required that included PRs are referenced in the release notes, see example.
This action has the following inputs:
token
(required): Your GitHub access token. You can use${{ secrets.ACCESS_TOKEN }}
to access the value you set as actions repository secret.message
(optional): The message to be included in the comment. This is passed to the action as a lodash template string. Available variables include:releaseName
,releaseTag
,releaseUrl
,pullRequestTitle
,pullRequestUrl
andpullRequestNumber
.
This action does not have any outputs.
Here's an example of what the comment looks like:
🎉 This PR is included in v1.0.0 🎉
This GitHub Action is licensed under the MIT License.