aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pygithub3/services/pull_requests/__init__.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/pygithub3/services/pull_requests/__init__.py b/pygithub3/services/pull_requests/__init__.py
index 2197f60..f7da50a 100644
--- a/pygithub3/services/pull_requests/__init__.py
+++ b/pygithub3/services/pull_requests/__init__.py
@@ -120,10 +120,12 @@ class PullRequests(Service, MimeTypeMixin):
:param str user: Username
:param str repo: Repository
+ This currently raises an HTTP 405 error if the request is not
+ mergable.
+
"""
- # so, the API docs don't actually say what the status code will be in
- # the case of a merge failure. I hope it's not a 404.
+ body = {'commit_message': message}
return self._put(
self.make_request('pull_requests.merge', number=number,
- message=message, user=user, repo=repo)
+ body=body, user=user, repo=repo)
)