Skip to content

Have bedevere remove "needs backport to *" labels #13

Closed

Description

@Mariatta

Proposed in python/core-workflow#58 (comment)

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.

  1. backports created with cherry_picker.py have [X.Y] for sure
  2. those not using cherry_picker.py have been instructed to do that in the devguide
  3. 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.
  4. (non core-dev) contributors can still use cherry_picker.py and the labels still get applied without coredev's intervention.
  5. 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)

Activity

  1. Mariatta commented on May 9, 2017

    @Mariatta
    MemberAuthor

    If we decide not to apply cherry-pick labels anymore, then bedevere can just be responsible in removing the needs backport to X.Y labels.

  2. brettcannon commented on May 9, 2017

    @brettcannon
    Member

    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.

  3. Mariatta commented on May 9, 2017

    @Mariatta
    MemberAuthor

    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.

  4. brettcannon commented on May 9, 2017

    @brettcannon
    Member

    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.

  5. changed the title [-]Have bedevere apply cherry-pick labels[/-] [+]Have bedevere remove "needs backport to *" labels[/+] on May 9, 2017
  6. brettcannon commented on May 9, 2017

    @brettcannon
    Member

    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.

  7. added a commit that references this issue on Jun 16, 2017
    59c6287
  8. Mariatta commented on Jun 16, 2017

    @Mariatta
    MemberAuthor

    Awesome! Thanks!

  9. Mariatta commented on Jun 17, 2017

    @Mariatta
    MemberAuthor

    Hmm.. did not work with this PR python/cpython#2253

    Which is a backport for python/cpython#1685

  10. brettcannon commented on Jun 17, 2017

    @brettcannon
    Member

    I'll have a look.

  11. self-assigned this
    on Jun 17, 2017
  12. added a commit that references this issue on Jun 17, 2017
    e998079
  13. brettcannon commented on Jun 17, 2017

    @brettcannon
    Member

    And it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions