Skip to content

Commit 7ee24ae

Browse files
committed
GODRIVER-3314 Add PR Cherrypicker Task
1 parent 2e7cb37 commit 7ee24ae

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.evergreen/config.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,14 @@ functions:
418418
export SCRIPT="$DRIVERS_TOOLS/.evergreen/github_app/assign-reviewer.sh"
419419
bash $SCRIPT -p $CONFIG -h ${github_commit} -o "mongodb" -n "mongo-go-driver"
420420
421+
"backport pr":
422+
- command: subprocess.exec
423+
type: test
424+
params:
425+
binary: bash
426+
args:
427+
- ${DRIVERS}/.evergreen/github_app/backport-pr.sh mongodb mongo-go-driver ${github_commit}
428+
421429
send-perf-data:
422430
- command: perf.send
423431
params:
@@ -909,6 +917,11 @@ tasks:
909917
- func: "add PR labels"
910918
- func: "create-api-report"
911919

920+
- name: backport-pr
921+
allowed_requesters: ["commit"]
922+
commands:
923+
- func: "backport pr"
924+
912925
- name: perf
913926
tags: ["performance"]
914927
exec_timeout_secs: 7200
@@ -2486,6 +2499,13 @@ buildvariants:
24862499
tasks:
24872500
- name: ".compile-check"
24882501

2502+
- name: backport-pr
2503+
display_name: "Backport PR"
2504+
run_on:
2505+
- rhel8.7-large
2506+
tasks:
2507+
- name: "backport-pr"
2508+
24892509
- name: atlas-test
24902510
tags: ["pullrequest"]
24912511
display_name: "Atlas test"

docs/CONTRIBUTING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,21 @@ pre-commit run --all-files
4949

5050
### Cherry-picking between branches
5151

52+
#### Using the GitHub App
53+
54+
Within a PR, you can make the comment:
55+
56+
```
57+
drivers-pr-bot please backport to {target_branch}
58+
```
59+
60+
The preferred workflow is to make the comment and then merge the PR.
61+
62+
If you merge the PR and the "backport-pr" task runs before you make the comment, you can
63+
make the comment and then re-run the "backport-pr" task for that commit.
64+
65+
#### Manually
66+
5267
You must first install the `gh` cli (`brew install gh`), then set your GitHub username:
5368

5469
```bash

0 commit comments

Comments
 (0)