pantry/.github/workflows/issue-handler.yml

36 lines
941 B
YAML
Raw Normal View History

2023-08-13 05:53:09 +03:00
# cleans up our issues based on tags applied
name: issue
2023-08-19 02:10:37 +03:00
run-name: "handling #${{ github.event.issue.number }}: ${{ github.event.issue.title }}"
2023-08-13 05:53:09 +03:00
on:
issues:
types: [labeled]
jobs:
close-issue:
permissions:
issues: write
runs-on: ubuntu-latest
steps:
- name: Close reason
id: close-reason
run: |
2023-08-19 02:10:37 +03:00
case "${{ github.event.label.name }}" in
"old-version")
2023-08-13 05:53:09 +03:00
echo "reason=not_planned" >>$GITHUB_OUTPUT
2023-08-19 02:10:37 +03:00
;;
"gha-issue")
"404")
2023-08-13 05:53:09 +03:00
echo "reason=completed" >>$GITHUB_OUTPUT
2023-08-19 02:10:37 +03:00
;;
esac
2023-08-13 05:53:09 +03:00
- name: Close issue
uses: actions-cool/issues-helper@v3
2023-08-19 02:10:37 +03:00
if: steps.close-reason.outputs.reason != ''
2023-08-13 05:53:09 +03:00
with:
actions: close-issue
token: ${{ github.token }}
issue-number: ${{ github.event.issue.number }}
close-reason: ${{ steps.close-reason.outputs.reason }}