workflows
This commit is contained in:
parent
6382341715
commit
f6f0c9d225
2 changed files with 13 additions and 43 deletions
30
.github/workflows/test.yml
vendored
30
.github/workflows/test.yml
vendored
|
|
@ -1,30 +0,0 @@
|
|||
name: Close Fixed Issues
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
closeIssues:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Close Fixed Issues
|
||||
run: |
|
||||
issues=$(curl -s -H "Authorization: ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/TerraFirmaGreg-Team/Modpack-1.20.x/issues?state=open")
|
||||
|
||||
for issue in $(echo "${issues}" | jq -r '.[].number'); do
|
||||
labels=$(curl -s -H "Authorization: ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/TerraFirmaGreg-Team/Modpack-1.20.x/issues/${issue}/labels")
|
||||
|
||||
if echo "${labels}" | jq -e '.[].name | select(. == "2. Status: Fixed in Dev")' > /dev/null; then
|
||||
curl \
|
||||
-X PATCH \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-H "Authorization: ${{ secrets.GITHUB_TOKEN }}" \
|
||||
"https://api.github.com/repos/TerraFirmaGreg-Team/Modpack-1.20.x/issues/${issue}" \
|
||||
-d '{"state": "closed"}'
|
||||
fi
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue