forked from conda/constructor
-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (71 loc) · 3.42 KB
/
stale.yml
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
name: Stale
on:
# NOTE: github.event is workflow_dispatch payload:
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_dispatch
workflow_dispatch:
inputs:
dryrun:
description: "dryrun: Preview stale issues/prs without marking them (true|false)"
required: true
default: "true"
schedule:
- cron: 0 4 * * *
jobs:
stale:
if: '!github.event.repository.fork'
runs-on: ubuntu-latest
steps:
- id: read_yaml
uses: conda/actions/[email protected]
with:
path: https://raw.githubusercontent.com/conda/infra/main/.github/messages.yml
- uses: actions/stale@v4
id: stale
with:
# Idle number of days before marking issues stale (default: 60)
days-before-issue-stale: 365
# Idle number of days before closing stale issues/PRs (default: 7)
days-before-issue-close: 90
# Idle number of days before marking PRs stale (default: 60)
days-before-pr-stale: 365
# Idle number of days before closing stale PRs (default: 7)
days-before-pr-close: 30
# Comment on the staled issues
stale-issue-message: ${{ fromJSON(steps.read_yaml.outputs.value)['stale-issue'] }}
# Comment on the staled issues while closed
close-issue-message: ${{ fromJSON(steps.read_yaml.outputs.value)['close-issue'] }}
# Comment on the staled PRs
stale-pr-message: ${{ fromJSON(steps.read_yaml.outputs.value)['stale-pr'] }}
# Comment on the staled PRs while closed
close-pr-message: ${{ fromJSON(steps.read_yaml.outputs.value)['close-pr'] }}
# Label to apply on staled issues
stale-issue-label: 'stale'
# Label to apply on closed issues
close-issue-label: 'stale::closed'
# Label to apply on staled PRs
stale-pr-label: 'stale'
# Label to apply on closed PRs
close-pr-label: 'stale::closed'
# Issues with these labels will never be considered stale
exempt-issue-labels: 'stale::recovered,good-first-issue,help-wanted,severity::1,source::partner,¡important!,¡security!,type::tech-debt,Epic,priority-high'
# Issues with these labels will never be considered stale
exempt-pr-labels: 'stale::recovered,good-first-issue,help-wanted,severity::1,source::partner,¡important!,¡security!,type::tech-debt,Epic,priority-high'
# Max number of operations per run
operations-per-run: ${{ secrets.STALE_OPERATIONS_PER_RUN || 100 }}
# Remove stale label from issues/PRs on updates/comments
remove-stale-when-updated: true
# Add specified labels to issues/PRs when they become unstale
labels-to-add-when-unstale: 'stale::recovered'
labels-to-remove-when-unstale: 'stale,stale::closed'
# Dry-run (default: false)
debug-only: ${{ github.event.inputs.dryrun || false }}
# Order to get issues/PRs (default: false)
ascending: true
# Delete branch after closing a stale PR (default: false)
delete-branch: false
# Exempt all issues/PRs with milestones from stale
exempt-all-milestones: true
# Assignees on issues/PRs exempted from stale
exempt-assignees: mingwandroid
- name: Print outputs
run: echo ${{ join(steps.stale.outputs.*, ',') }}