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

GitHub Action

Close issues marked as fixed upon a release.

0.0.4 Pre-release

Close issues marked as fixed upon a release.

check-square

Close issues marked as fixed upon a release.

Close issues marked as fixed upon a release

Installation

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

              

- name: Close issues marked as fixed upon a release.

uses: gcampbell-msft/[email protected]

Learn more about this action in gcampbell-msft/fixed-pending-release

Choose a version

A GitHub Action that closes issues marked 'fixed-pending-release' upon a new release

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: Close issues marked 'fixed-pending-release' upon a release.
on:
  release:
    types: [published]

jobs:
  comment:
    runs-on: ubuntu-latest
    steps:
      - name: Close issues marked 'fixed-pending-release' upon a release.
        uses: gcampbell/fixed-pending-release TODO
        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.

Assumptions

There are a couple of assumptions that this GitHub Actions makes.

  1. The only releases that you want to use for this action, to close issues based on, are official releases.
  2. You use fixed-pending-release to label issues that are fixed pending an official release.
  3. The most recent release that you published is the release that fixes all issues marked fixed-pending-release.

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.

Example

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

🎉 This issue has now been fixed! The fix is is included in v1.0.0 🎉

License

This GitHub Action is licensed under the MIT License.