Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit90c6b7c

Browse files
committed
Fix exception when merging with empty commit message
Fixessigmavirus24#370The GitHub API now requires a param `commit_message` with an empty value ''when merging a pull request. In such case the default value is used as acommit message.Providing an empty data string no longer works.(cherry picked from commit39c06c9)Conflicts:tests/unit/test_pulls.pyThe test file was not backported because it doesn't exist on thedestination branch.
1 parente1d7b17 commit90c6b7c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

‎github3/pulls.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,7 @@ def merge(self, commit_message=''):
307307
merge commit
308308
:returns: bool
309309
"""
310-
data=None
311-
ifcommit_message:
312-
data=dumps({'commit_message':commit_message})
310+
data=dumps({'commit_message':commit_message})
313311
url=self._build_url('merge',base_url=self._api)
314312
json=self._json(self._put(url,data=data),200)
315313
self.merge_commit_sha=json['sha']

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp