Support backport branch targets when merging
The merge
action should gain knowledge of how to merge an MR into multiple target branches at once:
- all merges should be pushed as one;
- each target branch may have a different commit within the MR which needs merged (occurs in the case where conflicts prevent a single commit from going into all branches).
Here's a diagram:
<- I - I'
/
<- N - M
/
B
/ \
<- R - R'
Where:
-
I
: the currentHEAD
of the target branch; -
R
: the currentHEAD
of a backport branch; -
N
: the topic for the target branch (if it were happening in isolation); -
B
: the backported topic; -
M
: a commit containing both the topic for the target branch and the backported topic in its history; -
I'
: the newHEAD
into the target branch; and -
R'
: the newHEAD
of the backport branch.
There may be multiple R
branches for a given merge request.
Cc: @brad.king