You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+45-12Lines changed: 45 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,27 @@ The default configuration will:
8
8
- Close the stale issues and pull requests after 7 days of inactivity
9
9
- If an update/comment occur on stale issues or pull requests, the stale label will be removed and the timer will restart
10
10
11
+
## Recommended permissions
12
+
13
+
For the execution of this action, it must be able to fetch all issues and pull requests from your repository.
14
+
This can be achieved with the following [configuration in the action](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions) if the permissions are restricted:
15
+
16
+
```yaml
17
+
permissions:
18
+
issues: read
19
+
pull-requests: read
20
+
```
21
+
22
+
In addition, based on the provided configuration, the action could require more permission(s) (e.g.: add label, remove label, comment, close, etc.).
23
+
You can find more information about the required permissions under the corresponding options that you wish to use.
24
+
However, if don't want to bother, you can use these permissions:
25
+
26
+
```yaml
27
+
permissions:
28
+
issues: write
29
+
pull-requests: write
30
+
```
31
+
11
32
## All options
12
33
13
34
### List of input options
@@ -159,55 +180,63 @@ The message that will be added as a comment to the issues when the stale workflo
159
180
160
181
You can skip the comment sending by omitting the option or by passing an empty string.
161
182
162
-
Default value: unset
183
+
Default value: unset
184
+
Required Permission: `issues: write`
163
185
164
186
#### stale-pr-message
165
187
166
188
The message that will be added as a comment to the pull requests when the stale workflow marks it automatically as stale with a label.
167
189
168
190
You can skip the comment sending by omitting the option or by passing an empty string.
169
191
170
-
Default value: unset
192
+
Default value: unset
193
+
Required Permission: `pull-requests: write`
171
194
172
195
#### close-issue-message
173
196
174
197
The message that will be added as a comment to the issues when the stale workflow closes it automatically after being stale for too long.
175
198
176
-
Default value: unset
199
+
Default value: unset
200
+
Required Permission: `issues: write`
177
201
178
202
#### close-pr-message
179
203
180
204
The message that will be added as a comment to the pull requests when the stale workflow closes it automatically after being stale for too long.
181
205
182
-
Default value: unset
206
+
Default value: unset
207
+
Required Permission: `pull-requests: write`
183
208
184
209
#### stale-issue-label
185
210
186
211
The label that will be added to the issues when automatically marked as stale.
187
212
If you wish to speedup the stale workflow for the issues, you can add this label manually to mark as stale.
188
213
189
-
Default value: `Stale`
214
+
Default value: `Stale`
215
+
Required Permission: `issues: write`
190
216
191
217
#### close-issue-label
192
218
193
219
The label that will be added to the issues when closed automatically.
194
220
It will be automatically removed if the issues are no longer closed nor locked.
195
221
196
-
Default value: unset
222
+
Default value: unset
223
+
Required Permission: `issues: write`
197
224
198
225
#### stale-pr-label
199
226
200
227
The label that will be added to the pull requests when automatically marked as stale.
201
228
If you wish to speedup the stale workflow for the pull requests, you can add this label manually to mark as stale.
202
229
203
-
Default value: `Stale`
230
+
Default value: `Stale`
231
+
Required Permission: `pull-requests: write`
204
232
205
233
#### close-pr-label
206
234
207
235
The label that will be added to the pull requests when closed automatically.
208
236
It will be automatically removed if the pull requests are no longer closed nor locked.
209
237
210
-
Default value: unset
238
+
Default value: unset
239
+
Required Permission: `pull-requests: write`
211
240
212
241
#### exempt-issue-labels
213
242
@@ -298,13 +327,15 @@ Default value: `30`
298
327
299
328
Automatically remove the stale label when the issues or the pull requests are updated (based on [GitHub issue](https://docs.github.com/en/rest/reference/issues) field `updated_at`).
Override [remove-stale-when-updated](#remove-stale-when-updated) but only to automatically remove the stale label when the issues are updated (based on [GitHub issue](https://docs.github.com/en/rest/reference/issues) field `updated_at`).
306
336
307
-
Default value: unset
337
+
Default value: unset
338
+
Required Permission: `issues: write`
308
339
309
340
#### remove-pr-stale-when-updated
310
341
@@ -345,7 +376,8 @@ A comma delimited list of labels to remove when a stale issue or pull request re
345
376
346
377
Warning: each label results in a unique API call which can drastically consume the limit of [operations-per-run](#operations-per-run).
347
378
348
-
Default value: unset
379
+
Default value: unset
380
+
Required Permission: `pull-requests: write`
349
381
350
382
#### debug-only
351
383
@@ -380,7 +412,8 @@ Default value: unset
380
412
381
413
If set to `true`, the stale workflow will automatically delete the GitHub branches related to the pull requests automatically closed by the stale workflow.
0 commit comments