From e6c6d5a3bac299f87ef441cbb0665b3f454bacf9 Mon Sep 17 00:00:00 2001 From: Ryan Mast Date: Tue, 17 Aug 2021 22:18:02 -0700 Subject: [PATCH] Use short bpo ref instead of link --- bedevere/bpo.py | 2 +- tests/test_bpo.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bedevere/bpo.py b/bedevere/bpo.py index f6be46b1..c9271f71 100644 --- a/bedevere/bpo.py +++ b/bedevere/bpo.py @@ -13,7 +13,7 @@ {{body}} -https://bugs.python.org/issue{{issue_number}} +Ref: bpo-{{issue_number}} {CLOSING_TAG} """ diff --git a/tests/test_bpo.py b/tests/test_bpo.py index 23e9485a..dedad258 100644 --- a/tests/test_bpo.py +++ b/tests/test_bpo.py @@ -189,7 +189,7 @@ async def test_no_body_when_edit_title(monkeypatch): gh = FakeGH() await bpo.router.dispatch(event, gh, session=None) assert gh.patch_data is not None - assert gh.patch_data["body"] == "\n\n\nhttps://bugs.python.org/issue32636\n\n" + assert gh.patch_data["body"] == "\n\n\nRef: bpo-32636\n\n" bpo._validate_issue_number.assert_awaited_with("32636", session=None) @@ -345,7 +345,7 @@ async def test_set_body_success(monkeypatch): gh = FakeGH() await bpo.router.dispatch(event, gh, session=None) status = gh.patch_data - assert "https://bugs.python.org/issue1234" in status["body"] + assert "Ref: bpo-1234" in status["body"] assert "1347" in gh.patch_url bpo._validate_issue_number.assert_awaited_with("1234", session=None) @@ -360,7 +360,7 @@ async def test_set_body_failure(monkeypatch): "statuses_url": "https://api.github.com/blah/blah/git-sha", "url": "https://api.github.com/repos/blah/blah/pulls/1347", "title": "[3.6] bpo-1234: an issue!", - "body": """The body.\n\n"https://bugs.python.org/issue1234"\n""" + "body": """The body.\n\n"Ref: bpo-1234"\n""" }, } event = sansio.Event(data, event="pull_request", delivery_id="12345")