From fdf38ac4ed0ae7dd8fa46ffd66b6aa7f68bfd4c9 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 3 Sep 2024 17:25:33 -0500 Subject: [PATCH 1/3] GODRIVER-3314 Add PR Cherrypicker Task [master] --- .evergreen/config.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 26a89208e7..3cb5b2ca75 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -418,6 +418,17 @@ functions: export SCRIPT="$DRIVERS_TOOLS/.evergreen/github_app/assign-reviewer.sh" bash $SCRIPT -p $CONFIG -h ${github_commit} -o "mongodb" -n "mongo-go-driver" + "backport pr": + - command: subprocess.exec + type: test + params: + binary: bash + args: + - ${DRIVERS_TOOLS}/.evergreen/github_app/backport-pr.sh + - mongodb + - mongo-go-driver + - ${github_commit} + send-perf-data: - command: perf.send params: From bb84bd0230c22e4ac99e8e5ce998977470a5db78 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 3 Sep 2024 17:27:27 -0500 Subject: [PATCH 2/3] add contributing guide --- .evergreen/config.yml | 14 ++++++++++++++ docs/CONTRIBUTING.md | 15 +++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 3cb5b2ca75..4083045f71 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -917,6 +917,11 @@ tasks: - func: "add PR labels" - func: "create-api-report" + - name: backport-pr + allowed_requesters: ["commit"] + commands: + - func: "backport pr" + - name: perf tags: ["performance"] exec_timeout_secs: 7200 @@ -2495,6 +2500,15 @@ buildvariants: tasks: - name: ".compile-check" + - name: backport-pr + display_name: "Backport PR" + run_on: + - rhel8.7-large + expansions: + GO_DIST: "/opt/golang/go1.20" + tasks: + - name: "backport-pr" + - name: atlas-test tags: ["pullrequest"] display_name: "Atlas test" diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 4e5c523549..900fc32fdb 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -51,6 +51,21 @@ pre-commit run --all-files ### Cherry-picking between branches +#### Using the GitHub App + +Within a PR, you can make the comment: + +``` +drivers-pr-bot please backport to {target_branch} +``` + +The preferred workflow is to make the comment and then merge the PR. + +If you merge the PR and the "backport-pr" task runs before you make the comment, you can +make the comment and then re-run the "backport-pr" task for that commit. + +#### Manually + You must first install the `gh` cli (`brew install gh`), then set your GitHub username: ```bash From 115a43145d378e0bfbc7207dfa0dee1704393562 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 3 Sep 2024 17:28:24 -0500 Subject: [PATCH 3/3] change to small --- .evergreen/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 4083045f71..5bfc310600 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2503,7 +2503,7 @@ buildvariants: - name: backport-pr display_name: "Backport PR" run_on: - - rhel8.7-large + - rhel8.7-small expansions: GO_DIST: "/opt/golang/go1.20" tasks: