diff options
author | 2012-04-18 14:14:55 -0500 | |
---|---|---|
committer | 2012-04-18 14:14:55 -0500 | |
commit | d1f86894f91b21c7c92a9154caf3815f930aa8a6 (patch) | |
tree | 0eea9ba494274b81768f03901cf4f2c83e2d9516 | |
parent | add pull request API (diff) | |
download | python-github3-d1f86894f91b21c7c92a9154caf3815f930aa8a6.tar.xz python-github3-d1f86894f91b21c7c92a9154caf3815f930aa8a6.zip |
pass body to pull_requests.merge properly
-rw-r--r-- | pygithub3/services/pull_requests/__init__.py | 8 |
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) ) |