Skip to content

Commit

Permalink
feat(workflow): add stalesweeper (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Sep 20, 2024
1 parent 4f9f19e commit 3817180
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/DISCUSSION_TEMPLATE/actions.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "<Your question or feedback about our GitHub actions>"
labels: [actions]
labels: [Actions]
body:
- type: markdown
attributes:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/discussions-stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Close Stale Discussions

on:
schedule:
- cron: '00 11 * * *'
workflow_dispatch:
inputs:
dry-run:
description: 'Run the action without closing any discussions'
type: boolean

jobs:
close-stale-discussions:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
category:
- 'Actions'
- 'GSMS'
- 'Sunshine'
- 'Themerr'
steps:
- name: stalesweeper
uses: steffen-karlsson/stalesweeper@v1.1.1
with:
repo-token: ${{ secrets.GH_BOT_TOKEN }}
message: >
It seems this discussion hasn't had any activity in the past 90 days.
To help keep our backlog tidy, we'll be closing this discussion.
If it's still something you'd like addressed, please let us know by leaving a comment.
Thanks!
days-before-close: '90'
close-unanswered: 'true'
category: ${{ matrix.category }}
close-reason: 'OUTDATED'
# todo: dry-run default is true during testing
dry-run: ${{ github.event_name == 'schedule' && 'true' || github.event.inputs.dry-run }}

0 comments on commit 3817180

Please sign in to comment.