Skip to content
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

Enhancements of the cherrypick PRs script #3848

Merged
merged 2 commits into from
Mar 30, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion dev-tools/cherrypick_pr
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def main():

# create PR
request = session.post(base + "/pulls", json=dict(
title="Cherry-pick to {}: {}".format(args.to_branch, original_pr["title"]),
title="Cherry-pick #{} to {}: {}".format(args.pr_number, args.to_branch, original_pr["title"]),
head=remote_user + ":" + tmp_branch,
base=args.to_branch,
body="Cherry-pick of PR #{} to {} branch. Original message: \n\n{}"
Expand All @@ -135,6 +135,9 @@ def main():
session.post(
base + "/issues/{}/labels".format(new_pr["number"]), json=["backport", "review"])

# remove needs backport label from the original PR
session.delete(base + "/issues/{}/labels/needs_backport".format(args.pr_number))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only two concern with this is that the label should only be removed, when the PR is merged. And it also does not work if their are backports needed to 5.3 and 5.4

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree it's not ideal. In case we need to backport a PR to multiple branches, then it would be nice to enhance the script to be able to pass a list of branches instead of one, and then remove the needs_backport, but this is for another PR.


print("\nDone. PR created: {}".format(new_pr["html_url"]))
print("Please go and check it and add the review tags")

Expand Down