mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
add issue handling logic
This commit is contained in:
parent
103950ac82
commit
acc47d83bf
31
.github/workflows/issue-handler.yml
vendored
Normal file
31
.github/workflows/issue-handler.yml
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
# cleans up our issues based on tags applied
|
||||
|
||||
name: issue
|
||||
run-name: "closing: ${{ github.event.issue.title }}"
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
|
||||
jobs:
|
||||
close-issue:
|
||||
permissions:
|
||||
issues: write
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.label.name == 'old-version' || github.event.label.name == 'gha-issue'
|
||||
steps:
|
||||
- name: Close reason
|
||||
id: close-reason
|
||||
run: |
|
||||
if test "${{ github.event.label.name }}" = "old-version"; then
|
||||
echo "reason=not_planned" >>$GITHUB_OUTPUT
|
||||
else
|
||||
echo "reason=completed" >>$GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Close issue
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: close-issue
|
||||
token: ${{ github.token }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
close-reason: ${{ steps.close-reason.outputs.reason }}
|
Loading…
Reference in a new issue