mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 16:35:07 +03:00
generalize handling
This commit is contained in:
parent
d175265410
commit
5b1521d102
1 changed files with 9 additions and 5 deletions
14
.github/workflows/issue-handler.yml
vendored
14
.github/workflows/issue-handler.yml
vendored
|
@ -1,7 +1,7 @@
|
||||||
# cleans up our issues based on tags applied
|
# cleans up our issues based on tags applied
|
||||||
|
|
||||||
name: issue
|
name: issue
|
||||||
run-name: "closing: ${{ github.event.issue.title }}"
|
run-name: "handling #${{ github.event.issue.number }}: ${{ github.event.issue.title }}"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
|
@ -12,18 +12,22 @@ jobs:
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
issues: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event.label.name == 'old-version' || github.event.label.name == 'gha-issue'
|
|
||||||
steps:
|
steps:
|
||||||
- name: Close reason
|
- name: Close reason
|
||||||
id: close-reason
|
id: close-reason
|
||||||
run: |
|
run: |
|
||||||
if test "${{ github.event.label.name }}" = "old-version"; then
|
case "${{ github.event.label.name }}" in
|
||||||
|
"old-version")
|
||||||
echo "reason=not_planned" >>$GITHUB_OUTPUT
|
echo "reason=not_planned" >>$GITHUB_OUTPUT
|
||||||
else
|
;;
|
||||||
|
"gha-issue")
|
||||||
|
"404")
|
||||||
echo "reason=completed" >>$GITHUB_OUTPUT
|
echo "reason=completed" >>$GITHUB_OUTPUT
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
- name: Close issue
|
- name: Close issue
|
||||||
uses: actions-cool/issues-helper@v3
|
uses: actions-cool/issues-helper@v3
|
||||||
|
if: steps.close-reason.outputs.reason != ''
|
||||||
with:
|
with:
|
||||||
actions: close-issue
|
actions: close-issue
|
||||||
token: ${{ github.token }}
|
token: ${{ github.token }}
|
||||||
|
|
Loading…
Reference in a new issue