super-productivity/.github/workflows/stale-discussions.yml
Corey Newton cbc6cbaa73
Housekeeping for various docs, templates, and actions (#7451)
* chore: change Claude doc directives

Ensure docs are not only aimed at end users but also that they aren't
too myopic. DeepWiki can provide limitless detail on any topic.

* chore(ci): switch stalesweeper to a hash reference

* chore(ci): decrease frequency of discussion pruning

* chore(ci): fix "unanswered" logic for stale discussions

Close answered Q&A after 90 days as RESOLVED.
Close everything else after 180 days as OUTDATED.

* chore: clean up issue templates wrt docs

Also, invert the expected-observed order for bug report.
2026-05-02 13:58:25 +02:00

59 lines
2.3 KiB
YAML

---
name: Close Stale Discussions
'on':
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:
inputs:
days-before-close:
description: 'days-before-close: number of days of inactivity before closing a discussion'
required: false
default: '0'
type: string
dry-run:
description: 'dry-run: when checked, no discussions will be closed'
default: true
type: boolean
permissions:
discussions: write
jobs:
close-stale-discussions:
runs-on: ubuntu-latest
steps:
- name: stalesweeper
uses: zenoprax/stalesweeper@c9c72ef0504f835bf9bf8ed7319d3bc149539291 # v1.1.2
env:
DAYS_BEFORE_CLOSE: ${{ github.event_name == 'schedule' && '180' || github.event.inputs.days-before-close }}
DRY_RUN: ${{ github.event_name == 'schedule' && 'false' || github.event.inputs.dry-run }}
with:
categories: ''
close-reason: 'OUTDATED'
close-unanswered: 'true'
days-before-close: '${{ env.DAYS_BEFORE_CLOSE}}'
dry-run: ${{ env.DRY_RUN }}
exempt-labels: 'documentation gap'
message: >-
This discussion was automatically closed because it has been inactive for ${{ env.DAYS_BEFORE_CLOSE}} days without an accepted answer.
If the topic is still relevant, please feel free to reopen the discussion and add some more context or detail.
close-stale-answers:
runs-on: ubuntu-latest
steps:
- name: stalesweeper
uses: zenoprax/stalesweeper@c9c72ef0504f835bf9bf8ed7319d3bc149539291 # v1.1.2
env:
DAYS_BEFORE_CLOSE: ${{ github.event_name == 'schedule' && '90' || github.event.inputs.days-before-close }}
DRY_RUN: ${{ github.event_name == 'schedule' && 'false' || github.event.inputs.dry-run }}
with:
categories: 'Q&A'
close-reason: 'RESOLVED'
close-unanswered: 'false'
days-before-close: '${{ env.DAYS_BEFORE_CLOSE}}'
dry-run: ${{ env.DRY_RUN }}
exempt-labels: 'documentation gap'
message: >-
This discussion was automatically closed because it was answered but has had no further activity in ${{ env.DAYS_BEFORE_CLOSE}} days.
If the topic is still relevant, please feel free to reopen the discussion and add some more context or detail.