v1.4.2.1 #28
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Close Issues on Release | |
| on: | |
| release: | |
| jobs: | |
| close-issues: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| steps: | |
| - name: Close issues with 'fixed-pending-release' label | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # Find all open issues with the specific label | |
| issues=$(gh issue list --repo ${{ github.repository }} --label "fixed-pending-release" --state open --json number --jq '.[].number') | |
| if [ -z "$issues" ]; then | |
| echo "No open issues with 'fixed-pending-release' label found." | |
| exit 0 | |
| fi | |
| for issue in $issues; do | |
| echo "Closing issue #$issue..." | |
| gh issue close "$issue" --repo ${{ github.repository }} --comment "Closed by release ${{ github.event.release.tag_name }}" | |
| done | |
| echo "✓ Closed all matching issues" |