From bb86aa17b78d30cd631c367355ece9afab06cd69 Mon Sep 17 00:00:00 2001 From: Jeff Handley Date: Wed, 29 Nov 2023 16:25:45 -0800 Subject: [PATCH] Migrate to the 'locker' GitHub action for locking closed/stale issues/PRs --- .github/fabricbot.json | 107 ----------------------------------- .github/workflows/locker.yml | 36 ++++++++++++ 2 files changed, 36 insertions(+), 107 deletions(-) create mode 100644 .github/workflows/locker.yml diff --git a/.github/fabricbot.json b/.github/fabricbot.json index 2f752f7ae1..d62d1d1ab2 100644 --- a/.github/fabricbot.json +++ b/.github/fabricbot.json @@ -1466,112 +1466,5 @@ } ] } - }, - { - "taskSource": "fabricbot-config", - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Lock stale issues and PRs", - "actions": [ - { - "name": "lockIssue", - "parameters": { - "reason": "resolved", - "label": "will_lock_this" - } - } - ], - "frequency": [ - { - "weekDay": 0, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": 0 - }, - { - "weekDay": 1, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": 0 - }, - { - "weekDay": 2, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": 0 - }, - { - "weekDay": 3, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": 0 - }, - { - "weekDay": 4, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": 0 - }, - { - "weekDay": 5, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": 0 - }, - { - "weekDay": 6, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": 0 - } - ], - "searchTerms": [ - { - "name": "isClosed", - "parameters": {} - }, - { - "name": "noActivitySince", - "parameters": { - "days": 30 - } - }, - { - "name": "isUnlocked", - "parameters": {} - } - ] - } } ] \ No newline at end of file diff --git a/.github/workflows/locker.yml b/.github/workflows/locker.yml new file mode 100644 index 0000000000..f3e3b35fde --- /dev/null +++ b/.github/workflows/locker.yml @@ -0,0 +1,36 @@ +name: Locker - Lock stale issues and PRs +on: + schedule: + - cron: '0 9 * * *' # Once per day, early morning PT + + workflow_dispatch: + # Manual triggering through the GitHub UI, API, or CLI + inputs: + daysSinceClose: + required: true + default: "30" + daysSinceUpdate: + required: true + default: "30" + +permissions: + issues: write + pull-requests: write + +jobs: + main: + runs-on: ubuntu-latest + steps: + - name: Checkout Actions + uses: actions/checkout@v4 + with: + repository: "microsoft/vscode-github-triage-actions" + path: ./actions + ref: cd16cd2aad6ba2da74bb6c6f7293adddd579a90e + - name: Install Actions + run: npm install --production --prefix ./actions + - name: Run Locker + uses: ./actions/locker + with: + daysSinceClose: ${{ fromJson(inputs.daysSinceClose || 30) }} + daysSinceUpdate: ${{ fromJson(inputs.daysSinceUpdate || 30) }}