Debian Codegraph @

.github/workflows/stale.yml

raw
1 name: Stale
2
3 on:
4 # NOTE: github.event is workflow_dispatch payload:
5 # https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_dispatch
6 workflow_dispatch:
7 inputs:
8 dryrun:
9 description: 'dryrun: Preview stale issues/prs without marking them (true|false)'
10 required: true
11 type: boolean
12 default: true
13
14 schedule:
15 - cron: 0 4 * * *
16
17 permissions:
18 issues: write
19 pull-requests: write
20
21 jobs:
22 stale:
23 if: '!github.event.repository.fork'
24 runs-on: ubuntu-slim
25 strategy:
26 matrix:
27 include:
28 - only-issue-labels: ''
29 days-before-issue-stale: 365
30 days-before-issue-close: 30
31 # [type::support] issues have a more aggressive stale/close timeline
32 - only-issue-labels: type::support
33 days-before-issue-stale: 90
34 days-before-issue-close: 21
35 steps:
36 - uses: conda/actions/read-yaml@7f6830b1428a9bd47f0b068892c77eae95207037 # v26.1.0
37 id: read_yaml
38 with:
39 path: https://raw.githubusercontent.com/conda/infra/main/.github/messages.yml
40
41 - uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
42 id: stale
43 with:
44 # Only issues with these labels are checked whether they are stale
45 only-issue-labels: ${{ matrix.only-issue-labels }}
46
47 # Idle number of days before marking issues stale
48 days-before-issue-stale: ${{ matrix.days-before-issue-stale }}
49 # Idle number of days before closing stale issues/PRs
50 days-before-issue-close: ${{ matrix.days-before-issue-close }}
51 # Idle number of days before marking PRs stale
52 days-before-pr-stale: 365
53 # Idle number of days before closing stale PRs
54 days-before-pr-close: 30
55
56 # Comment on the staled issues
57 stale-issue-message: ${{ fromJSON(steps.read_yaml.outputs.value)['stale-issue'] }}
58 # Label to apply on staled issues
59 stale-issue-label: stale
60 # Label to apply on closed issues
61 close-issue-label: stale::closed
62 # Reason to use when closing issues
63 close-issue-reason: not_planned
64
65 # Comment on the staled PRs
66 stale-pr-message: ${{ fromJSON(steps.read_yaml.outputs.value)['stale-pr'] }}
67 # Label to apply on staled PRs
68 stale-pr-label: stale
69 # Label to apply on closed PRs
70 close-pr-label: stale::closed
71
72 # Remove stale label from issues/PRs on updates/comments
73 remove-stale-when-updated: true
74 # Add specified labels to issues/PRs when they become unstale
75 labels-to-add-when-unstale: stale::recovered
76 # Remove specified labels to issues/PRs when they become unstale
77 labels-to-remove-when-unstale: stale,stale::closed
78
79 # Max number of operations per run
80 operations-per-run: ${{ secrets.STALE_OPERATIONS_PER_RUN || 100 }}
81 # Dry-run
82 debug-only: ${{ github.event.inputs.dryrun || false }}
83 # Order to get issues/PRs
84 ascending: true
85 # Delete branch after closing a stale PR
86 delete-branch: false
87
88 # Issues with these labels will never be considered stale
89 exempt-issue-labels: stale::recovered,epic
90 # Issues with these labels will never be considered stale
91 exempt-pr-labels: stale::recovered,epic
92 # Exempt all issues/PRs with milestones from stale
93 exempt-all-milestones: true
94 # Assignees on issues/PRs exempted from stale
95 exempt-assignees: mingwandroid
96
97 - name: Print outputs
98 run: echo ${{ join(steps.stale.outputs.*, ',') }}