mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-12-18 13:19:24 +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
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
close_inactive_issues:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -53,6 +58,14 @@ jobs:
|
||||
// check inactivity
|
||||
if (now - lastActivityTime > inactivePeriod) {
|
||||
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({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
|
||||
Reference in New Issue
Block a user