Commit Graph

46 Commits

Author SHA1 Message Date
Brendan Forster dc2f6ff001 first pass at cleaning up attributes (#2157) 2020-03-18 09:02:11 -03:00
Brendan Forster 327020750f add convention test for preview APIs (#2154) 2020-03-18 08:52:50 -03:00
Brendan Forster 5de5258257 add attribute for tracking preview usage in the codebase (#2128) 2020-03-07 10:40:15 -04:00
Brendan Forster f96885654f add metadata to each client action (#2124) 2020-03-04 21:10:38 -04:00
Brendan Forster ce5ea64428 migrate to dotnet-format tool (#2016)
* migrate to new dotnet-format tool in build script (run on local build)
* reformat code
2019-09-24 11:34:50 -03:00
Henrik Andersson fafbf33b78 Implement Draft Pull Requests (#2009)
* Add draft PR preview header

* Add Draft property to models

* Update pull requests client and tests to use draft PR accept header

* Update observable pull requests client and tests to use draft PR accept header

* Add integration tests to create and retrieve draft pull requests
2019-09-22 13:38:56 -03: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
Travis Harris ff9521ce3d Implement Review API for Pull Requests (#1648)
* First Iteration Need to finish tests and docs

* Mostly Complete

* Fixing tests and adding review comments

* Added tests for reactive client

* Moved Reviews inside fo the Pull request client for better organization and began initial intigration testing

* Fixing bad recursive function breaking tests

* test fixes

* Add paging support to review comments call

* Fixing recursive function

* Addressing comments from PR

* fixing CI break

* Typo build break

* Fixing Convention Tests

* Adding correct nameof() usage in Ensure

* Small consitancy changes

* Trigger build

* Address PR Comments

* Fixup test naming

* Fix sub client ordering and incorrect URL

* Tidy up comments and remove StringEnum wrapper from Request models as it is only for Response models

* Rename GetReview to Get

* tweak debugger display

* Rework integration tests - implement the easy Get/GetAll ones first...

* Implement integration tests for Create method.
Move helpers to create PR/review into SetupHelper class
Fixed up review status enum to contain correct values
Tests for Approve/RequestChanges currently failing as a user cant approve/request changes on their own PR

* Implement secondary account settings for integration tests and a new [DualAccountTest] attribute for discovery when configured
Change integration test to create PR from the 2nd account, so the main test account is able to perform review actions on the PR

* Add integration tests for Delete, Dismiss and Submit methods
Fixed up API client implementation for delete (was looking for incorrect 201 http status)
Removed unnecessary await/async calls from client implementations that dont need to do anything with the result

* Attempting to add comments as part of a review revealed that we cant use the existing PullRequestReviewCommentCreate class as the API throws a validation error due to the CommitId field
These newer review APIs need a DraftPullRequestReviewComment (that doesnt have a commitId) instead

* add second test account user/password to configure-integration-tests script
2017-08-16 20:50:25 +10:00
Grzegorz Dziadkiewicz 97ae3cb3de Add Pull Request Review Request API. (#1588)
* Add Pull Request Review Request API.

* Add Reactive Pull Request Review Request API.

* Add PullRequestReviewRequestClient tests.

* Add ObservablePullRequestReviewRequestClient tests.

* Fix sub-client property naming.

* Remove redundant model and update PullRequest model.

* Add repositoryId based methods and missing Observable documentation.

* Add missing parameter to PullRequest ctor.

* Add integration tests for PullRequestReviewRequest.

* Upgrade PullRequestReviewRequest integration tests.

* Add integration tests for repositoryId methods and fix url bug.

* Add missing unit tests and fix PR issues.

* Add pagination support for PullRequestReviewRequst.GetAll and tests for it.

* Revert changes on `PullRequestReviewCommentsClientTests.cs`

* Small upgrades - remove unused using and compress property to expression body.

* Revert use of expression body in property.

* Add pagination tests for PullRequestReviewRequest.GetAll.

* Change pagination tests to use 2 users.

* Correct class/file name

* Reword the integration test names for consistency
Move the plumbing to create reviews into CreateTheWorld to clean up the actual tests

* Fix DebuggerDisplay of requested reviewers

* fix reviewRequestToCreate parameter to be consistent
2017-05-14 22:07:57 +10:00
Brandon Everett 155073b138 [WIP] Rename Comment to ReviewComment (#1520)
* obsolete comment and add ReviewComment

* obsolete PullRequest.Comment and change to ReviewComment

* update ObservablePullRequestClient and interface to use ReviewComment

* fixed formatting issues
have Comment return new ReviewComment
2016-12-31 19:21:40 +10:00
zzzprojects 82dfabefa7 Fixing Async Deadlock
Adding missing ConfigureAwait + put on single line await &
ConfigureAwait
2016-10-03 11:24:07 -04:00
Andreia Gaita 9e958bf998 Make Repository Id a long, it's going to grow... 2016-09-15 02:15:11 +02:00
aedampir@gmail.com 44b0f4039d ID -> Id 2016-07-17 16:29:32 +07:00
aedampir@gmail.com b9e82086b5 burned <returns> tags 2016-07-06 02:27:38 +07:00
Alexander Efremov 3fefc4879e cleared <returns> tags 2016-06-17 05:44:24 +07:00
aedampir@gmail.com 691eded548 modified XML docs
added new overloads
2016-06-16 19:15:20 +07:00
aedampir@gmail.com 6ece0ef037 added new overloads 2016-05-25 13:27:44 +07:00
Sarmad 3f3930253c Pull-Request-Squash-Commit (#1245) 2016-05-20 11:34:41 +03:00
Brendan Forster b751a3e44f cleanup some indenting to make things a bit more readable 2016-04-06 20:17:39 -04:00
Brendan Forster d3c43b77a9 drop unnecessary awaits and specify ConfigureAwait otherwise for other core clients 2016-04-06 20:09:59 -04:00
Brendan Forster 61c9e34a50 bugfix: await on this result to ensure the try-catch works as advertised 2015-12-14 10:57:04 +10:30
Haacked 4fe8e96060 Merge branch 'better-merge-exception-rebased' of https://github.com/elbaloo/octokit.net into elbaloo-better-merge-exception-rebased 2015-12-07 15:13:13 -08:00
Brendan Forster 80719c0033 aaaand format the code 2015-11-04 13:38:51 -08:00
Victor Castillo Escoto 25d39a055e Make new merge exceptions inherit from 'Octokit.ApiException'
Affect 'Octokit.PullRequestNotMergeableException'
and 'Octokit.PullRequestMismatchException'
2015-10-13 19:53:38 -05:00
Victor Castillo Escoto 37c7049f0e Add System.Net namespace used to check for HttpStatusCode in PullRequestClient.Task<PullRequestMerge> Merge(string, string, int, MergePullRequest) 2015-10-09 09:05:19 -05:00
Brendan Forster db57a92a7e sketching out the exception necessary when raising specific merge exceptions 2015-10-09 09:05:17 -05:00
Haacked eb5d14cfdc Organize usings and remove unused 2015-08-04 21:12:37 -07:00
Henrik Andersson 78e76be7d9 Update clients 2015-03-24 00:11:52 +10:00
Henrik Andersson edb2a9362e Add sort and direction to PullRequestRequest 2015-03-19 09:57:20 +10:00
Henrik Andersson f730846713 Add method for getting all files for a PR 2015-03-19 09:57:19 +10:00
Haacked f83ad06c85 Add extension method for common checks against the HTTP status 2015-01-04 19:15:46 -08:00
Valeriu Caraulean 20e4a8ca7e Trivial fixes in XML comments
And added an #if around using in RequestParameters.cs (worth having a
look, may have implications when building on different platforms)
2014-07-12 00:09:48 +02:00
Gabriel Weyer 7223518239 Trying to get things to work again 2014-05-03 11:56:36 +10:00
Gabriel Weyer be4c1192b3 Merge 2014-05-03 10:37:59 +10:00
Paul Betts c18b156fab Rename IConnection methods 2014-04-30 21:30:45 -07:00
Brendan Forster 1231b794b1 bugfix for PR commits having different shape to regular commits 2014-02-18 20:20:37 +11:00
Brendan Forster 93b8b27a0b updated docs 2014-02-18 19:48:51 +11:00
Brendan Forster e93a24ea5c 💄 2014-02-18 15:39:06 +11:00
Brendan Forster 9dc4de5ff5 finish up the <return> results, singular <summary> 2014-02-03 19:28:52 +11:00
Josh Sullivan 07faec840e Killed with the hottest fire. 2014-02-03 18:58:48 +11:00
Josh Sullivan 14236cd926 Merged now returns bool based on the request http response 2014-02-03 18:58:45 +11:00
Josh Sullivan 0db0307aa9 Pull request commit list now implemented / tested
Renamed and enhanced existing Merged tests.
2014-02-03 18:58:41 +11:00
Josh Sullivan 9d3f7581e7 Implemented Merged? functionality / tests
Bugfix for building the merge api url, as well.
2014-02-03 18:41:28 +11:00
Josh Sullivan fddae25b6f Implemented pull request merge functionality 2014-02-03 18:31:08 +11:00
Josh Sullivan e3bf6ed0c9 Stubbed out the API for pull requests.
Still missing pull request files, commit lists and merge checks.
2014-02-03 18:30:59 +11:00
Gabriel Weyer a01857ecd5 Implemented pull request review comments API 2013-11-17 08:34:23 +11:00