Skip to content

Commit

Permalink
Create close-open-issues.ym
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaGriffiths11 authored Sep 9, 2024
1 parent 9a67da8 commit deee95c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/close-open-issues.ym
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Close Open Issues

on:
workflow_dispatch:

jobs:
close_issues:
runs-on: ubuntu-latest
steps:
- name: Close all open issues
env:
GITHUB_TOKEN: ${{ secrets.issue }}
run: |
curl -s -H "Authorization: token $GITHUB_TOKEN" \
"https://api.github.com/repos/gittogethers/selector-rifa/issues?state=open" \
| jq -r '.[].number' \
| xargs -I {} curl -s -X PATCH \
-H "Authorization: token $GITHUB_TOKEN" \
-d '{"state": "closed"}' \
"https://api.github.com/repos/gittogethers/selector-rifa/issues/{}"

0 comments on commit deee95c

Please sign in to comment.