Repository navigation
242 lines (206 loc) · 8.37 KB
/
Copy paththreads_lock.yml
File metadata and controls
242 lines (206 loc) · 8.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
name: 'Threads Lock'
on:
workflow_dispatch:
inputs:
job_type:
description: 'Type to Lock'
type: choice
required: true
default: 'lock-any'
options:
- 'lock-any'
- 'lock-issues'
- 'lock-discussions'
- 'lock-pull-requests'
schedule:
- cron: '15 15 */3 * *'
permissions:
issues: write
discussions: write
pull-requests: write
concurrency:
group: lock
# Lock Threads - https://github.com/dessant/lock-threads
jobs:
lock-threads-01:
name: Lock Issue Threads
runs-on: ubuntu-latest
if: |
github.repository == 'RefindPlusRepo/RefindPlus' && (
github.event_name == 'schedule' ||
github.event.inputs.job_type == 'lock-any' ||
github.event.inputs.job_type == 'lock-issues'
)
steps:
- id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Repository Checkout
uses: actions/checkout@v6
- name: Handle Issue Rate Limits_01
uses: ./.github/actions/handle-rate-limits
with:
token: ${{ steps.app-token.outputs.token }}
- name: Handle Issue Thread Lock_01
uses: dessant/lock-threads@v6
with:
github-token: ${{ steps.app-token.outputs.token }}
issue-lock-reason: ''
issue-inactive-days: '1'
include-any-issue-labels: 'Resolved'
exclude-any-issue-labels: 'Stale'
remove-issue-labels: 'Triage, No-Log, Tagged, Queries, Unresolved, Uncertain, Accepted'
issue-comment: |-
This thread is being locked.
Please use the [Discussions Feature](https://github.com/RefindPlusRepo/RefindPlus/discussions?discussions_q=sort%3Adate_created) for follow-on discussion or raise a new issue if appropriate.
process-only: 'issues'
- name: Handle Issue Rate Limits_02
uses: ./.github/actions/handle-rate-limits
with:
token: ${{ steps.app-token.outputs.token }}
- name: Handle Issue Thread Lock_02
uses: dessant/lock-threads@v6
with:
github-token: ${{ steps.app-token.outputs.token }}
issue-lock-reason: ''
issue-inactive-days: '2'
include-any-issue-labels: 'Invalid, Not-Planned, Duplicate, Cannot-Replicate, Cancelled, Config'
exclude-any-issue-labels: 'Stale'
remove-issue-labels: 'Tagged, Queries, Unresolved, Uncertain, Accepted'
issue-comment: |-
This thread is being locked.
Please use the [Discussions Feature](https://github.com/RefindPlusRepo/RefindPlus/discussions?discussions_q=sort%3Adate_created) for follow-on discussion or raise a new issue if appropriate.
process-only: 'issues'
- name: Handle Issue Rate Limits_03
uses: ./.github/actions/handle-rate-limits
with:
token: ${{ steps.app-token.outputs.token }}
- name: Handle Issue Thread Lock_03
uses: dessant/lock-threads@v6
with:
github-token: ${{ steps.app-token.outputs.token }}
issue-lock-reason: ''
add-issue-labels: 'Abandoned'
issue-inactive-days: '4'
include-any-issue-labels: 'Stale'
remove-issue-labels: 'Stale, Tagged, Queries, Uncertain, Accepted'
issue-comment: |-
This item is being locked.
Trigger: Apparent Abandonment.
process-only: 'issues'
- name: Handle Issue Rate Limits_04
uses: ./.github/actions/handle-rate-limits
with:
token: ${{ steps.app-token.outputs.token }}
- name: Handle Issue Thread Lock_04
uses: dessant/lock-threads@v6
with:
github-token: ${{ steps.app-token.outputs.token }}
issue-lock-reason: ''
issue-inactive-days: '7'
include-any-issue-labels: 'Unclear, Noted'
exclude-any-issue-labels: 'Stale'
remove-issue-labels: 'Tagged, Queries, Uncertain, Accepted'
issue-comment: |-
This thread is being locked.
Please use the [Discussions Feature](https://github.com/RefindPlusRepo/RefindPlus/discussions?discussions_q=sort%3Adate_created) for follow-on discussion or raise a new issue if appropriate.
process-only: 'issues'
- name: Handle Issue Rate Limits_05
uses: ./.github/actions/handle-rate-limits
with:
token: ${{ steps.app-token.outputs.token }}
- name: Handle Issue Thread Lock_05
uses: dessant/lock-threads@v6
with:
github-token: ${{ steps.app-token.outputs.token }}
issue-lock-reason: ''
add-issue-labels: 'Resolved'
issue-inactive-days: '4'
include-any-issue-labels: ''
exclude-any-issue-labels: 'Stale, Incomplete, Queries, Triage, Unclear, Parked, Prorogued, Help-Wanted, Confirmed, Known-Issue'
remove-issue-labels: 'Tagged, Queries, Unresolved, Uncertain, Accepted'
issue-comment: |-
This thread is being locked.
Please use the [Discussions Feature](https://github.com/RefindPlusRepo/RefindPlus/discussions?discussions_q=sort%3Adate_created) for follow-on discussion or raise a new issue if appropriate.
process-only: 'issues'
- name: Handle Issue Rate Limits_06
uses: ./.github/actions/handle-rate-limits
with:
token: ${{ steps.app-token.outputs.token }}
- name: Handle Issue Thread Lock_06
uses: dessant/lock-threads@v6
with:
github-token: ${{ steps.app-token.outputs.token }}
issue-lock-reason: ''
add-issue-labels: ''
issue-inactive-days: '45'
include-any-issue-labels: 'Confirmed, Known-Issue'
remove-issue-labels: 'Stale, Tagged, Queries, Uncertain, Accepted'
issue-comment: |-
This thread is being locked.
Please use the [Discussions Feature](https://github.com/RefindPlusRepo/RefindPlus/discussions?discussions_q=sort%3Adate_created) for follow-on discussion or raise a new issue if appropriate.
process-only: 'issues'
lock-threads-02:
name: Lock PR Threads
runs-on: ubuntu-latest
if: |
github.repository == 'RefindPlusRepo/RefindPlus' && (
github.event_name == 'schedule' ||
github.event.inputs.job_type == 'lock-any' ||
github.event.inputs.job_type == 'lock-pull-requests'
)
steps:
- id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Repository Checkout
uses: actions/checkout@v6
- name: Handle PR Rate Limits_01
uses: ./.github/actions/handle-rate-limits
with:
token: ${{ steps.app-token.outputs.token }}
- name: Handle PR Thread Lock_01
uses: dessant/lock-threads@v6
with:
github-token: ${{ steps.app-token.outputs.token }}
pr-lock-reason: 'resolved'
add-pr-labels: ''
pr-inactive-days: '2'
include-any-pr-labels: 'Accepted, Declined'
remove-pr-labels: ''
pr-comment: ''
process-only: 'prs'
lock-threads-03:
name: Lock Discussion Threads
runs-on: ubuntu-latest
if: |
github.repository == 'RefindPlusRepo/RefindPlus' && (
github.event_name == 'schedule' ||
github.event.inputs.job_type == 'lock-any' ||
github.event.inputs.job_type == 'lock-discussions'
)
steps:
- id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Repository Checkout
uses: actions/checkout@v6
- name: Handle Discussion Rate Limits_01
uses: ./.github/actions/handle-rate-limits
with:
token: ${{ steps.app-token.outputs.token }}
- name: Handle Discussion Thread Lock_01
uses: dessant/lock-threads@v6
with:
github-token: ${{ steps.app-token.outputs.token }}
discussion-inactive-days: '120'
exclude-discussion-created-before: '2026-07-01T00:00:00Z'
include-any-discussion-labels: ''
exclude-any-discussion-labels: ''
process-only: 'discussions'