Skip to content

Commit a2f8d72

Browse files
Merge pull request #8485 from jeffhandley/jeffhandley/locker-action
Migrate to the Locker GitHub action for locking closed/stale issues/PRs
2 parents 163589e + ddcd592 commit a2f8d72

File tree

2 files changed

+36
-106
lines changed

2 files changed

+36
-106
lines changed

.github/fabricbot.json

Lines changed: 0 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,112 +1371,6 @@
13711371
},
13721372
"disabled": true
13731373
},
1374-
{
1375-
"taskType": "scheduled",
1376-
"capabilityId": "ScheduledSearch",
1377-
"subCapability": "ScheduledSearch",
1378-
"version": "1.1",
1379-
"config": {
1380-
"frequency": [
1381-
{
1382-
"weekDay": 0,
1383-
"hours": [
1384-
1,
1385-
7,
1386-
13,
1387-
19
1388-
],
1389-
"timezoneOffset": 0
1390-
},
1391-
{
1392-
"weekDay": 1,
1393-
"hours": [
1394-
1,
1395-
7,
1396-
13,
1397-
19
1398-
],
1399-
"timezoneOffset": 0
1400-
},
1401-
{
1402-
"weekDay": 2,
1403-
"hours": [
1404-
1,
1405-
7,
1406-
13,
1407-
19
1408-
],
1409-
"timezoneOffset": 0
1410-
},
1411-
{
1412-
"weekDay": 3,
1413-
"hours": [
1414-
1,
1415-
7,
1416-
13,
1417-
19
1418-
],
1419-
"timezoneOffset": 0
1420-
},
1421-
{
1422-
"weekDay": 4,
1423-
"hours": [
1424-
1,
1425-
7,
1426-
13,
1427-
19
1428-
],
1429-
"timezoneOffset": 0
1430-
},
1431-
{
1432-
"weekDay": 5,
1433-
"hours": [
1434-
1,
1435-
7,
1436-
13,
1437-
19
1438-
],
1439-
"timezoneOffset": 0
1440-
},
1441-
{
1442-
"weekDay": 6,
1443-
"hours": [
1444-
1,
1445-
7,
1446-
13,
1447-
19
1448-
],
1449-
"timezoneOffset": 0
1450-
}
1451-
],
1452-
"searchTerms": [
1453-
{
1454-
"name": "isClosed",
1455-
"parameters": {}
1456-
},
1457-
{
1458-
"name": "noActivitySince",
1459-
"parameters": {
1460-
"days": 30
1461-
}
1462-
},
1463-
{
1464-
"name": "isUnlocked",
1465-
"parameters": {}
1466-
}
1467-
],
1468-
"actions": [
1469-
{
1470-
"name": "lockIssue",
1471-
"parameters": {
1472-
"reason": "resolved",
1473-
"label": "will_lock_this"
1474-
}
1475-
}
1476-
],
1477-
"taskName": "Lock stale issues and PRs"
1478-
}
1479-
},
14801374
{
14811375
"taskType": "trigger",
14821376
"capabilityId": "IssueResponder",

.github/workflows/locker.yml

Lines changed: 36 additions & 0 deletions
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)