fix: use new media type for branch protections - #881
Conversation
|
@iBotPeaches thanks for the pullrequest! But can you change the code so that we set the required acceptHeaderValue in the specific methods instead? This way users don't need to call the configure method and it would resolve issues with multiple preview modes for api endpoints in the same class. There are 4 endpoint that would need this acceptHeaderValue: https://developer.github.com/changes/2018-03-16-protected-branches-required-approving-reviews/ Example: php-github-api/lib/Github/Api/Repository/Checks.php Lines 51 to 57 in 8c26dc8 |
|
@acrobat - I could not find 2 of the endpoints supported/built, so only patched the two that matched in the list you provided. Should I revert the change to configure() ? |
Great 👌
Yeah, revert it for now! |
This reverts commit 1b767b3.
|
Thanks @iBotPeaches! And congrats on your first contribution! 🎉 |
Not sure when this changed, but
lokiis not the preview anymore. It isluke-cage. Without this fix you won't get back branch protection values. (like required amount of reviewers).https://developer.github.com/v3/repos/branches/#get-branch-protection
If you need to support commit signature crud, that has a different media type under Protections, but I don't see that supported at this time.