-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request: use source PR labels to pick branches to backport to #157
Comments
Hey @ronkorving! Sorry for the slow reply. I think is a great idea. I'm still not settled on a particular implementation but I'll sketch a rough idea of what I think. LMK if you have any suggestions to make. versionLabelRegex {
"upstream": "elastic/kibana",
"branches": [{ "name": "7.x", "checked": true }, "7.7", "7.6"],
"versionLabelRegex": "^backport-(v\d+)$"
}
We can also make it an array if multiple matchers are necessary: {
"upstream": "elastic/kibana",
"branches": [{ "name": "7.x", "checked": true }, "7.7", "7.6"],
"versionLabelRegexes": ["^backport-(v\d+)$"]
} versionLabels {
"upstream": "elastic/kibana",
"branches": [{ "name": "7.x", "checked": true }, "7.7", "7.6"],
"versionLabels": {
"backport-v1": "v1",
"backport-v2": "v2",
"custom-label-v3": "v3",
}
} This approach allows for more flexibility but is also more verbose. Do you have any preferences for Running backport But what should happen if the user runs something like Is it possible that someone might want to override the label logic, and backport a commit to other branches? LMK if it makes sense and whether you have any opinion on this matter. |
Hey, thanks for the extensive response and proposals. Configuration About
How about a hybrid (example adapted to my scenario): {
"versionLabels": {
"some-special-branch": "some-special-label",
"v([0-9]+)-master": "v$1"
}
} This allows both regular expression replacement, and simple mapping to co-exist. The Running backport To be honest, I don't have strong opinions or ideas on this at this time, especially as I haven't yet really used --multiple yet. I think conflicts should prompt the user to act. If at that point, the labels can be displayed, and the choice can be made manually (incl. the choice to abort), I think it should be fine? |
I like it 👍
For the initial implementation I'll enable this behaviour when running @spalger I think you had a suggestion similar to this a long time ago. Would the hybrid approach work for your use case? |
@ronkorving This has been released in v5.2.0. I ended up naming the option LMK if it works like it should. If you have any other suggestions we can iterate on it. |
@sqren Flippin' awesome! :) I will let you know if anything comes up (although tbh, it may take a while before I get my hands on it). |
First off: awesome project! Thank you for your work.
I have a feature request, and would love to hear your thoughts. It would be really nice if it were possible to create some feature PR that will later need to be backported. Often you know beforehand where it should be backported to. One could use GitHub labels to mark that all PRs with label
backport-v1
should later be backported to thev1
branch. If a label system like that is applied, runningbackport --pr 123
could read those labels and preselect all the right branches.Being able to determine ahead of time where we backport to would really improve our workflow. I'm guessing we may not be alone in that.
The text was updated successfully, but these errors were encountered: