Skip to content

🔨 GitHub Action to close issues related to the merge of a pull request. Used by the Sensei team.

License

Notifications You must be signed in to change notification settings

Automattic/gha-mjolnir

 
 

Repository files navigation

Mjolnir

Release Build Status Docker

Sponsor

Close issues related to the merge of a pull request.

Useful:

  • to close multiple issues related to a pull request.
  • to close issues related to a pull request not based on the default branch (ex: master, main). For example, when a branch is related to version (e.g. v1.5, v2.0, ...)

Supported Syntax

  • prefixes (case insensitive): close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved
  • issues references separators (can be mixed): (space), , (period)
  • prefix and issues references can be separated by: (space), : (colon), or both.

Examples:

Fixes #1,#2,#3
close #1, #2, #3
fix #1 #2 #3
resolve #1,#2 #3
Resolves: #1,#2,#3
closed : #1, #2, #3

Usage

name: Close issues related to a merged pull request based on master branch.

on:
  pull_request:
    types: [closed]
    branches:
      - master

jobs:
  closeIssueOnPrMergeTrigger:

    runs-on: ubuntu-latest

    steps:
      - name: Closes issues related to a merged pull request.
        uses: ldez/[email protected]
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

About

🔨 GitHub Action to close issues related to the merge of a pull request. Used by the Sensei team.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Go 79.1%
  • Dockerfile 10.9%
  • Makefile 10.0%