Skip to content

Commit dd5d471

Browse files
committed
Simplify PR template
* Remove the checklist and review reminder from the PR template * Add GitHub action to post a comment with the checklist and reminder
1 parent 4b1ace8 commit dd5d471

File tree

3 files changed

+47
-16
lines changed

3 files changed

+47
-16
lines changed

.github/pr-comments/checklist.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Checklist
2+
- [ ] Have you linked a jira ticket and/or is the ticket in the title?
3+
- [ ] Have you checked whether your jira ticket required DOCSP changes?
4+
- [ ] Have you checked for release_note changes?
5+
6+
## Reminder (Please remove this when merging)
7+
- Please try to Approve or Reject Changes the PR, keep PRs in review as short as possible
8+
- Our Short Guide for PRs: [Link](https://docs.google.com/document/d/1T93KUtdvONq43vfTfUt8l92uo4e4SEEvFbIEKOxGr44/edit?tab=t.0)
9+
- Remember the following Communication Standards - use comment prefixes for clarity:
10+
* **blocking**: Must be addressed before approval.
11+
* **follow-up**: Can be addressed in a later PR or ticket.
12+
* **q**: Clarifying question.
13+
* **nit**: Non-blocking suggestions.
14+
* **note**: Side-note, non-actionable. Example: Praise
15+
* --> no prefix is considered a question

.github/pull_request_template.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,3 @@
55
## Proof of Work
66

77
<!-- Enter your proof that it works here.-->
8-
9-
## Checklist
10-
- [ ] Have you linked a jira ticket and/or is the ticket in the title?
11-
- [ ] Have you checked whether your jira ticket required DOCSP changes?
12-
- [ ] Have you checked for release_note changes?
13-
14-
## Reminder (Please remove this when merging)
15-
- Please try to Approve or Reject Changes the PR, keep PRs in review as short as possible
16-
- Our Short Guide for PRs: [Link](https://docs.google.com/document/d/1T93KUtdvONq43vfTfUt8l92uo4e4SEEvFbIEKOxGr44/edit?tab=t.0)
17-
- Remember the following Communication Standards - use comment prefixes for clarity:
18-
* **blocking**: Must be addressed before approval.
19-
* **follow-up**: Can be addressed in a later PR or ticket.
20-
* **q**: Clarifying question.
21-
* **nit**: Non-blocking suggestions.
22-
* **note**: Side-note, non-actionable. Example: Praise
23-
* --> no prefix is considered a question

.github/workflows/pr-comment.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: PR Comment
2+
on:
3+
pull_request:
4+
types: [opened]
5+
6+
jobs:
7+
add-comment:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
pull-requests: write
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
15+
- name: Add PR Checklist Comment
16+
uses: actions/github-script@v6
17+
with:
18+
script: |
19+
const fs = require('fs');
20+
const path = require('path');
21+
22+
// Read the checklist from the markdown file
23+
const checklistPath = path.join(process.env.GITHUB_WORKSPACE, '.github', 'pr-comments', 'checklist.md');
24+
const commentBody = fs.readFileSync(checklistPath, 'utf8');
25+
26+
// Create a comment with the checklist content
27+
await github.rest.issues.createComment({
28+
issue_number: context.issue.number,
29+
owner: context.repo.owner,
30+
repo: context.repo.repo,
31+
body: commentBody
32+
});

0 commit comments

Comments
 (0)