Closed Milestones #70
This file contains 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: Closed Milestones | |
on: | |
milestone: | |
types: [closed] | |
permissions: | |
issues: write | |
pull-requests: write | |
jobs: | |
comment-on-closed-milestone: | |
runs-on: ubuntu-latest | |
outputs: | |
ids: ${{ steps.milestone-comment.outputs.ids }} | |
steps: | |
- id: milestone-comment | |
uses: bflad/action-milestone-comment@v2 | |
with: | |
body: | | |
This functionality has been released in [${{ github.event.milestone.title }}](https://github.com/${{ github.repository }}/releases/tag/${{ github.event.milestone.title }}). | |
For further feature requests or bug reports with this functionality, please create a [new GitHub issue](https://github.com/${{ github.repository }}/issues/new/choose) following the template. Thank you! | |
lock-closed-issues: | |
runs-on: ubuntu-latest | |
needs: comment-on-closed-milestone | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
IFS=',' read -r -a issues <<< "$ISSUES" | |
for element in "${issues[@]}" | |
do | |
echo "Locking $element" | |
echo "no" | gh pr lock -r resolved $element || true | |
echo "no" | gh issue lock -r resolved $element || true | |
done | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ISSUES: ${{ needs.comment-on-closed-milestone.outputs.ids }} |