-
Notifications
You must be signed in to change notification settings - Fork 67.6k
57 lines (48 loc) · 2.37 KB
/
Copy pathneeds-sme-stale-check.yaml
File metadata and controls
57 lines (48 loc) · 2.37 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
name: Stale check for issues or PRs with "needs SME" label
# **What it does**: Runs only in the OS repository to provide stale checks on issues/PRs that need SME(subject matter expert) review.
# **Why we have it**: In the open repo, we want we want to check on issues/PRs that are waiting on SME review.
# **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
issues: write
pull-requests: write
jobs:
stale_needs-sme:
if: ${{ github.repository == 'github/docs' }}
runs-on: ubuntu-latest
steps:
- uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
with:
only-labels: needs SME
days-before-stale: 28 # adds stale label if no activity for 7 days - temporarily changed to 28 days as we work through the backlog
stale-issue-message: 'This is a gentle reminder for the docs team that this issue is waiting for technical review by a subject matter expert (SME).'
stale-issue-label: 'Waiting on SME review'
days-before-issue-close: -1 # never close
stale-pr-message: 'This is a gentle reminder for the docs team that this PR is waiting for technical review by a subject matter expert.'
stale-pr-label: 'Waiting on SME review'
days-before-pr-close: -1 # never close
- name: Print outputs
run: echo "Staled issues/PRs:${{ steps.stale.outputs.staled-issues-prs || '0' }}, Closed issues/PRs:${{ steps.stale.outputs.closed-issues-prs || '0' }}"
- name: Check out repo
if: ${{ failure() }}
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/slack-alert
if: ${{ failure() }}
with:
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
- name: Generate GitHub App token
if: ${{ failure() }}
id: app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
owner: github
repositories: docs-engineering
- uses: ./.github/actions/create-workflow-failure-issue
if: ${{ failure() }}
with:
token: ${{ steps.app-token.outputs.token }}