Issues Close #146
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Issues Close' | |
on: | |
workflow_dispatch: | |
inputs: | |
job_id: | |
description: 'Job ID' | |
required: true | |
default: 'all' | |
schedule: | |
- cron: '5 5 */5 * *' | |
permissions: | |
issues: write | |
jobs: | |
# Handle Stale Threads - https://github.com/actions/stale | |
stale: | |
name: Flag or Close Issues | |
runs-on: ubuntu-24.04 | |
if: github.actor == 'dakanji' && (github.event_name == 'schedule' || github.event.inputs.job_id == 'all' || github.event.inputs.job_id == 'stale') | |
steps: | |
- name: Repository Checkout | |
uses: actions/checkout@v4 | |
- name: Handle Rate Limits | |
uses: ./.github/actions/handle-rate-limits | |
with: | |
token: ${{ secrets.PAT_TOKEN }} | |
- name: Handle Cancelled/Duplicate/Invalid/Wierd/Not-Planned Issues | |
uses: actions/stale@v9 | |
with: | |
ignore-updates: true | |
close-issue-reason: 'completed' | |
close-issue-message: '' | |
days-before-stale: 0 | |
days-before-close: 1 | |
exempt-assignees: 'dakanji' | |
stale-issue-label: 'Tagged' | |
any-of-labels: 'Cancelled, Duplicate, Known-Issue, Invalid, Cannot-Replicate, Not-Planned' | |
remove-issue-stale-when-updated: false | |
repo-token: ${{ secrets.PAT_TOKEN }} | |
- name: Handle Rate Limits | |
uses: ./.github/actions/handle-rate-limits | |
with: | |
token: ${{ secrets.PAT_TOKEN }} | |
- name: Handle Incomplete Issues | |
uses: actions/stale@v9 | |
with: | |
ignore-updates: false | |
close-issue-reason: 'completed' | |
stale-issue-message: |- | |
This item has been flagged for closure. | |
Trigger: Missing Required Information | |
close-issue-message: |- | |
This item is being closed. | |
Trigger: Missing Required Information | |
days-before-stale: 0 | |
days-before-close: 3 | |
exempt-assignees: 'dakanji' | |
stale-issue-label: 'Stale' | |
any-of-labels: 'Incomplete' | |
remove-issue-stale-when-updated: true | |
repo-token: ${{ secrets.PAT_TOKEN }} | |
- name: Handle Rate Limits | |
uses: ./.github/actions/handle-rate-limits | |
with: | |
token: ${{ secrets.PAT_TOKEN }} | |
- name: Handle No-Response Issues | |
uses: actions/stale@v9 | |
with: | |
ignore-updates: false | |
close-issue-reason: 'completed' | |
stale-issue-message: |- | |
This item has been flagged for closure. | |
Trigger: Failure to Respond | |
close-issue-message: |- | |
This item is being closed. | |
Trigger: Failure to Respond | |
days-before-stale: 2 | |
days-before-close: 3 | |
exempt-assignees: 'dakanji' | |
stale-issue-label: 'Stale' | |
any-of-labels: 'Queries' | |
remove-issue-stale-when-updated: true | |
repo-token: ${{ secrets.PAT_TOKEN }} | |
- name: Handle Rate Limits | |
uses: ./.github/actions/handle-rate-limits | |
with: | |
token: ${{ secrets.PAT_TOKEN }} | |
- name: Catchall Closer | |
uses: actions/stale@v9 | |
with: | |
ignore-updates: false | |
close-issue-reason: 'completed' | |
stale-issue-message: |- | |
This item has been flagged for closure. | |
Trigger: Inactivity Threshold | |
close-issue-message: |- | |
This item is being closed. | |
Trigger: Inactivity Threshold | |
days-before-stale: 30 | |
days-before-close: 30 | |
exempt-assignees: 'dakanji' | |
stale-issue-label: 'Stale' | |
remove-issue-stale-when-updated: true | |
repo-token: ${{ secrets.PAT_TOKEN }} |