Commit a0eafcbc authored by Muyang Li's avatar Muyang Li
Browse files

chore: set the inactivity from 35 to 30

parent f2286286
...@@ -17,7 +17,7 @@ jobs: ...@@ -17,7 +17,7 @@ jobs:
with: with:
github-token: ${{secrets.GITHUB_TOKEN}} github-token: ${{secrets.GITHUB_TOKEN}}
script: | script: |
const sixtyDaysAgo = new Date(Date.now() - 35 * 24 * 60 * 60 * 1000); const thirtyDaysAgo = new Date(Date.now() - 30 * 24 * 60 * 60 * 1000);
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
console.log(`Owner: ${owner}, Repo: ${repo}`); console.log(`Owner: ${owner}, Repo: ${repo}`);
...@@ -57,7 +57,7 @@ jobs: ...@@ -57,7 +57,7 @@ jobs:
console.log(`Skipping issue #${issue.number} as it's marked as 'good first issue'`); console.log(`Skipping issue #${issue.number} as it's marked as 'good first issue'`);
continue; continue;
} }
if (new Date(issue.updated_at) < sixtyDaysAgo) { if (new Date(issue.updated_at) < thirtyDaysAgo) {
try { try {
await github.rest.issues.update({ await github.rest.issues.update({
owner, owner,
...@@ -70,7 +70,7 @@ jobs: ...@@ -70,7 +70,7 @@ jobs:
owner, owner,
repo, repo,
issue_number: issue.number, issue_number: issue.number,
body: 'This issue has been automatically closed due to 35-day inactivity. Please feel free to reopen it if needed.' body: 'This issue has been automatically closed due to 30-day inactivity. Please feel free to reopen it if needed.'
}); });
console.log(`Closed issue #${issue.number} due to inactivity.`); console.log(`Closed issue #${issue.number} due to inactivity.`);
} catch (error) { } catch (error) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment