Skip to content

Commit 60b508f

Browse files
authored
GODRIVER-3314 Add PR Cherrypicker Task (#1765)
1 parent 5cb35dd commit 60b508f

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.evergreen/config.yml

+20
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
@@ -2487,6 +2500,13 @@ buildvariants:
24872500
tasks:
24882501
- name: ".compile-check"
24892502

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

docs/CONTRIBUTING.md

+15
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)