Skip to content

nflaig/release-comment-on-pr

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nflaig/release-comment-on-pr

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 🎉

Usage

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.

Inputs

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 and pullRequestNumber.

Outputs

This action does not have any outputs.

Example

Here's an example of what the comment looks like:

🎉 This PR is included in v1.0.0 🎉

License

This GitHub Action is licensed under the MIT License.

About

Comment on Pull Requests included in Release

Resources

License

Stars

Watchers

Forks

Packages

No packages published