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

Cherry-pick #15680 to 7.x: Add keep-backport-label in cherry_pick script #15769

Merged
merged 1 commit into from
Jan 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions dev-tools/cherrypick_pr
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ def main():
help="Which remote to push the backport branch to")
parser.add_argument("--zube-team", default="",
help="Team the PR belongs to")
parser.add_argument("--keep-backport-label", action="store_true",
help="Preserve label needs_backport in original PR")
args = parser.parse_args()

print(args)
Expand Down Expand Up @@ -167,8 +169,9 @@ def main():
session.post(
base + "/issues/{}/labels".format(new_pr["number"]), json=labels)

# remove needs backport label from the original PR
session.delete(base + "/issues/{}/labels/needs_backport".format(args.pr_number))
if not args.keep_backport_label:
# remove needs backport label from the original PR
session.delete(base + "/issues/{}/labels/needs_backport".format(args.pr_number))

# get version and set a version label on the original PR
version = get_version(os.getcwd())
Expand Down