'needs SME' label automation (#26078)
* workflow for comment on adding sme label * add period * working on stale check * change name and update comment * testing * testig * tested workflows * added cron schedule for stale check * repo changed to docs * more info on SME, changed name of workflow * clarity * Update .github/workflows/needs-sme-workflow.yml Co-authored-by: Peter Bengtsson <mail@peterbe.com> * comment for days before stale * removed default token * edited message for sme review * sme full form * changed time * Update .github/workflows/needs-sme-workflow.yml Co-authored-by: Janice <janiceilene@github.com> * Update .github/workflows/needs-sme-workflow.yml Co-authored-by: Janice <janiceilene@github.com> Co-authored-by: Peter Bengtsson <mail@peterbe.com> Co-authored-by: Janice <janiceilene@github.com>
This commit is contained in:
31
.github/workflows/needs-sme-stale-check.yaml
vendored
Normal file
31
.github/workflows/needs-sme-stale-check.yaml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Stale check for issues or PRs with "needs SME" label
|
||||
|
||||
# **What it does**: Provides stale checks on issues/PRs that need SME(subject matter expert) review on open source docs repo.
|
||||
# **Why we have it**: In the open repo, we want we want frequent checks on issues/PRs that are waiting on SME review.
|
||||
# **Who does it impact**: Anyone working in the open repo.
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '40 20 * * *' # Run each day at 20:40 UTC / 12:40 PST
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
stale_needs-sme:
|
||||
if: ${{ github.repository == 'github/docs'' }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@7fb802b3079a276cf3c7e6ba9aa003c665b3f838
|
||||
with:
|
||||
only-labels: needs SME
|
||||
remove-stale-when-updated: true
|
||||
days-before-stale: 7 # adds stale label if no activity for 7 days
|
||||
stale-issue-message: 'This is a gentle bump for the docs team that this issue is waiting for technical review.'
|
||||
stale-issue-label: SME stale
|
||||
days-before-issue-close: -1 # never close
|
||||
stale-pr-message: 'This is a gentle bump for the docs team that this PR is waiting for technical review.'
|
||||
stale-pr-label: SME stale
|
||||
days-before-pr-close: -1 # never close
|
||||
31
.github/workflows/needs-sme-workflow.yml
vendored
Normal file
31
.github/workflows/needs-sme-workflow.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Comment on adding "needs SME" label
|
||||
|
||||
# **What it does**: Comment on issues and pull requests when a "needs SME" label is added. SME = subject matter expert.
|
||||
# **Why we have it**: We want to manage our queue of issues and pull requests that need sme review.
|
||||
# **Who does it impact**: Everyone that works on docs or docs-internal.
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
pull_request_target:
|
||||
types: [labeled]
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
add-comment:
|
||||
if: ${{ github.repository == 'github/docs' && (github.event.label.name == 'needs SME' && github.event_name == 'issues' || github.event_name == 'pull_request_target') }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: peter-evans/create-or-update-comment@a35cf36e5301d70b76f316e867e7788a55a31dae
|
||||
with:
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
body: |
|
||||
Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert :eyes:
|
||||
- uses: peter-evans/create-or-update-comment@a35cf36e5301d70b76f316e867e7788a55a31dae
|
||||
with:
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
body: |
|
||||
Thanks for opening a pull request! We've triaged this issue for technical review by a subject matter expert :eyes:
|
||||
Reference in New Issue
Block a user