Skip to content

Commit 2945d62

Browse files
authored
Update label creation (#563)
Add the description to the label.
1 parent 5754d9b commit 2945d62

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

bedevere/backport.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,5 +130,6 @@ async def maintenance_branch_created(event, gh, *args, **kwargs):
130130
if MAINTENANCE_BRANCH_RE.match(branch_name):
131131
await gh.post(
132132
"/repos/python/cpython/labels",
133-
data={"name": f"needs backport to {branch_name}", "color": "c2e0c6"},
133+
data={"name": f"needs backport to {branch_name}", "color": "c2e0c6",
134+
"description": "bug and security fixes"},
134135
)

tests/test_backport.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,8 @@ async def test_maintenance_branch_created(ref):
452452
await backport.router.dispatch(event, gh)
453453
label_creation_post = gh.post_[0]
454454
assert label_creation_post[0] == "https://api.github.com/repos/python/cpython/labels"
455-
assert label_creation_post[1] == {'name': f"needs backport to {ref}", 'color': 'c2e0c6'}
455+
assert label_creation_post[1] == {'name': f"needs backport to {ref}", 'color': 'c2e0c6',
456+
'description': 'bug and security fixes'}
456457

457458

458459
@pytest.mark.parametrize('ref', ['backport-3.9', 'test', 'Mariatta-patch-1'])

0 commit comments

Comments
 (0)