Skip to content

Swc project

Swc project #10944

name: Create SME review tracking issue
# Creates a technical-content tracking issue when a github/docs PR or issue gets the needs SME label.
on:
issues:
types:
- labeled
# pull_request_target gives fork PRs the DOCS_BOT_PAT_BASE secret to create the issue.
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@3a2844b7e9c422d3c10d287c895573f7108da1b3
with:
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
script: |-
const issueNo = context.number || context.issue.number
await github.rest.issues.create({
owner: 'github',
repo: 'technical-content',
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
---
_Generated by the [${context.workflow}](${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}) workflow run._
`,
labels: ['on track','open source', 'sme-review', 'workflow-generated'],
});