Skip to content

Commit 5754d9b

Browse files
authored
Fix label creation (#562)
The color should not include the leading # Fixes #560
1 parent c320c05 commit 5754d9b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bedevere/backport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,5 +130,5 @@ 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"},
134134
)

tests/test_backport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ 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'}
456456

457457

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

0 commit comments

Comments
 (0)