Skip to content

Commit 53924a6

Browse files
committed
fix: respect labels across all types
1 parent 810315b commit 53924a6

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

.github/workflows/stale.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,27 @@ jobs:
1414
- name: Generate stale messages
1515
id: messages
1616
run: |
17-
EXEMPT_PR_LABELS='wip,blocked'
18-
STALE_TEMPLATE='This [type] is stale because it has been open [stale-days] days with no activity. It will be closed in [close-days] days if no further activity occurs. Tag your issue with blocked or [exempt-pr-labels] to keep it open.'
19-
CLOSE_TEMPLATE='Closing this [type] due to prolonged inactivity.'
17+
EXEMPT_LABELS='wip,blocked'
18+
STALE_TEMPLATE='This [type] is stale because it has been open [stale-days] days with no activity. It will be closed in [close-days] days if no further activity occurs. Tag your issue or PR with [exempt-labels] to keep it open.'
19+
CLOSE_TEMPLATE='Closing this [type] due to prolonged inactivity. Tag with [exempt-labels] to keep it open.'
2020
2121
STALE_ISSUE_MSG="${STALE_TEMPLATE//\[type\]/issue}"
2222
STALE_ISSUE_MSG="${STALE_ISSUE_MSG//\[stale-days\]/30}"
2323
STALE_ISSUE_MSG="${STALE_ISSUE_MSG//\[close-days\]/5}"
24+
STALE_ISSUE_MSG="${STALE_ISSUE_MSG//\[exempt-labels\]/$EXEMPT_LABELS}"
2425
2526
CLOSE_ISSUE_MSG="${CLOSE_TEMPLATE//\[type\]/issue}"
26-
CLOSE_ISSUE_MSG="${CLOSE_ISSUE_MSG//\[exempt-pr-labels\]/$EXEMPT_PR_LABELS}"
27+
CLOSE_ISSUE_MSG="${CLOSE_ISSUE_MSG//\[exempt-labels\]/$EXEMPT_LABELS}"
2728
2829
STALE_PR_MSG="${STALE_TEMPLATE//\[type\]/PR}"
2930
STALE_PR_MSG="${STALE_PR_MSG//\[stale-days\]/45}"
3031
STALE_PR_MSG="${STALE_PR_MSG//\[close-days\]/10}"
32+
STALE_PR_MSG="${STALE_PR_MSG//\[exempt-labels\]/$EXEMPT_LABELS}"
3133
3234
CLOSE_PR_MSG="${CLOSE_TEMPLATE//\[type\]/PR}"
33-
CLOSE_PR_MSG="${CLOSE_PR_MSG//\[exempt-pr-labels\]/$EXEMPT_PR_LABELS}"
35+
CLOSE_PR_MSG="${CLOSE_PR_MSG//\[exempt-labels\]/$EXEMPT_LABELS}"
3436
35-
echo "exempt-pr-labels=$EXEMPT_PR_LABELS" >> $GITHUB_OUTPUT
37+
echo "exempt-labels=$EXEMPT_LABELS" >> $GITHUB_OUTPUT
3638
3739
{
3840
echo "stale-issue-message<<EOF"
@@ -62,5 +64,6 @@ jobs:
6264
days-before-pr-close: 10
6365
stale-issue-label: 'stale'
6466
stale-pr-label: 'stale'
65-
exempt-pr-labels: ${{ steps.messages.outputs.exempt-pr-labels }}
66-
enable-statistics: true
67+
exempt-issue-labels: ${{ steps.messages.outputs.exempt-labels }}
68+
exempt-pr-labels: ${{ steps.messages.outputs.exempt-labels }}
69+
enable-statistics: true

0 commit comments

Comments
 (0)