diff --git a/bedevere/backport.py b/bedevere/backport.py index 7786f75d..6dede2d0 100644 --- a/bedevere/backport.py +++ b/bedevere/backport.py @@ -31,7 +31,7 @@ async def _copy_over_labels(gh, original_issue, backport_issue): """Copy over relevant labels from the original PR to the backport PR.""" - label_prefixes = "skip", "type", "sprint" + label_prefixes = "skip", "type", "sprint", "topic" labels = list( filter(lambda x: x.startswith(label_prefixes), util.labels(original_issue)) ) diff --git a/tests/test_backport.py b/tests/test_backport.py index 85ad1bd2..f0d4dce5 100644 --- a/tests/test_backport.py +++ b/tests/test_backport.py @@ -276,7 +276,13 @@ async def test_label_copying(pr_prefix): }, } event = sansio.Event(event_data, event="pull_request", delivery_id="1") - labels_to_test = "CLA signed", "skip news", "type-enhancement", "sprint" + labels_to_test = ( + "CLA signed", + "skip news", + "type-enhancement", + "sprint", + "topic-repl", + ) getitem_data = { "https://api.github.com/issue/1234": { "labels": [{"name": label} for label in labels_to_test], @@ -293,7 +299,12 @@ async def test_label_copying(pr_prefix): expected_post = None for post in gh.post_: if post[0] == "https://api.github.com/issue/1234/labels": - assert {"skip news", "type-enhancement", "sprint"} == frozenset(post[1]) + assert { + "skip news", + "type-enhancement", + "sprint", + "topic-repl", + } == frozenset(post[1]) expected_post = post assert expected_post is not None