Skip to content

Issues Close

Issues Close #139

Workflow file for this run

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.event_name == 'schedule' || github.event.inputs.job_id == 'all' || github.event.inputs.job_id == 'stale'
steps:
- name: Check Rate Limit
id: rate-limit-check01
uses: ./.github/actions/check-rate-limit
with:
token: ${{ secrets.PAT_TOKEN }}
- name: Avoid Rate Limit
uses: ./.github/actions/avoid-rate-limit
with:
sleep_time: ${{ steps.rate-limit-check01.outputs.sleep_time }}
- 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: Check Rate Limit
id: rate-limit-check02
uses: ./.github/actions/check-rate-limit
with:
token: ${{ secrets.PAT_TOKEN }}
- name: Avoid Rate Limit
uses: ./.github/actions/avoid-rate-limit
with:
sleep_time: ${{ steps.rate-limit-check02.outputs.sleep_time }}
- 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: Check Rate Limit
id: rate-limit-check03
uses: ./.github/actions/check-rate-limit
with:
token: ${{ secrets.PAT_TOKEN }}
- name: Avoid Rate Limit
uses: ./.github/actions/avoid-rate-limit
with:
sleep_time: ${{ steps.rate-limit-check03.outputs.sleep_time }}
- 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: Check Rate Limit
id: rate-limit-check04
uses: ./.github/actions/check-rate-limit
with:
token: ${{ secrets.PAT_TOKEN }}
- name: Avoid Rate Limit
uses: ./.github/actions/avoid-rate-limit
with:
sleep_time: ${{ steps.rate-limit-check04.outputs.sleep_time }}
- 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 }}