Skip to content

Commit

Permalink
Remove the backport PR number, retain the original PR number (GH-56)
Browse files Browse the repository at this point in the history
Closes #53
  • Loading branch information
Mariatta committed Feb 12, 2018
1 parent bc512e3 commit 6b826d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backport/status_change.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async def merge_pr(gh, pr_number, sha):
if commit["sha"] == sha:
pr_commit_msg = commit["commit"]["message"].split("\n")

cleaned_up_title = f"{pr_commit_msg[0]} (GH-{pr_number})"
cleaned_up_title = f"{pr_commit_msg[0]}"
await gh.put(f"/repos/python/cpython/pulls/{pr_number}/merge",
data={"commit_title": cleaned_up_title,
"commit_message": "\n".join(pr_commit_msg[1:]),
Expand Down
2 changes: 2 additions & 0 deletions tests/test_status_change.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ async def test_ci_passed_with_one_core_dev_review_pr_is_merged():
assert len(gh.post_data["body"]) is not None # leaves a comment
assert gh.put_data["sha"] == sha # is merged
assert gh.put_data["merge_method"] == "squash"
assert gh.put_data["commit_title"] == "bpo-32720: Fixed the replacement field grammar documentation. (GH-5544)"


async def test_ci_passed_with_no_core_dev_review_pr_is_not_merged():
Expand Down Expand Up @@ -318,6 +319,7 @@ async def test_pr_reviewed_webhook_ci_passed_pr_is_merged():
assert not hasattr(gh, 'post_data') # does not leave a comment
assert gh.put_data["sha"] == sha # is merged
assert gh.put_data["merge_method"] == "squash"
assert gh.put_data["commit_title"] == "bpo-32720: Fixed the replacement field grammar documentation. (GH-5544)"


async def test_pr_reviewed_webhook_ci_failure_pr_is_not_merged():
Expand Down

0 comments on commit 6b826d3

Please sign in to comment.