Skip to content

Commit a3caac9

Browse files
authored
ci: allow approved no-milestone issue closures (#441)
1 parent da5fe53 commit a3caac9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/require-milestone-on-close.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
enforce-milestone:
9-
if: github.event.issue.state_reason == 'completed' && github.event.issue.milestone == null
9+
if: github.event.issue.state_reason == 'completed' && github.event.issue.milestone == null && !contains(toJson(github.event.issue.labels), '\"name\":\"no-milestone-close-ok\"')
1010
runs-on: ubuntu-latest
1111
permissions:
1212
issues: write
@@ -18,4 +18,4 @@ jobs:
1818
REPO: ${{ github.repository }}
1919
run: |
2020
gh issue reopen "$ISSUE_NUMBER" --repo "$REPO"
21-
gh issue comment "$ISSUE_NUMBER" --repo "$REPO" --body "⚠️ Issues closed as completed must have a milestone assigned. Please assign a milestone before closing."
21+
gh issue comment "$ISSUE_NUMBER" --repo "$REPO" --body "⚠️ Issues closed as completed must have a milestone assigned. Please assign a milestone before closing, or add label \`no-milestone-close-ok\` for an approved exception."

0 commit comments

Comments
 (0)