mirror of
https://github.com/anthropics/claude-code.git
synced 2026-04-20 10:52:41 +00:00
Compare commits
1 Commits
boris/rmbx
...
ashwin/upd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ead501a4a9 |
9
.github/workflows/lock-closed-issues.yml
vendored
9
.github/workflows/lock-closed-issues.yml
vendored
@@ -15,7 +15,6 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
lock-closed-issues:
|
lock-closed-issues:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
|
||||||
steps:
|
steps:
|
||||||
- name: Lock closed issues after 7 days of inactivity
|
- name: Lock closed issues after 7 days of inactivity
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
@@ -23,13 +22,13 @@ jobs:
|
|||||||
script: |
|
script: |
|
||||||
const sevenDaysAgo = new Date();
|
const sevenDaysAgo = new Date();
|
||||||
sevenDaysAgo.setDate(sevenDaysAgo.getDate() - 7);
|
sevenDaysAgo.setDate(sevenDaysAgo.getDate() - 7);
|
||||||
|
|
||||||
const lockComment = `This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.`;
|
const lockComment = `This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.`;
|
||||||
|
|
||||||
let page = 1;
|
let page = 1;
|
||||||
let hasMore = true;
|
let hasMore = true;
|
||||||
let totalLocked = 0;
|
let totalLocked = 0;
|
||||||
|
|
||||||
while (hasMore) {
|
while (hasMore) {
|
||||||
// Get closed issues (pagination)
|
// Get closed issues (pagination)
|
||||||
const { data: issues } = await github.rest.issues.listForRepo({
|
const { data: issues } = await github.rest.issues.listForRepo({
|
||||||
@@ -89,5 +88,5 @@ jobs:
|
|||||||
|
|
||||||
page++;
|
page++;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`Total issues locked: ${totalLocked}`);
|
console.log(`Total issues locked: ${totalLocked}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user