Skip to content

Commit ade1f03

Browse files
ci(discussions-stale): add days-before-close input option
1 parent 80a2a3d commit ade1f03

1 file changed

Lines changed: 9 additions & 13 deletions

File tree

.github/workflows/discussions-stale.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,27 @@ on:
77
- cron: '00 11 * * *'
88
workflow_dispatch:
99
inputs:
10+
days-before-close:
11+
description: 'days-before-close: number of days of inactivity before closing a discussion'
12+
required: false
13+
default: '365'
14+
type: string
1015
dry-run:
1116
description: 'dry-run: when checked, no discussions will be closed'
1217
type: boolean
1318

1419
jobs:
1520
close-stale-discussions:
1621
runs-on: ubuntu-latest
17-
strategy:
18-
fail-fast: false
19-
matrix:
20-
category:
21-
- 'Actions'
22-
- 'GSMS'
23-
- 'Libraries'
24-
- 'Sunshine'
25-
- 'Themerr'
26-
max-parallel: 1 # run one at a time to attempt to avoid GitHub api rate limits
2722
steps:
2823
- name: stalesweeper
29-
uses: thenick775/stalesweeper@eeb7723f2e609a0380ff8ca7813580944dd193a6 # repo does not have releases
24+
# uses: thenick775/stalesweeper@eeb7723f2e609a0380ff8ca7813580944dd193a6 # repo does not have releases
25+
uses: thenick775/stalesweeper@collapsible-discussion-sumary-with-links
3026
env:
31-
DAYS_BEFORE_CLOSE: '365'
27+
DAYS_BEFORE_CLOSE: ${{ github.event_name == 'schedule' && '365' || github.event.inputs.days-before-close }}
3228
DRY_RUN: ${{ github.event_name == 'schedule' && 'false' || github.event.inputs.dry-run }}
3329
with:
34-
category: ${{ matrix.category }}
30+
categories: 'Actions,GSMS,Libraries,Sunshine,Themerr'
3531
close-reason: 'OUTDATED'
3632
close-unanswered: 'true'
3733
days-before-close: '${{ env.DAYS_BEFORE_CLOSE}}'

0 commit comments

Comments
 (0)