Skip to content

Commit

Permalink
Auto-close old community metrics issue(s) (#16207)
Browse files Browse the repository at this point in the history
  • Loading branch information
Piedone authored Jun 6, 2024
1 parent 36098f7 commit 198c566
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/community_metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,20 @@ jobs:
shell: pwsh
run: |
Get-Content ./community_metrics.md >> $env:GITHUB_STEP_SUMMARY
- name: Close Previous Issue
shell: pwsh
run: |
# Without the --repo switch, the GH CLI will try to look it up from the current clone, which doesn't exist
# because we don't otherwise need checkout.
$issues = gh issue list --repo '${{ github.repository }}' --label 'community metrics' --state open --json number --jq '.[].number'
foreach ($issue in $issues)
{
gh issue close $issue --repo '${{ github.repository }}' --comment 'Closing this issue as newer community metrics are available.'
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Issue
# v5.0.0
uses: peter-evans/create-issue-from-file@24452a72d85239eacf1468b0f1982a9f3fec4c94
Expand Down

0 comments on commit 198c566

Please sign in to comment.