Core-workflow: Consider using a prefix in the title of backport PRs

Created on 11 Feb 2017  路  18Comments  路  Source: python/core-workflow

Can we use a prefix like [backport to X.Y] or [3.6] for backport PRs? For example:

[backport to X.Y] bpo-1234: Fix comment in tokenizer.c

This way we can easily see which PRs are backports on GitHub and we can also set appropriate email filters.

Most helpful comment

Then try both labels and prefix for a month and see which one ends up being useful. And to unify with the labels let's go with [cherry-pick for 3.6].

All 18 comments

I think appropriate labels would be better, otherwise we have to remember what the format is while a label is just right there and labels are more searchable.

Since we have "backport to 3.6" we could add "cherry-pick for 3.6" for PRs which are an actual backport. Does that sound reasonable?

"cherry-pick for 3.6" sounds good to me. I don't know how can I create email filters for labels though :)

Ah, that's why you want the prefix in the title. 馃槈 I've gone ahead and added the appropriate labels so we can give them a try and see how it works out.

Can we have backport pending label, to identify that the PR should be backported but it hasn't happened yet?

Nvm just read your email to python-dev. So backport to X.Y is to be removed once cherry-pick for X.Y PR is created.

馃 I realize that @berkerpeksag still wants to be able to filter out the backport emails.
Is [backport to X.Y] still the desired prefix in this case? :)

The way I read "backport to 3.6" is this needs to be backported _to_ 3.6, not that it's a backport _for_ 3.6. So if we do decide to drop the labels and go with title prefixes I would argue for [backport for 3.6] or [cherry-pick for 3.6] or [cp for 3.6].

All of your suggestions look good to me, @brettcannon. The reason I prefer title prefixes is that it's easy to notice backport PRs without using GitHub UI.

See the attached screenshot. Both of them backport PRs (for 3.5 and 3.6 branches) with almost same title so it's a little bit hard to notice the difference :)

backport-prs

Then try both labels and prefix for a month and see which one ends up being useful. And to unify with the labels let's go with [cherry-pick for 3.6].

Actually could GH-24 take care of this by including the labels in the title automatically?

I might be wrong, but GH-24 is about sending an email to python-checkins when a PR ws merged.

And so you want an email at creation instead?

Another nice thing about issue title notations, is that then a bot can automatically add the label :)

The two prefixes I've seen so far are:

BackportXY
[cherry-pick for X.Y]

Both of those seem really wordy to me, and I think a simple [X.Y] should suffice

This is already recommended in this section of the devguide :)

Since we are now documenting this as a thing to do, I'm closing this (I don't think we can drop the label due to the fact that search for [3.6] does not turn up what you expect; although if people start typing out [cherry-pick for 3.6] we might be able to drop the labels.)

As my understanding, [3.6] prefix is only for pull request title, not for commit message.
Am I right?

As my understanding, [3.6] prefix is only for pull request title, not for commit message.

Correct. I use it in only PR titles, but other projects use it in commit messages too. See Django for example.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ammaraskar picture ammaraskar  路  9Comments

Mariatta picture Mariatta  路  4Comments

brettcannon picture brettcannon  路  3Comments

vstinner picture vstinner  路  9Comments

Mariatta picture Mariatta  路  6Comments