Skip to content

Commit d5a56fd

Browse files
remove cherrypick bot and add mergify details (backport #581) (#582)
Signed-off-by: Camryn Carter <camryn.carter@ranchergovernment.com> Co-authored-by: Camryn Carter <camryn.carter@ranchergovernment.com>
1 parent 16def1a commit d5a56fd

1 file changed

Lines changed: 29 additions & 9 deletions

File tree

DEVELOPMENT.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Release tags (`v1.4.1`, `v1.3.2`, etc.) are always cut from the corresponding `r
8686

8787
### Where to Target Your Changes
8888

89-
All pull requests should target `main` by default and maintainers are responsible for cherry picking fixes onto release branches as part of the patch release process.
89+
All pull requests should target `main` by default and maintainers are responsible for backporting fixes onto release branches as part of the patch release process.
9090

9191
| Change Type | Target branch |
9292
| :---------: | :-----------: |
@@ -117,17 +117,36 @@ Development on `main` immediately continues toward the next minor.
117117

118118
### Backporting a Fix to a Release Branch
119119

120-
When a bug fix merged to `main` also needs to apply to an active release line, cherry-pick the commit onto the release branch and open a PR targeting it:
120+
Backports are handled by [Mergify](https://mergify.com/). When a PR merged to `main` also needs to apply to an active release line, comment on the merged PR with the target branch:
121+
122+
```
123+
@mergifyio backport release/1.3
124+
```
125+
126+
To backport to multiple branches at once, list each target branch in the same comment:
127+
128+
```
129+
@mergifyio backport release/1.3 release/1.4
130+
```
131+
132+
Mergify will open a backport PR against the specified branch with the cherry-picked commits and a reference back to the original PR. The bot adds a label and links the backport PR in the original for traceability.
133+
134+
You can trigger backports either before or after the original PR is merged — Mergify will queue the request and open the backport PR once the original is merged.
135+
136+
#### When the Backport Has Conflicts
137+
138+
If the cherry-pick doesn't apply cleanly, Mergify will still open the backport PR but mark it as having conflicts. To resolve:
121139

122140
```bash
123-
git checkout release/1.3
124-
git pull origin release/1.3
125-
git checkout -b backport/fix-description-to-1.3
126-
git cherry-pick <commit-sha>
127-
git push origin backport/fix-description-to-1.3
141+
git fetch origin
142+
git checkout mergify/bp/release/1.3/pr-<number>
143+
# resolve conflicts
144+
git add .
145+
git commit
146+
git push
128147
```
129148

130-
Open a PR targeting `release/1.3` and reference the original PR in the description. If the cherry-pick doesn't apply cleanly, resolve conflicts and note them in the PR.
149+
Note the conflict resolution in the PR description so reviewers can verify the fix still behaves correctly on the older release line.
131150

132151
### Fixes That Only Apply to an Older Release Line
133152

@@ -145,9 +164,10 @@ This keeps the history auditable and prevents future contributors from wondering
145164
```
146165
┌─────────────────────────────────────────► main (next minor)
147166
148-
cherry-pick / backport PRs
167+
@mergifyio backport release/1.4
149168
│ ─────────────────────────► release/1.4 (v1.4.0, v1.4.1 ...)
150169
170+
│ @mergifyio backport release/1.3
151171
│ ─────────────────────────► release/1.3 (v1.3.0, v1.3.1 ...)
152172
153173
│ direct fix (older-only bug)

0 commit comments

Comments
 (0)