Skip to content

Commit 91d4f62

Browse files
Sarah Edwardsemilyistoofunky
andauthored
Add template and workflow to add review template to PRs (github#19185)
* add review template and workflow * use sha instead of version for action * exclude template from check for private repo links * Apply suggestions from code review Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com> Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com>
1 parent d47d795 commit 91d4f62

3 files changed

Lines changed: 71 additions & 0 deletions

File tree

.github/review-template.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## Author self-review
2+
3+
- [ ] The changes in this PR meet the user experience and goals outlined in the content design plan.
4+
- [ ] I've compared my PR's source changes to staging and reviewed for versioning issues, redirects, the [style guide](https://github.com/github/docs/blob/main/contributing/content-style-guide.md), [content model](https://github.com/github/docs-content-strategy/blob/main/content-design/models.md), or [localization checklist](https://github.com/github/docs/blob/main/contributing/localization-checklist.md) rendering problems, typos, and wonky screenshots.
5+
- [ ] I've worked through build failures and tests are passing.
6+
- [ ] For REST API content, I've verified that endpoints, parameters, and responses are correct and work as expected and provided curl samples below.
7+
8+
For more information, check out our [full review guidelines and checklist](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/reviews-and-feedback/review-process.md).
9+
10+
## Review request
11+
12+
### Summary
13+
14+
_Help reviewers understand this project and its context by writing a paragraph summarizing its goals and intended user experience and explaining how the PR meets those goals._
15+
[Content design plan](LINK HERE)
16+
17+
### Docs Content review
18+
19+
_Give Docs Content any extra context, highlight areas for them to consider in their review, and ask them questions you need answered to ship the PR._
20+
21+
### Technical review
22+
23+
_Ping in technical reviewers, asking them to review whether content is technically accurate and right for the audience._
24+
_Highlight areas for them to consider in their review and ask them questions you need answered to ship the PR._
25+
26+
### Content changes
27+
28+
[PR on staging](LINK HERE)
29+
30+
_Give a high-level overview of the changes in your PR and how they support the overall goals of the PR. Share links to important articles or changes in source and on staging. If your PR is large or complex, use a table to highlight changes with high user impact._
31+
32+
### Notes
33+
34+
_Discuss test failures, versioning issues, or anything else reviewers should know to consider the overall user experience of the PR._
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Add review template
2+
3+
# **What it does**: When a specific label is added to a PR, adds the contents of .github/review-template.md as a comment in the PR
4+
# **Why we have it**: To help Docs Content team members ensure that their PR is ready for review
5+
# **Who does it impact**: docs-internal maintainers and contributors
6+
7+
on:
8+
pull_request:
9+
types:
10+
- labeled
11+
12+
jobs:
13+
comment-that-approved:
14+
name: Add review template
15+
runs-on: ubuntu-latest
16+
if: github.event.label.name == 'docs-content-ready-for-review' && github.repository == 'github/docs-internal'
17+
18+
steps:
19+
- name: check out repo content
20+
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
21+
22+
# Jump through some hoops to work with a multi-line file
23+
- name: Store review template in variable
24+
run: |
25+
TEMPLATE=$(cat .github/workflows/review-template.md)
26+
echo "TEMPLATE<<EOF" >> $GITHUB_ENV
27+
echo "$TEMPLATE" >> $GITHUB_ENV
28+
echo "EOF" >> $GITHUB_ENV
29+
30+
- name: Comment on the PR
31+
run: |
32+
gh pr comment $PR --body "$TEMPLATE"
33+
env:
34+
GITHUB_TOKEN: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
35+
PR: ${{ github.event.pull_request.html_url }}
36+
TEMPLATE: ${{ env.TEMPLATE }}

tests/meta/repository-references.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ describe('check for repository references', () => {
4848
'.algolia-cache',
4949
'.git',
5050
'.github/actions-scripts/enterprise-server-issue-templates/*.md',
51+
'.github/review-template.md',
5152
'dist',
5253
'node_modules',
5354
'translations',

0 commit comments

Comments
 (0)