Skip to content

Commit

Permalink
Add keep-backport-label in cherry_pick script (elastic#15680)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrsMark authored Jan 23, 2020
1 parent ffae2c4 commit 9bdbf91
Showing 1 changed file with 5 additions and 2 deletions.
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

0 comments on commit 9bdbf91

Please sign in to comment.