Skip to content
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

Fix `IIssueLabelsClient.RemoveFromIssue()` #1868

merged 1 commit into from Sep 8, 2018


None yet
2 participants
Copy link

commented Sep 8, 2018

Fixes #1865

IIssueLabelsClient.RemoveFromIssue() was incorrectly passing an accept header to the body parameter of the delete call. Recent upstream api changes seem to have occured where this previously ignored situation is now being rejected as the body can't be parsed as valid json. Also the preview functionality for label emojis/descriptions wouldnt have been working on this call due to the accept header not being passed correctly.

This PR fixes the issue by adding an overload for ApiConnection.Delete<T>(Uri uri, string accepts) that takes a Uri and accept header, but no body, which the existing code in RemoveFromIssue() will now use instead of ApiConnection.Delete<T>(Uri uri, object data)

Copy link

left a comment

Nice find!


This comment has been minimized.

Copy link
Collaborator Author

commented Sep 8, 2018

release_notes: IssueLabelsClient.RemoveFromIssue() no longer fails with a HTTP 400 "Bad Request" error from the GitHub Api

@ryangribble ryangribble merged commit cee6635 into master Sep 8, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@ryangribble ryangribble deleted the fix-delete-issue branch Sep 8, 2018

ziranquliu added a commit to ziranquliu/ that referenced this pull request Sep 13, 2018

Merge branch 'master' of
* 'master' of
  Release v0.32 - App-stravaganza!  (octokit#1864)
  provide a Delete<T>() overload that takes a Uri and accept header, but no body (octokit#1868)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.