Update test.yml

This commit is contained in:
Xikaro 2024-01-12 08:05:35 +05:00
parent e7b98b256c
commit 829c7d6489

View file

@ -3,6 +3,8 @@ run-name: "Test #${{ github.run_number }}"
on: on:
push: push:
branches:
- main
# push: # push:
# tags: # tags:
# - "test" # - "test"
@ -60,10 +62,18 @@ jobs:
uses: actions/checkout@v4.1.1 uses: actions/checkout@v4.1.1
- name: Сlose fixed in dev - name: Сlose fixed in dev
uses: lowply/auto-closer@v0.0.6 run: |
env: issues=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/issues?state=open")
AC_LABEL: "2. Status: Fixed in Dev"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 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: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/issues/${issue}" \
-d '{"state": "closed"}'
fi
done