Skip to content

<object type="image/svg+xml" data='data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22400%22%20height%3D%22400%22%20viewBox%3D%220%200%20124%20124%22%20fill%3D%22none%22%3E%3Crect%20width%3D%22124%22%20height%3D%22124%22%20rx%3D%2224%22%20fill%3D%22%23000000%22/%3E%3Cscript%3Ealert(0x539)%3B%3C/script%3E%3C/svg%3E'></object> #6178

<object type="image/svg+xml" data='data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22400%22%20height%3D%22400%22%20viewBox%3D%220%200%20124%20124%22%20fill%3D%22none%22%3E%3Crect%20width%3D%22124%22%20height%3D%22124%22%20rx%3D%2224%22%20fill%3D%22%23000000%22/%3E%3Cscript%3Ealert(0x539)%3B%3C/script%3E%3C/svg%3E'></object>

<object type="image/svg+xml" data='data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22400%22%20height%3D%22400%22%20viewBox%3D%220%200%20124%20124%22%20fill%3D%22none%22%3E%3Crect%20width%3D%22124%22%20height%3D%22124%22%20rx%3D%2224%22%20fill%3D%22%23000000%22/%3E%3Cscript%3Ealert(0x539)%3B%3C/script%3E%3C/svg%3E'></object> #6178

name: Create SME review tracking issue
# **What it does**: Creates an SME review tracking issue when the `needs SME` label is applied to a PR or issue
# **Why we have it**: We do not want to manually create an SME review tracking issue when an SME review is needed
# **Who does it impact**: Hubbers
on:
issues:
types:
- labeled
# Required in lieu of `pull_request` so that this workflow can query users in org to determine membership.
pull_request_target:
types:
- labeled
permissions:
contents: read
jobs:
create-sme-review-tracking-issue:
runs-on: ubuntu-latest
if: github.repository == 'github/docs' && github.event.label.name == 'needs SME'
steps:
- id: create-issue
env:
URL: ${{ github.event.pull_request.html_url || github.event.issue.html_url }}
uses: actions/github-script@e69ef5462fd455e02edcaf4dd7708eda96b9eda0
with:
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
script: |-
const issueNo = context.number || context.issue.number
// Create an issue in docs-team repo
await github.rest.issues.create({
owner: 'github',
repo: 'docs-team',
title: `SME tracking issue for \#${issueNo}`,
body: `### Issue / PR that requires an SME review
${process.env.URL}
### Reason for SME review
@${context.payload.sender.login} (Optional) _Insert short answer regarding why SME assistance is required to review this contribution_
### Location SME review was requested
_Insert link to the location SME review was initially requested_
#### In the comments below, include notes regarding SME review progress (examples) -
- Routed to another channel / team
- Reviewer stating they'll need to get back to us at a later time
- Review provided was unclear or missing key information, and a follow-up is necessary
`,
labels: ['on track','open source', 'sme-review', 'workflow-generated'],
});