Commit Graph

13 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
Ryan Gribble 600c8657e4 Remove method/members previously deprecated (#1780)
* removes obsolete OranizationsClient.GetAll (replaced with GetAllForUser)

* removes obsolete PullRequestsClient.Comment (replaced with ReviewComment)

* removes obsolete TeamsClient.GetMembership (replaced with GetMembershipDetails)
removes obsolete TeamsClient.AddMembership (replaced with AddOrEditMembership)
removes obsolete TeamsClient.AddMembership (replaced with AddOrEditMembership)
removes obsolete TeamMembership response class (replaced with TeamMembershipDetails)

* removes obsolete RepositoryBranchesClient.GetRequiredStatusChecksContexts (replaced with GetAllRequiredStatusChecksContexts)
removes obsolete RepositoryBranchesClient.GetProtectedBranchTeamRestrictions (replaced with GetAllProtectedBranchTeamRestrictions)
removes obsolete RepositoryBranchesClient.GetProtectedBranchUserRestrictions (replaced with GetAllProtectedBranchUserRestrictions)

* removes obsolete RepositoryTrafficClient.GetReferrers (replaced with GetAllReferrers)
removes obsolete RepositoryTrafficClient.GetPaths (replaced with GetAllPaths)

* removes obsolete constructors from BranchProtectionUpdateSettings and UpdateTeam request models

* removes obsolete Assignee property from NewIssue and IssueUpdate request models (replaced with Assignees)
2018-04-22 09:58:06 +10:00
Itai Bar-Haim 4e804f61a6 Prefer using nameof(x) over literal "x" (#1781)
* updated XML docs and added some missing bits.

* prefer nameof(x) over literal "x"
2018-03-07 20:43:10 +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 0334730126 Fixup string.Format casing for consistency 2016-08-26 07:34:43 +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 c96ee7ac01 Move comment to <remarks> section 2016-08-15 21:13:53 +10:00
Ryan Gribble 6ebf1939b6 tweak comments 2016-08-10 21:17:52 +10:00
Ryan Gribble 4ea8c7057f not allowed null for users/teams, clarify usage in comments 2016-08-10 14:50:29 +10:00
Ryan Gribble 51e2380d70 debug implementation while writing integration tests
- fix Update method PUT parameters
- add [SerializeNull] to various request fields
- fix deserialize problem with ProtectedBranchRestrictions ctor not being public
- tidy up DebuggerDisplay output
2016-08-10 14:23:48 +10:00
Ryan Gribble 2c7d6fbe42 push restrictions only apply to org repos so provide a ctor for the update request that doesnt take a restrictions parameter 2016-08-08 23:28:20 +10:00
Ryan Gribble 3bd7323044 Add comments, move request classes to new file 2016-08-08 23:25:52 +10:00