Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-close old community metrics issue(s) (Lombiq Technologies: OCORE-175) #16207

Merged
merged 12 commits into from
Jun 6, 2024
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