Commit Graph

27 Commits

Author SHA1 Message Date
Chris Simpson 2f7bd00dd6 feat: Removing accept header previews (#2515) 2022-08-01 09:37:23 -05:00
Brendan Forster 287861e4a7 rewrite the setup of responses to use a standard helper function (#2177) 2020-04-14 11:30:15 -03:00
Brendan Forster 4b0e7255b1 remove all usages of TaskFactory in test suite (#2164) 2020-03-31 16:57:16 -03:00
Brendan Forster 5de5258257 add attribute for tracking preview usage in the codebase (#2128) 2020-03-07 10:40:15 -04: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
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
Martin Scholz 72e30a7f90 Add reactions to issue, commit comment and review payload (#1405)
* add reactions to issue response payload

* add reactions to commit comment payload

* add reactions to review comment payload

* create tests for issue client

* tests for commitcomment client

* tests for pull request review comment

* change observable tests

* simplify strings

* remove unnecessary clients

* change integration tests to retrieve all reaction types

* create integration test for issue comment client

* fix merge conflicts

* fix merge conflicts

* gets tests passing again

* fix some reaction integration tests

* Fixup unit tests wth preview accepts header
Also applied preview header to a couple of repositoryId based calls that were added by another PR

* Fixup unit tests wth preview accepts header
Also applied preview header to a couple of repositoryId based calls that were added by another PR

* Rework reaction payload tests for IssueComments to handle Get, GetAllForIssue and GetAllForRepository calls

* [WIP] reaction payload tests

* Rework reaction payload tests for IssueComments to handle Get, GetAllForIssue and GetAllForRepository calls

* Rework reaction payload tests for Issues client

* Rework reaction payload tests for PullRequestReviews client

* Rework reaction payload tests for CommitComments client

* Revert "[WIP] reaction payload tests"

This reverts commit a6179b0f21a3ddfe36bfd3ae5eafae0e69b52252.
2016-07-08 20:29:08 +10:00
Alexander Efremov 6bea72f990 fixed failed tests 2016-06-17 05:04:21 +07:00
Alexander Efremov 89d13f329e fix failed tests 2016-06-17 04:54:56 +07:00
Alexander Efremov 24fd2923e4 added unit tests 2016-06-17 00:20:21 +07:00
aedampir@gmail.com 473b2c42b3 renamed "Ensures" methods to deliver more consistency in code 2016-05-26 15:15:51 +07:00
aedampir@gmail.com abc80ab868 added unit tests 2016-05-26 14:39:11 +07:00
aedampir@gmail.com afd865b91a added new overloads 2016-05-26 13:48:31 +07:00
aedampir@gmail.com d0c8e82453 Red Tests were fixed
Unused 'using' directive were removed.
2016-04-18 12:46:13 +07:00
aedampir@gmail.com 7f5d446ea8 Redundant commas in object initializers were removed. 2016-03-24 23:12:12 +07:00
Brendan Forster 80719c0033 aaaand format the code 2015-11-04 13:38:51 -08:00
Mordechai Zuber 8079f3012c O-PullRequestReviewComments, O-PullRequest 2015-05-19 11:35:08 +03:00
Henrik Andersson 189ae42c3a Update tests 2015-03-24 00:12:54 +10:00
Haacked 7fdbbf0ae3 Merge branch 'master' into haacked/api-response-refactor
Conflicts:
	Octokit.Tests/Reactive/ObservableMilestonesClientTests.cs
	Octokit.Tests/Reactive/ObservablePullRequestReviewCommentsClientTests.cs
	Octokit.Tests/Reactive/ObservablePullRequestsClientTests.cs
	Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs
	Octokit/Octokit-Mono.csproj
	Octokit/Octokit-MonoAndroid.csproj
	Octokit/Octokit-Monotouch.csproj
	Octokit/Octokit-Portable.csproj
	Octokit/Octokit-netcore45.csproj
2015-01-18 12:35:17 -08:00
Kristian Hellang 21ca33817d Fixed failing tests 2015-01-06 00:27:16 +01:00
Haacked ff3506f3e8 Make some of the IResponse properties readonly 2015-01-04 19:13:32 -08:00
Haacked 4c8bab20eb IApiResponse no longer inherits IResponse 2015-01-04 18:58:53 -08:00
Haacked 09d5c236a4 Rename IResponse<T> to IApiResponse 2015-01-04 18:33:48 -08:00
Brendan Forster fe4e7cceec fixing impacted observable client 2014-07-11 09:45:20 +09:30
Gabriel Weyer 7223518239 Trying to get things to work again 2014-05-03 11:56:36 +10:00
Gabriel Weyer 921353dd4b Replaced public properties by readonly fields with a public getter and cleaned code 2013-11-24 19:06:59 +11:00
Gabriel Weyer a01857ecd5 Implemented pull request review comments API 2013-11-17 08:34:23 +11:00