Skip to content

Commit 167ced1

Browse files
authored
ci: add auto review assignment and PR template (#374)
* ci: add auto review assignment * chore: add updated PR template
1 parent 7228f09 commit 167ced1

File tree

3 files changed

+74
-0
lines changed

3 files changed

+74
-0
lines changed

.github/auto_request_review.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
reviewers:
2+
defaults:
3+
- jcstein
4+
- rollkit
5+
groups:
6+
rollkit:
7+
- Manav-Aggarwal
8+
- tzdybal
9+
- gupadhyaya
10+
- tuxcanfly
11+
- MSevey
12+
- yarikbratashchuk
13+
files:
14+
".github/**":
15+
- MSevey
16+
- jcstein
17+
- rollkit
18+
options:
19+
ignore_draft: true
20+
ignored_keywords:
21+
- WIP
22+
number_of_reviewers: 3

.github/pull_request_template.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!--
2+
Please read and fill out this form before submitting your PR.
3+
4+
Please make sure you have reviewed our contributors guide before submitting your
5+
first PR.
6+
-->
7+
8+
## Overview
9+
10+
<!--
11+
Please provide an explanation of the PR, including the appropriate context,
12+
background, goal, and rationale. If there is an issue with this information,
13+
please provide a tl;dr and link the issue.
14+
15+
Ex: Closes #<issue number>
16+
-->
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Auto Review Request
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, ready_for_review]
6+
7+
jobs:
8+
auto-add-reviewer:
9+
name: Auto add reviewer to PR
10+
uses: rollkit/.github/.github/workflows/reusable_housekeeping.yml@v0.3.0
11+
secrets: inherit
12+
permissions:
13+
issues: write
14+
pull-requests: write
15+
with:
16+
run-auto-request-review: true
17+
18+
auto-add-assignee:
19+
# ignore dependabot PRs
20+
if: ${{ github.actor != 'dependabot[bot]' }}
21+
name: Assign issue and PR to creator
22+
runs-on: ubuntu-latest
23+
permissions:
24+
issues: write
25+
pull-requests: write
26+
steps:
27+
- name: Set pull_request url and creator login
28+
# yamllint disable rule:line-length
29+
run: |
30+
echo "PR=${{ github.event.pull_request.html_url }}" >> $GITHUB_ENV
31+
echo "CREATOR=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
32+
# yamllint enable rule:line-length
33+
- name: Assign PR to creator
34+
run: gh pr edit ${{ env.PR }} --add-assignee ${{ env.CREATOR }}
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)