Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: auto close issues with stage/waiting-for-release tag when a ne…
Browse files Browse the repository at this point in the history
…w release is completed
mndeveci authored Dec 4, 2023

Verified

This commit was signed with the committer’s verified signature.
gorhill Raymond Hill
1 parent 8bc62be commit 39046ab
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/close-issue-on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Close issues on release cut

on:
release:
types: [released]

jobs:
run-workflow:
permissions:
issues: write
runs-on: ubuntu-latest
steps:
- name: Close issues marked
env:
REPO : ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
release_url=$(gh release view ${{ github.ref_name }} --repo $REPO --json url --jq ".url")
for issue_number in $(gh issue list -l "stage/waiting-for-release" --repo $REPO --json number --jq ".[].number"); do
gh issue close $issue_number -c "Patch is released in [${{ github.ref_name }}]($release_url). If you are AWS SAM CLI user, please wait for next AWS SAM CLI release. Closing" -r completed --repo $REPO
done

0 comments on commit 39046ab

Please sign in to comment.