-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
76 lines (59 loc) · 2.59 KB
/
action.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
name: 'Mark issues as stale'
description: 'Mark issues and pull requests as stale when there is no activity for a certain amount of days'
inputs:
token:
description: 'GitHub token to use. If passed, takes precedence over the `app-id` and `app-private-key` inputs.'
app-id:
description: 'The app ID of the app.'
private-key:
description: 'The private key of the app.'
days-before-stale:
description: 'Amount of days before an issue or pr is marked as stale.'
default: '60'
days-before-issue-stale:
description: 'Amount of days before an issue is marked as stale.'
days-before-pr-stale:
description: 'Amount of days before an issue is marked as stale.'
days-before-issue-close:
description: 'Amount of days before an issue is closed.'
default: '14'
days-before-pr-close:
description: 'Amount of days before a pull request is closed.'
default: '-1'
outputs:
staled-issues-prs:
description: 'List of all staled issues and pull requests.'
value: ${{ steps.stale.outputs.staled-issues-prs }}
closed-issues-prs:
description: 'List of all closed issues and pull requests.'
value: ${{ steps.stale.outputs.closed-issues-prs }}
runs:
using: composite
steps:
- uses: myparcelnl/actions/get-github-token@v4
id: token
with:
token: ${{ inputs.token }}
app-id: ${{ inputs.app-id }}
private-key: ${{ inputs.private-key }}
- uses: actions/stale@v9
id: stale
with:
repo-token: ${{ steps.token.outputs.token }}
# Messages
stale-issue-message: 'This issue is stale because it has been open for ${{ inputs.days-before-stale }} days with no activity. Remove stale label or comment to make it active again.'
stale-pr-message: 'This pull request is stale because it has been open for ${{ inputs.days-before-stale }} days with no activity. Remove stale label or comment to make it active again.'
close-issue-message: 'This issue was closed because it has been stalled for ${{ inputs.days-before-close }} days with no activity.'
# Marking as stale
days-before-stale: ${{ inputs.days-before-stale }}
days-before-issue-stale: ${{ inputs.days-before-issue-stale }}
days-before-pr-stale: ${{ inputs.days-before-pr-stale }}
# Closing
days-before-issue-close: ${{ inputs.days-before-issue-close }}
days-before-pr-close: ${{ inputs.days-before-pr-close }}
# Exemptions
exempt-all-milestones: true
exempt-pr-labels: dependencies
# Labels
stale-issue-label: stale
stale-pr-label: stale