Skip to content

Commit

Permalink
Add PR checklist workflow (opensearch-project#7699)
Browse files Browse the repository at this point in the history
* 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]>
Signed-off-by: [email protected] <[email protected]>
  • Loading branch information
2 people authored and leanneeliatra committed Jul 24, 2024
1 parent 4dc0d34 commit caad3e2
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/pr_checklist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: PR Checklist

on:
pull_request:
types: [opened]

jobs:
add-checklist:
runs-on: ubuntu-latest

steps:
- name: Comment PR with checklist
uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body: |
Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged.
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).
**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.
- name: Auto assign PR to repo owner
uses: actions/github-script@v6
with:
script: |
let assignee = context.payload.pull_request.user.login;
const prOwners = ['Naarcha-AWS', 'kolchfa-aws', 'vagimeli', 'natebower'];
if (!prOwners.includes(assignee)) {
assignee = 'hdhalter'
}
github.rest.issues.addAssignees({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
assignees: [assignee]
});

0 comments on commit caad3e2

Please sign in to comment.