You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DEVELOPMENT.md
+29-9Lines changed: 29 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ Release tags (`v1.4.1`, `v1.3.2`, etc.) are always cut from the corresponding `r
86
86
87
87
### Where to Target Your Changes
88
88
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.
90
90
91
91
| Change Type | Target branch |
92
92
| :---------: | :-----------: |
@@ -117,17 +117,36 @@ Development on `main` immediately continues toward the next minor.
117
117
118
118
### Backporting a Fix to a Release Branch
119
119
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:
121
139
122
140
```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
128
147
```
129
148
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.
131
150
132
151
### Fixes That Only Apply to an Older Release Line
133
152
@@ -145,9 +164,10 @@ This keeps the history auditable and prevents future contributors from wondering
145
164
```
146
165
┌─────────────────────────────────────────► main (next minor)
0 commit comments