pantry/.github/workflows/librarian.yml

35 lines
934 B
YAML
Raw Normal View History

2023-08-13 05:53:09 +03:00
# cleans up our issues based on tags applied
2023-12-13 13:42:25 +03:00
name: librarian
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
;;
2023-08-19 02:13:42 +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 }}