Skip to content

Fix exception when merging with empty commit message (backport) #391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 17, 2015

Conversation

antoine-g
Copy link
Contributor

This pull-request backports #390 to stable/0.9.


Commit message:
Fixes #370

The 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 a commit message.
Providing an empty data string no longer works.

(cherry picked from commit 39c06c9)

Conflicts:
tests/unit/test_pulls.py

The test file was not backported because it doesn't exist on the destination branch.

Fixes sigmavirus24#370

The 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 a
commit message.
Providing an empty data string no longer works.

(cherry picked from commit 39c06c9)

Conflicts:
	tests/unit/test_pulls.py

The test file was not backported because it doesn't exist on the
destination branch.
@sigmavirus24
Copy link
Owner

Waiting for the build to go green. 💃 Thank you!

@antoine-g
Copy link
Contributor Author

I will fix the tests tonight when I can access to a proper environment and update the pull-request.
I think the cassette has to be recorded again.

@sigmavirus24
Copy link
Owner

@antoine-g that's not a cassette failure. That's the old-style tests which are just awful. If you wouldn't mind, could you look at the develop branch and backport some of the unit tests for the PullRequest.merge method? Then you can delete this test instead of "fixing" it.

Cheers,

The backport of the change didn't include the unit test as it was not
mergeable. This commit fixes the execution of the test with the new behaviour.
@antoine-g
Copy link
Contributor Author

It turns out that it was easier to fix this test than backporting some tests from develop as they required a more up-to-date tests/unit/helper.py which required a more up-to-date Session...

I can try to extract only the new relevant test and remove the old one if you prefer.

@sigmavirus24
Copy link
Owner

That's fine. Thanks @antoine-g

sigmavirus24 added a commit that referenced this pull request Jun 17, 2015
Fix exception when merging with empty commit message (backport)
@sigmavirus24 sigmavirus24 merged commit 96316e1 into sigmavirus24:stable/0.9 Jun 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants