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
{{ message }}
Repository navigation
Have bedevere remove "needs backport to *" labels #13
Since @brettcannon said this can be a bedevere thing, I opened this issue :)
When a PR is created, bedevere can check if [X.Y] is in the PR title, and then apply cherry-pick for X.Y label.
backports created with cherry_picker.py have [X.Y] for sure
those not using cherry_picker.py have been instructed to do that in the devguide
even when the cherry-picking bot is in place, I suppose it will also provide [X.Y] as the PR title. This might simplify the cherry-picking bot to just do the cherry-pick and PR creation, and not worry about applying labels.
(non core-dev) contributors can still use cherry_picker.py and the labels still get applied without coredev's intervention.
Backports created using cherry_picker.py will also have the link to the original GitHub PR, (GH-XXX in the title/desc), bedevere can remove the needs backport to [X.Y] label from the original PR (I think)
I'm not sure how you would go from cherry-pick back to the original (if a bot were making the cherry-pick PRs then it already has a reference to the original PR). Search through all closed PRs for a matching title? Maybe there's something in the PR data from GitHub but I don't know what it would be off the top of my head.
Sure, I guess it will be easier to get cherry-picker the bot to do it :)
Supposedly, there's the reference to the original GitHub issue number in the backport PR.
For example, this backport PR python/cpython#1446, the PR title includes GH-1372, which is the original PR # that was against the master branch.
Here's another example, python/cpython#1475, #1451 in the PR title is the original PR number.
One thing to watch out for when reading the title is there is a length limit. This can lead to issues like the title spilling over into the body of the PR message, e.g. https://api.github.com/repos/python/cpython/pulls/1522 . Do note that the the end of the title ends in a (Unicode) ellipsis and the body also starts with an ellipsis and the spillover goes to the first newline.
Activity
Mariatta commentedon May 9, 2017
If we decide not to apply cherry-pick labels anymore, then bedevere can just be responsible in removing the
needs backport to X.Ylabels.brettcannon commentedon May 9, 2017
I'm not sure how you would go from cherry-pick back to the original (if a bot were making the cherry-pick PRs then it already has a reference to the original PR). Search through all closed PRs for a matching title? Maybe there's something in the PR data from GitHub but I don't know what it would be off the top of my head.
Mariatta commentedon May 9, 2017
Sure, I guess it will be easier to get cherry-picker the bot to do it :)
Supposedly, there's the reference to the original GitHub issue number in the backport PR.
For example, this backport PR python/cpython#1446, the PR title includes GH-1372, which is the original PR # that was against the master branch.
Here's another example, python/cpython#1475, #1451 in the PR title is the original PR number.
brettcannon commentedon May 9, 2017
Yeah, if there's no metadata in the webhook event in the opening of a cherry-pick PR we can try and guess the original PR by the title.
[-]Have bedevere apply cherry-pick labels[/-][+]Have bedevere remove "needs backport to *" labels[/+]brettcannon commentedon May 9, 2017
One thing to watch out for when reading the title is there is a length limit. This can lead to issues like the title spilling over into the body of the PR message, e.g. https://api.github.com/repos/python/cpython/pulls/1522 . Do note that the the end of the title ends in a (Unicode) ellipsis and the body also starts with an ellipsis and the spillover goes to the first newline.
Automatically remove backport labels (#19)
Mariatta commentedon Jun 16, 2017
Awesome! Thanks!
Mariatta commentedon Jun 17, 2017
Hmm.. did not work with this PR python/cpython#2253
Which is a backport for python/cpython#1685
brettcannon commentedon Jun 17, 2017
I'll have a look.
Fix dispatching of the backport module (#21)
brettcannon commentedon Jun 17, 2017
And it works!