Skip to content

Commit cdff2b2

Browse files
authored
[.github] Lock closed issues and PRs after 30 days of inactivity. (#1213)
Context: dotnet/android#8655 Context: dotnet/maui#19145 Copy GitHub action script from `xamarin-android` that locks comments on closed issues/PRs after 30 days of inactivity. This rule is useful because comments on old, closed issues rarely will be seen or responded to, making us seem unresponsive to users.
1 parent 3ea9a7c commit cdff2b2

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/locker.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Locker - Lock stale issues and PRs
2+
on:
3+
schedule:
4+
- cron: '0 9 * * *' # Once per day, early morning PT
5+
6+
workflow_dispatch:
7+
# Manual triggering through the GitHub UI, API, or CLI
8+
inputs:
9+
daysSinceClose:
10+
required: true
11+
default: "30"
12+
daysSinceUpdate:
13+
required: true
14+
default: "30"
15+
16+
permissions:
17+
issues: write
18+
pull-requests: write
19+
20+
jobs:
21+
main:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout Actions
25+
uses: actions/checkout@v4
26+
with:
27+
repository: "microsoft/vscode-github-triage-actions"
28+
path: ./actions
29+
ref: cd16cd2aad6ba2da74bb6c6f7293adddd579a90e # locker action commit sha
30+
- name: Install Actions
31+
run: npm install --production --prefix ./actions
32+
- name: Run Locker
33+
uses: ./actions/locker
34+
with:
35+
daysSinceClose: ${{ fromJson(inputs.daysSinceClose || 30) }}
36+
daysSinceUpdate: ${{ fromJson(inputs.daysSinceUpdate || 30) }}

0 commit comments

Comments
 (0)