Skip to content

Commit 2c8065a

Browse files
Update github_rest_api/github.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 1250afc commit 2c8065a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

github_rest_api/github.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,10 +585,12 @@ def merge_pull_request(
585585
body: dict[str, Any] = {"merge_method": str(merge_method)}
586586
if sha:
587587
body["sha"] = sha
588-
return self._put(
588+
resp = self._put(
589589
url=f"{self._url_pull}/{pr_number}/merge",
590590
json=body,
591-
).json()
591+
)
592+
resp.raise_for_status()
593+
return resp.json()
592594

593595
def update_branch(self, update: str, upstream: str) -> dict[str, Any] | None:
594596
"""Update a branch by creating a PR from upstream and then merge it.

0 commit comments

Comments
 (0)