Skip to content

Commit 67e28b3

Browse files
Add PR checklist workflow (opensearch-project#7699)
* Add PR checklist workflow Signed-off-by: Fanit Kolchina <[email protected]> * Assign to user instead of owner Signed-off-by: Fanit Kolchina <[email protected]> * Testing Signed-off-by: Fanit Kolchina <[email protected]> * Remove test Signed-off-by: Fanit Kolchina <[email protected]> * Apply suggestions from code review Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> * If a PR is submitted by a doc team member, assign that member Signed-off-by: Fanit Kolchina <[email protected]> * Remove test Signed-off-by: Fanit Kolchina <[email protected]> --------- Signed-off-by: Fanit Kolchina <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> Co-authored-by: Nathan Bower <[email protected]>
1 parent 015481a commit 67e28b3

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/pr_checklist.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: PR Checklist
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
7+
jobs:
8+
add-checklist:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Comment PR with checklist
13+
uses: peter-evans/create-or-update-comment@v3
14+
with:
15+
token: ${{ secrets.GITHUB_TOKEN }}
16+
issue-number: ${{ github.event.pull_request.number }}
17+
body: |
18+
Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged.
19+
20+
Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a [maintainer](https://github.com/opensearch-project/documentation-website/blob/main/MAINTAINERS.md).
21+
22+
**When you're ready for doc review, tag the assignee of this PR**. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review.
23+
24+
- name: Auto assign PR to repo owner
25+
uses: actions/github-script@v6
26+
with:
27+
script: |
28+
let assignee = context.payload.pull_request.user.login;
29+
const prOwners = ['Naarcha-AWS', 'kolchfa-aws', 'vagimeli', 'natebower'];
30+
31+
if (!prOwners.includes(assignee)) {
32+
assignee = 'hdhalter'
33+
}
34+
35+
github.rest.issues.addAssignees({
36+
issue_number: context.issue.number,
37+
owner: context.repo.owner,
38+
repo: context.repo.repo,
39+
assignees: [assignee]
40+
});

0 commit comments

Comments
 (0)