Skip to content

Commit 9fe222f

Browse files
authored
Reduce drequency of GitHub stale action, and add action write permissions
The action has been producing a warning of: > Error delete _state: [403] Resource not accessible by integration That error has been reported as [Error delete _state: [403] Resource not accessible by integration (actions/stale#1133)](actions/stale#1133 (comment)), and adding the `actions: write` permission should address it, allowing the action to write data for managing the cache and managing the action runs. Also, based on reviewing the runs so far, we have API rate limit room to increase the operations per run and reduce the run frequency. Reducing the frequency will reduce the noise this workflow puts into the https://github.com/dotnet/sdk/actions list.
1 parent 368240d commit 9fe222f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/stale.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 'Stale: Label and Close Issues'
22
on:
33
schedule:
4-
- cron: '19 * * * *' # Hourly at 19 minutes after the hour (random/uncommon time)
4+
- cron: '19 4,16 * * *' # Twice daily at 19 minutes after the hour (random/uncommon time)
55

66
workflow_dispatch:
77
# Manual triggering through the GitHub UI, API, or CLI
@@ -14,9 +14,10 @@ on:
1414
default: "30"
1515
operationsPerRun:
1616
required: true
17-
default: "500"
17+
default: "4000"
1818

1919
permissions:
20+
actions: write # For managing the operation state cache
2021
issues: write
2122

2223
jobs:
@@ -35,4 +36,4 @@ jobs:
3536
days-before-close: ${{ fromJson(inputs.daysBeforeClose || 30 ) }} # Default to 30 days if not specified as input
3637
days-before-pr-stale: -1 # Do not label PRs as 'stale'
3738
days-before-pr-close: -1 # Do not close PRs labeled as 'stale'
38-
operations-per-run: ${{ fromJson(inputs.operationsPerRun || 500 )}}
39+
operations-per-run: ${{ fromJson(inputs.operationsPerRun || 4000 )}}

0 commit comments

Comments
 (0)