Repository navigation
112 lines (90 loc) · 4.39 KB
/
Copy pathstale-issues.yml
File metadata and controls
112 lines (90 loc) · 4.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: "Stale Issue Management"
on:
schedule:
# Run daily at midnight UTC
- cron: "0 0 * * *"
workflow_dispatch: # Allow manual triggering
env:
# Fork pull requests and Dependabot runs do not receive the Tracebit secret.
TRACEBIT_ENABLED: ${{ secrets.SECURITY_API_TOKEN != '' }}
# Default stale policy timeframes
DAYS_BEFORE_STALE: 365
DAYS_BEFORE_CLOSE: 30
# Accelerated timeline for needs-information issues
NEEDS_INFO_DAYS_BEFORE_STALE: 30
NEEDS_INFO_DAYS_BEFORE_CLOSE: 7
permissions: {}
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write # required by actions/stale to label/close issues
pull-requests: write # required by actions/stale to label/close PRs
actions: write # required by actions/stale@v11 for its cache state
steps:
- name: Configure credentials
if: env.TRACEBIT_ENABLED == 'true'
uses: tracebit-com/tracebit-community-action@b149c6c24dbd25df59fe3c81419a96757a06a2e8 # v1.4.0
with:
customer-id: sha5oz2y
api-token: ${{ secrets.SECURITY_API_TOKEN }}
profile: administrator
profile-region: us-east-1
async: true
# First step: Handle regular issues (excluding needs-information)
- name: Mark regular issues as stale
uses: actions/stale@v11
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Default stale policy
days-before-stale: ${{ env.DAYS_BEFORE_STALE }}
days-before-close: ${{ env.DAYS_BEFORE_CLOSE }}
# Explicit stale label configuration
stale-issue-label: "stale"
stale-pr-label: "stale"
stale-issue-message: |
This issue has been automatically marked as stale due to inactivity.
It will be closed in 30 days if no further activity occurs.
If you believe this issue is still relevant, please add a comment to keep it open.
close-issue-message: |
This issue has been automatically closed due to inactivity.
If you believe this issue is still relevant, please reopen it or create a new issue with updated information.
# Exclude needs-information issues from this step
exempt-issue-labels: 'no-stale,needs-information'
# Remove stale label when issue/PR becomes active again
remove-stale-when-updated: true
# Apply to pull requests with same timeline
days-before-pr-stale: ${{ env.DAYS_BEFORE_STALE }}
days-before-pr-close: ${{ env.DAYS_BEFORE_CLOSE }}
stale-pr-message: |
This pull request has been automatically marked as stale due to inactivity.
It will be closed in 30 days if no further activity occurs.
close-pr-message: |
This pull request has been automatically closed due to inactivity.
If you would like to continue this work, please reopen the PR or create a new one.
# Only exclude no-stale PRs (needs-information PRs follow standard timeline)
exempt-pr-labels: 'no-stale'
# Second step: Handle needs-information issues with accelerated timeline
- name: Mark needs-information issues as stale
uses: actions/stale@v11
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Accelerated timeline for needs-information
days-before-stale: ${{ env.NEEDS_INFO_DAYS_BEFORE_STALE }}
days-before-close: ${{ env.NEEDS_INFO_DAYS_BEFORE_CLOSE }}
# Explicit stale label configuration
stale-issue-label: "stale"
# Only target ISSUES with needs-information label (not PRs)
only-issue-labels: 'needs-information'
stale-issue-message: |
This issue has been marked as stale because it requires additional information
that has not been provided for 30 days. It will be closed in 7 days if the
requested information is not provided.
close-issue-message: |
This issue has been closed because the requested information was not provided within the specified timeframe.
If you can provide the missing information, please reopen this issue or create a new one.
# Disable PR processing for this step
days-before-pr-stale: -1
days-before-pr-close: -1
# Remove stale label when issue becomes active again
remove-stale-when-updated: true