Commit Graph

5 Commits

Author SHA1 Message Date
Ryan Gribble
cf442499ff add RequiredApprovingReview preview functionality to branch protection calls (#1912) 2019-01-30 21:20:50 +10:00
Mordechai Zuber
a2b48a66a4 ProtectedBranches API changes for Required Review Enforcement (#1523)
* Add `BranchProtectionRequiredPullRequestReviews` and `BranchProtectionRequiredPullRequestReviewsUpdate` models

* Add missing ctors and fix naming

Tests where updated to use the minimum nesseccary constructor

* Fix debugger display

* Update BranchProtection response model to include new dismissal restrictions fields and tidy up existing properties ctors and DebuggerDisplay

* Update BranchProtectionUpdate request model to include new dismissal restrictions fields/classes and tidy up existing properties and DebuggerDisplay

* Update BranchProtection tests to use new RequiredReviews and dismissal restrictions options

* Add specific client endpoints for GetReviewEnforcement UpdateReviewEnforcement and RemoveReviewEnforcement

* Add unit and integration tests for new client methods

* Implement Observable client methods and unit tests

* Add integration tests for Observable client

* Run CodeFormatter to fix up whitespace

* Clarify review dismissal restriction behaviour in code comments
2017-08-30 21:12:42 +10:00
Mordechai Zuber
58ba2eccf9 Add BranchProtection.EnforceAdmins object (#1598)
* Add BranchProtection.EnforceAdmins object

* Add EnforceAdmin related methods to RepoBranch clients

* Add unit tests

* Add unit tests for Observable client

* Add integration tests for enforce admin methods

* Tweak integration test to ensure that they actually do something

The `CreateRepositoryWithProtectedBranch` helper method currently sets `EnforceAdmins` as true, so delete it before adding.

* add missing docs

* rename tests

* Add missing ctor

* Remove property that is no longer supported

https://developer.github.com/changes/2017-05-02-adoption-of-admin-enforced/

* Fix failing unit tests
2017-05-04 22:34:58 +10:00
Ryan Gribble
902a5d765f Tweak naming of classes to be consistent
Change team and user lists to specific classes derived from Collection<T> so we can offer better configuration of BranchProtectionPushRestriction via multiple ctors (teams only, users only, teams and users, etc)
Add another ctor to BranchProtectionPushRestrictions for the case where no teams/users are specified (ie admin only)
Change organization update tests to use this new ctor and assert we get empty lists rather than no push restrictions
2016-08-26 07:19:57 +10:00
Ryan Gribble
b0bc7078c3 Add integration tests for Get, Update, Delete BranchProtection methods 2016-08-10 14:50:46 +10:00