Commit Graph

13 Commits

Author SHA1 Message Date
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
Ryan Gribble c223f5ae9a Tidy up compiler warnings (#1779)
Fix XmlDoc parameter warnings (and tidy up other build output/warnings)
2018-03-07 00:17:52 +10:00
Ryan Gribble 1e474f8556 Enable pagination convention tests (#1659)
* Unskip pagination convention tests and rework exclusion property names
Also exclude Obsolete methods from pagination convention tests

* Reaction APIs appear to support pagination, flag to exclude for now and mark a TODO that they need implementing

* Repository invitation APIs need pagination implemented

* Exclude methods that use an alternative pagination approach

* Migrations, Licenses and References all need pagination implemented

* Pagination not supported for these methods (determined by API doc and poking the API) so exclude them from convention tests

* These methods need renaming to GetAll

* Rename offending RepositoryTrafficClient GetReferrers and GetPaths to GetAllReferrers and GetAllPaths

* Rename offending RepositoryBranchesClient methods from Get to GetAll
2017-09-03 11:50:02 +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
Ryan Gribble 98dfd77142 Remove the obsolete branch protection methods and classes as they are now no longer supported (#1620) 2017-06-26 22:10:17 +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
Martin Scholz 93ae832311 [WIP] Protected branches updates - granular methods (#1443)
* Add get method for required status checks

* Add api urls for required status checks

* change name of apir url for required status checks

* fix xml comment

* add update method for required status checks

* add delete method for required status checks

* fix api url

* fix xml comment

* add api url for required status cehcks contexts

* add get method for required status checks contexts

* add replace method for required status checks contexts

* add add method for required status checks contexts

* add new overload for delete method

* add delete method for required status checks contexts; fix overloads for delete

* add api url for restrictions

* add get method for restrictions

* add delete method for restrictions

* add api url for teams restrictions

* add get method for team restrictions; fix delete method restrictions

* fix overhead for get team restrictions

* fix httpmethod for update required status checks

* add set method for team restrictions

* add add method for team restrictions

* add delete method for team restrictions

* add api url for user restrictions

* add get method for user restrictions

* add set method for user restrictions

* add add method for user restrictions

* add delete method for user restrictions

* Add unit test; fix api urls

* Add ExcludeFromTest class

* add exclude attribute to methods

* Add attribute usage

* Add parameter to interface

* add observable unit tests

* rename excludefromtest

exclude all the tests for the new api endpoints because they broke the
pagination and syncobsverable tests.

* rename excludefromattribute

* refactor observable methods

* [WIP] Add integration tests

* finish integration test

* fix renamed branch protection restrictions

* add team and user collections

* rename set to update

* rename test methods

* optimize integration tests

* made some tidy ups
- fixup comment wording Edit => Replace
- remove spurious characters from description
- remove un-needed exclude attributes

* remove ForOrgRepo tests

* remove unused org contexts

* dispose contexts

* remove obsolete GetRedirect

* add clarifying comment to restriction methods
2016-09-21 07:16:51 +10:00
Andreia Gaita 9e958bf998 Make Repository Id a long, it's going to grow... 2016-09-15 02:15:11 +02:00
Ryan Gribble e6bf4635e9 rework obsolete warnings to collect a few places previuosly missed and reword to direct users to the new equivalent branch protection methods 2016-08-30 20:43:01 +10:00
Ryan Gribble 7bc44d4119 Tidy up a few Xml comments 2016-08-10 15:58:57 +10:00
Ryan Gribble 998af893f5 Implement Get Update and Delete BranchProtection methods in ObservableRepositoryBranchesClient
Add unit tests for Observable methods
2016-08-10 15:30:15 +10:00
Ryan Gribble ef0da2f84d Create RepositoryBranchesClient (#1437)
* Tidy up location of existing EditBranch tests

* Create RepositoryBranchesClient and move the GetBranch GetAllBranches and EditBranch methods to it, obsoleting the old ones

* Add tests for the new RepositoryBranchesClient (keeping old tests for RepositoriesClient around for now)

* Disable obsolete warning on reactive client temporarily

* Create observable repository branches client and move GetBranch, GetAllBranches, EditBranch methods to it, obsoleting the old ones

* Add tests for observable repository branches client, leave old tests in place for now

* Fix projects...

* Fix whitespace
2016-08-08 22:00:37 +10:00