Add support for Branch required_linear_history/allow_force_pushes/allow_deletions#1723
Add support for Branch required_linear_history/allow_force_pushes/allow_deletions#1723teejae wants to merge 2 commits intoPyGithub:masterfrom
Conversation
|
I'm a little confused by this -- you add the three arguments to Branch.edit, but add the methods to BranchProtection? BranchProtection is just for protection attrributes of Branch, I daresay those belong on Branch. |
|
I understand what is going on better now -- those attributes only need to be added to BranchProtection.py (and BranchProtection.pyi). |
|
@s-t-e-v-e-n-k Thanks for the review! I added to |
s-t-e-v-e-n-k
left a comment
There was a problem hiding this comment.
Indeed, that is looking better. The replay data needs to be fixed to support the new attributes, since you've changed what is sent, which is why the tests fail, as well as adding a test case that changes them. You'll also need to edit the Branch.pyi and BranchProtection.pyi files to add the typing hints.
|
@s-t-e-v-e-n-k thanks for the confirmation. i hadn't yet changed any code relative to the first commit. i admit that i couldn't figure out how to generate replay data. |
|
https://github.com/PyGithub/PyGithub/blob/master/CONTRIBUTING.md has an Automated tests section on how to do so. |
|
FYI, with the github v4 graphql API now supporting these options, I no longer need this v3 API option. I had not been able to figure out how to fix the tests, even after reading the CONTRIBUTING.md file. Closing this PR for now. https://developer.github.com/v4/changelog/2020-11-13-schema-changes/ |
Add new
BranchProtectionoptions listed here: https://developer.github.com/v3/repos/branches/required_linear_historyallow_force_pushesallow_deletionsTesting:
FYI, I could not figure out how to get the tests to run correctly