-
Notifications
You must be signed in to change notification settings - Fork 68.4k
94 lines (80 loc) · 3.54 KB
/
Copy pathtriage-stale-check.yml
File metadata and controls
94 lines (80 loc) · 3.54 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
name: Stale check for no activity
# **What it does**: Provides more aggressive stale checks in the open repo.
# **Why we have it**: In the open repo, we want more aggressive stale checking.
# **Who does it impact**: Anyone working in the open repo.
on:
schedule:
- cron: '20 16 * * 1' # Run every Monday at 16:20 UTC / 8:20 PST
permissions:
contents: read
jobs:
stale_contributor:
name: Identify and close stale issues and PRs
if: github.repository == 'github/docs'
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 30
days-before-close: 7
stale-issue-message: 'A stale label has been added to this issue, because it has been open for 30 days with no activity. If you think this issue should remain open, please add a new comment.'
exempt-issue-labels: 'help wanted,never-stale,waiting for review'
stale-issue-label: 'Inactive'
close-issue-label: 'Closed as inactive'
exempt-pr-labels: 'never-stale,ready to merge,waiting for review'
stale-pr-message: 'A stale label has been added to this pull request because it has been open 30 days with no activity. If you think this pull request should remain open, please add a new comment.'
stale-pr-label: 'Inactive'
close-pr-label: 'Closed as inactive'
- name: Check out repo
if: ${{ failure() }}
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/create-workflow-failure-issue
id: create-failure-issue
if: ${{ failure() }}
with:
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
- uses: ./.github/actions/slack-alert
if: ${{ failure() }}
with:
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
issue_url: ${{ steps.create-failure-issue.outputs.issue_url }}
stale_staff:
name: Remind staff about PRs waiting for review
if: github.repository == 'github/docs'
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0
id: stale
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
only-labels: 'waiting for review'
days-before-pr-stale: 14
days-before-pr-close: -1 # Never close
operations-per-run: 100
stale-pr-message: 'This is a gentle reminder for the Technical Content team that this pull request is waiting for review.'
stale-pr-label: 'Waiting on Technical Content review'
- name: Print outputs
env:
STALED: ${{ steps.stale.outputs.staled-issues-prs || '0' }}
CLOSED: ${{ steps.stale.outputs.closed-issues-prs || '0' }}
run: echo "Staled issues/PRs:${STALED}, Closed issues/PRs:${CLOSED}"
- name: Check out repo
if: ${{ failure() }}
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/create-workflow-failure-issue
id: create-failure-issue
if: ${{ failure() }}
with:
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
- uses: ./.github/actions/slack-alert
if: ${{ failure() }}
with:
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
issue_url: ${{ steps.create-failure-issue.outputs.issue_url }}