Skip to content

Commit 08a6c6d

Browse files
authored
Add auto request review workflow
1 parent de5c5ba commit 08a6c6d

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

Diff for: .github/reviewers.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
reviewers:
2+
# The default reviewers
3+
defaults:
4+
- team:main # GitHub team
5+
6+
groups:
7+
a-main:
8+
- 2000arion # username
9+
- entcheneric # username
10+
11+
files:
12+
# Keys are glob expressions.
13+
# You can assign groups defined above as well as GitHub usernames.
14+
'.github/**':
15+
- a-main # group
16+
17+
options:
18+
ignore_draft: true
19+
enable_group_assignment: true
20+
21+
# Randomly pick reviewers up to this number.
22+
# Do not set this option if you'd like to assign all matching reviewers.
23+
number_of_reviewers: 1
24+
25+
# If it's true, the last matching files-change pattern takes the most precedence (CODEOWNERS-compatible)
26+
# See https://github.com/necojackarc/auto-request-review/pull/80 for more details.
27+
last_files_match_only: false

Diff for: .github/workflows/auto_request_review.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: 'Auto Request Review'
2+
3+
on:
4+
pull_request:
5+
types: [opened, ready_for_review, reopened]
6+
7+
jobs:
8+
auto-request-review:
9+
name: 'Auto Request Review'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: 'Request review based on files changes and/or groups the author belongs to'
13+
uses: necojackarc/[email protected]
14+
with:
15+
token: ${{ secrets.GITHUB_TOKEN }}
16+
config: .github/reviewers.yml # Config file location override
17+
# Look for config locally during run instead of in repo.
18+
# For instance, if you'd like to use a config file stored in external storage,
19+
# you can fetch it before you run this action, then let this action pick it up with `use_local: true`.
20+
# This defaults to false if not specified.
21+
# See https://github.com/necojackarc/auto-request-review/issues/76 for more details.
22+
use_local: true

0 commit comments

Comments
 (0)