Skip to content

Commit c163de4

Browse files
authored
GODRIVER-3148 Use GitHub App to Auto Assign Reviewer (#1572)
1 parent 95ee6bc commit c163de4

File tree

3 files changed

+34
-5
lines changed

3 files changed

+34
-5
lines changed

.evergreen/config.yml

+30-3
Original file line numberDiff line numberDiff line change
@@ -391,10 +391,22 @@ functions:
391391
working_dir: src/go.mongodb.org/mongo-driver
392392
script: |
393393
${PREPARE_SHELL}
394-
CONFIG=$PROJECT_DIRECTORY/.github/labeler.yml
395-
SCRIPT="$DRIVERS_TOOLS/.evergreen/github_app/apply-labels.sh"
394+
export CONFIG=$PROJECT_DIRECTORY/.github/labeler.yml
395+
export SCRIPT="$DRIVERS_TOOLS/.evergreen/github_app/apply-labels.sh"
396396
bash $SCRIPT -l $CONFIG -h ${github_commit} -o "mongodb" -n "mongo-go-driver"
397397
398+
"add PR reviewer":
399+
- command: shell.exec
400+
type: test
401+
params:
402+
shell: "bash"
403+
working_dir: src/go.mongodb.org/mongo-driver
404+
script: |
405+
${PREPARE_SHELL}
406+
export CONFIG=$PROJECT_DIRECTORY/.github/reviewers.txt
407+
export SCRIPT="$DRIVERS_TOOLS/.evergreen/github_app/assign-reviewer.sh"
408+
bash $SCRIPT -p $CONFIG -h ${github_commit} -o "mongodb" -n "mongo-go-driver"
409+
398410
send-perf-data:
399411
- command: perf.send
400412
params:
@@ -878,8 +890,13 @@ tasks:
878890
- func: run-make
879891
vars:
880892
targets: "check-fmt check-license check-modules lint"
881-
- func: "create-api-report"
893+
894+
- name: pull-request-helpers
895+
allowed_requesters: ["patch", "github_pr"]
896+
commands:
897+
- func: "add PR reviewer"
882898
- func: "add PR labels"
899+
- func: "create-api-report"
883900

884901
- name: perf
885902
tags: ["performance"]
@@ -2305,6 +2322,16 @@ buildvariants:
23052322
tasks:
23062323
- name: ".static-analysis"
23072324

2325+
- name: pull-request-helpers
2326+
tags: ["pullrequest"]
2327+
display_name: "Pull Request Helpers"
2328+
run_on:
2329+
- rhel8.7-small
2330+
expansions:
2331+
GO_DIST: "/opt/golang/go1.20"
2332+
tasks:
2333+
- name: "pull-request-helpers"
2334+
23082335
- name: perf
23092336
display_name: "Performance"
23102337
run_on:

.github/reviewers.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
qingyang-hu
2+
matthewdale
3+
prestonvasquez
4+
blink1073

docs/CODEOWNERS

-2
This file was deleted.

0 commit comments

Comments
 (0)