Skip to content

Commit 2fe878f

Browse files
committed
chore: remove temporary push trigger from stale workflow
1 parent 7592222 commit 2fe878f

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

.github/workflows/stale-issues.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@ name: Stale Issue Management
1919
on:
2020
schedule:
2121
- cron: '0 9 * * *' # Daily at 09:00 UTC
22-
push:
23-
branches:
24-
- copilot/branch-management-stale-issue-workflow
2522
workflow_dispatch:
2623

27-
# Protected labels are defined once here and shared by both jobs via the
28-
# PROTECTED_LABELS environment variable (JSON-encoded array).
24+
# Protected labels, thresholds, and workflow configuration defined at workflow level.
2925
env:
3026
PROTECTED_LABELS: '["priority:p0","priority:p1","security-review"]'
27+
STALE_DAYS: '30'
28+
STALE_CLOSE_DAYS: '60'
3129

3230
permissions:
3331
issues: write
@@ -45,15 +43,16 @@ jobs:
4543

4644
steps:
4745
- name: Warn stale issues
48-
uses: actions/github-script@v7
46+
uses: actions/github-script@v8
4947
with:
5048
script: |
5149
// Layer 2 — code guard: these labels make an issue untouchable regardless of
5250
// how it reached the candidate list.
5351
// PROTECTED_LABELS is defined at workflow level and shared with close-stale.
5452
const PROTECTED_LABELS = JSON.parse(process.env.PROTECTED_LABELS);
55-
const MAX_WARN = 10;
56-
const STALE_DAYS = 30;
53+
const MAX_WARN = 20;
54+
const STALE_DAYS = parseInt(process.env.STALE_DAYS, 10);
55+
const STALE_CLOSE_DAYS = parseInt(process.env.STALE_CLOSE_DAYS, 10);
5756
5857
const now = new Date();
5958
const cutoff = new Date(now.getTime() - STALE_DAYS * 24 * 60 * 60 * 1000);
@@ -116,7 +115,7 @@ jobs:
116115
body: [
117116
`⚠️ **Stale issue notice** — This issue has had no activity for **${inactiveDays} day(s)**.`,
118117
'',
119-
'It will be automatically closed after **60 days** of inactivity.',
118+
`It will be automatically closed after **${STALE_CLOSE_DAYS} days** of inactivity.`,
120119
'',
121120
'To keep this issue open:',
122121
'- Leave a comment describing the current status, or',
@@ -144,14 +143,14 @@ jobs:
144143

145144
steps:
146145
- name: Close warned stale issues
147-
uses: actions/github-script@v7
146+
uses: actions/github-script@v8
148147
with:
149148
script: |
150149
// Layer 2 — code guard.
151150
// PROTECTED_LABELS is defined at workflow level and shared with warn-stale.
152151
const PROTECTED_LABELS = JSON.parse(process.env.PROTECTED_LABELS);
153-
const MAX_CLOSE = 5;
154-
const STALE_CLOSE_DAYS = 60;
152+
const MAX_CLOSE = 10;
153+
const STALE_CLOSE_DAYS = parseInt(process.env.STALE_CLOSE_DAYS, 10);
155154
156155
const now = new Date();
157156
const cutoff = new Date(now.getTime() - STALE_CLOSE_DAYS * 24 * 60 * 60 * 1000);

0 commit comments

Comments
 (0)