mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-12-21 23:19:08 +08:00
Compare commits
3 Commits
run-in-bg
...
cc19ec125a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc19ec125a | ||
|
|
ffa77fdf44 | ||
|
|
47cf806532 |
13
.github/workflows/close-issue.yml
vendored
13
.github/workflows/close-issue.yml
vendored
@@ -5,6 +5,11 @@ on:
|
|||||||
# run every day at midnight
|
# run every day at midnight
|
||||||
- cron: "0 0 * * *"
|
- cron: "0 0 * * *"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
close_inactive_issues:
|
close_inactive_issues:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -53,6 +58,14 @@ jobs:
|
|||||||
// check inactivity
|
// check inactivity
|
||||||
if (now - lastActivityTime > inactivePeriod) {
|
if (now - lastActivityTime > inactivePeriod) {
|
||||||
console.log(`Closing inactive issue: #${issue.number} (No recent replies for 7 days)`);
|
console.log(`Closing inactive issue: #${issue.number} (No recent replies for 7 days)`);
|
||||||
|
|
||||||
|
await github.rest.issues.createComment({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
issue_number: issue.number,
|
||||||
|
body: "This issue has been automatically closed due to inactivity for 7 days."
|
||||||
|
});
|
||||||
|
|
||||||
await github.rest.issues.update({
|
await github.rest.issues.update({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
|
|||||||
Reference in New Issue
Block a user