-
Notifications
You must be signed in to change notification settings - Fork 207
103 lines (82 loc) · 2.78 KB
/
automations.yml
File metadata and controls
103 lines (82 loc) · 2.78 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
name: Automations
on:
schedule:
# Runs every day at 2:00 AM UTC
- cron: '0 2 * * *'
workflow_dispatch:
inputs:
DRY_RUN:
type: boolean
description: 'Run in dry run mode'
default: true
permissions:
actions: write
# contents: write # only for delete-branch option
issues: write
pull-requests: write
env:
DRY_RUN: true
MOVE_TO_STALE_DAYS: 30
CLOSE_AFTER_STALE_DAYS: 15
jobs:
mark-stale:
name: Mark/unmark stale PRs and issues
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v10
with:
debug-only: ${{ env.DRY_RUN }}
exempt-draft-pr: true
exempt-issue-labels: 'awaiting-approval,work-in-progress'
stale-issue-label: 'stale'
stale-pr-label: 'stale'
# --- Timing ---
# Job 1 marks/unmarks, but never closes.
days-before-issue-stale: ${{ env.MOVE_TO_STALE_DAYS }}
days-before-issue-close: -1
days-before-pr-stale: ${{ env.MOVE_TO_STALE_DAYS }}
days-before-pr-close: -1
remove-stale-when-updated: true
remove-pr-stale-when-updated: true
# --- Messages ---
stale-issue-message: >
👋 **This issue has been marked as Stale.**
This issue has had no activity for **${{ env.MOVE_TO_STALE_DAYS }} days**.
— 🤖 Stale Bot
stale-pr-message: >
👋 **This PR has been marked as Stale.**
This PR has had no activity for **${{ env.MOVE_TO_STALE_DAYS }} days**.
— 🤖 Stale Bot
operations-per-run: 100
ascending: true
close-stale:
name: Close stale PRs and issues
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v10
with:
debug-only: ${{ env.DRY_RUN }}
only-labels: 'stale'
stale-issue-label: 'stale'
stale-pr-label: 'stale'
# --- Timing ---
# Job 2 only closes already marked items.
days-before-issue-stale: -1
days-before-pr-stale: -1
days-before-issue-close: ${{ env.CLOSE_AFTER_STALE_DAYS }}
days-before-pr-close: ${{ env.CLOSE_AFTER_STALE_DAYS }}
# --- Messages ---
close-issue-message: >
👋 **This issue has been automatically closed.**
This issue was labeled with `stale` and has had no activity
for **${{ env.CLOSE_AFTER_STALE_DAYS }} days** since that.
— 🤖 Stale Bot
close-pr-message: >
👋 **This PR has been automatically closed.**
This PR was labeled with `stale` and has had no activity
for **${{ env.CLOSE_AFTER_STALE_DAYS }} days** since that.
If this is still relevant, please feel free to reopen it
or create a new PR.
— 🤖 Stale Bot
operations-per-run: 100
ascending: true