Skip to content

Commit

Permalink
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 (aws#585)
  • Loading branch information
mndeveci authored Dec 11, 2023
1 parent 95c5502 commit 36edc7e
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 36edc7e

Please sign in to comment.