Commit Graph

49 Commits

Author SHA1 Message Date
Nick Floyd 6e72fdaa59 feat: Drop support for .NET 4.6 (#2521) 2022-08-04 12:12:49 -05:00
Chris Simpson 2f7bd00dd6 feat: Removing accept header previews (#2515) 2022-08-01 09:37:23 -05:00
Lee Boynton 23a91a492e Add method to check if repo vulnerability alerts are enabled (#2453) 2022-07-06 11:29:21 -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 327020750f add convention test for preview APIs (#2154) 2020-03-18 08:52:50 -03:00
Ryan Gribble 101522070d Release v0.31 - Check yo' self! (#1851)
* Fix whitespace/formatting with /FormatCode build option

* Update release notes

* fix a few failing integration tests

* Adjust required fields on UpdateCheckRun and NewCheckRun request models and fix tests
Tidy up field accessors and XmlDoc comments

* Update date in ReleaseNotes

* Keeping request models simple (avoid inheritance) - makes it easier when we move to generated models
2018-07-21 18:12:42 +10:00
William Quelho Ferreira 74dc51a6f5 [WIP] Fixes #1718 Implement Repository Transfer functionality (#1813)
* Add "transfer repository" accept header

* Create RepositoryTransfer class

This will be used to send the POST request to initiate the transfer.

* Create Ensure method to check for empty or null arrays

* Change arg name in Ensure for nonempty arrays

array -> value

* Add xmldoc for ArgumentNotNullOrEmptyArray

* Create Transfer method in IRepositoriesClient

* Implement Transfer method in RepositoriesClient

* Fix typo in xmldoc for Transfer

* Add <returns> to Transfer xmldoc

* Create Transfer method in IObservableRepositoriesClient

* Implement Transfer in ObservableRepositoriesClient

* Add DebuggerDIsplayAttribute do RepositoryTransfer

* Add unit tests for RepositoryTransfer constructors

* Change TeamId property type to IReadOnlyList<int>

* Rewrite DebuggerDisplay property into something more succint

* Make new Ensure method into an IEnumerable<T> checker

* Add XmlDoc to RepositoryTransfer

* Tweaks to first ctor XmlDoc

* Create basic unit tests for Transfer

* Create ApiUrls.RepositoryTransfer

* Use ApiUrls.RepositoryTransfer to get URI in Transfer

Previous implementation used wrong URI

* Start implementing RepositoriesClientTests.TheTransferMethod

* Implement org -> user transfer integration test

* Implement user -> org transfer integration test

* [WIP] Implement user -> org transfer with teams

Implementation doesn't work, API usage seems correct.

* Mark transfer user -> org w/ teams integration test with FIXME

* Add second end point URI to ApiUrls

* Add other Transfer overload to RepositoriesClient for other end point

* Create unit tests for other Transfer endpoint

* Add overload to IRepositoriesClient

* Add integration tests for overload

* Reorganize unit tests for TheTransferMethod

* Rename id to repositoryId

* Reorganize unit tests for RepositoriesClientTests.Transfer

* Add second endpoint to IObservableRepositoriesClient

* Add XmlDoc to second Transfer endpoint

* Add XmlDoc to second Transfer endpoint in RepositoriesClient

* Reimplement "with teams" integration tests using TeamContext

* Rename integration test for consistency

* Add asserts to actual ownership transfer

* Rename RepositoryTransfer.TeamId property to TeamIds

* Add awaiit to ThrowsAsync in RepositoriesClientTests

* Put await in right places for unit tests

* Add Ensures for Transfer method in RepositoriesClient

* Add XmlDoc to ApiUrls.RepositoryTransfer with repo id

* Update XmlDoc for RepositoryTransfer constructor and teamIds property

* Rename currentOwner to owner

* Add Ensure guards to ObservableRepositoriesClient.Transfer methods

* Add unit tests for ObservableRepositoriesClient
2018-06-24 22:33:33 +10:00
Jozef Izso 270356b5b4 Fixes #1586 - Repository license API (#1630)
* Implement GetLicenseContents() method for getting repository's license info

* Request License Preview API for calls that return Repository object.

* Add missing accept headers to observable methods for ObservableRepositoriesClients

* fix impacted unit tests
2018-01-19 19:43:46 +10:00
Ryan Gribble b7ad64d92f Remove obsolete members (#1622)
* remove obsolete "Branches" methods from RepositoryClient (all were previuosly moved to RepositoryBranchesClient)

* Remove obsolete DeploymentStatus fields

* Remove obsoleteMergePullRequest.Squash parameter

* Remove obsolete request ctor

* Remove tests

* Not sure how I missed these test references
2017-06-27 08:50:31 +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
eriawan 32aa4e7443 Supply the call to ctor with anyreponame string parameter for unit test 2017-03-21 00:58:49 +07:00
Ryan Gribble 3c818934b8 Release v0.24 - A Sight For Sore Eyes (#1539)
* Add release notes and bump version to 0.24

* run "build FormatCode" to fix up whitespace/formatting issues

* Fix failing Ssh key tests due to "validation exception".  This key must be in use on github (under another user, most likely from these tests failing).  Changed to a new SSH key and tweaked tests to reduce chance of a key being created and not destroyed

* Assignee and Assignees cant both be specified on NewIssue.  We missed this one in the PR.  Marked Assignee as [Obsolete] and fixed tests to use Assignees

* Fix a couple of Reactions tests that were calling the wrong client methods

* Fix timeline tests - looks like the response class has changed shape a bit, it now has an Issue object in the payload and Id field isnt present (leaving Id field there in case other timeline events do use it)

* Fix some following tests that require the test user to follow more than 1 other user

* Unskip these Event tests now because apparently they work!

* add breaking changes notes

* Update ApiErrorMessageSafe to return null for empty and whitespace strings (#1540)

* return null if ApiError.Message is empty or whitespace

* Uncomment test, which now passes

* update release notes to include PR1540

* Add "Bot" AccountType, was causing a deserialization exception when running the integration test "SearchForExcludedLanguage" (#1541)

* Update to include PR1541

* add bullets to make release notes easier to read

* markup additional code mentions in notes

* Fix grammar

fields => field
2017-01-17 18:56:55 +10:00
Brendan Forster feb756182f Merge pull request #1477 from TattsGroup/repo-merge-options
Add repository settings to configure PR merge methods
2016-10-05 09:49:41 +11:00
Ryan Gribble 3409ae11ff Add new ctor to PublicRepositoryRequest taking "since" parameter as a long, and obsolete the old ctor that uses an int
Update tests to pass long datatype
2016-10-03 20:45:43 +10:00
Ryan Gribble 60537e1281 Update RepositoriesClient.Get() method to specify preview accepts header and fix impacted unit tests 2016-09-29 09:46:35 +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
aedampir@gmail.com c32ea329a4 added unit tests 2016-06-17 19:08:00 +07:00
Brendan Forster 7e8552dae8 Add ApiOptions overloads to I(Observable)RepositoriesClient (#1337) 2016-06-14 10:15:05 +10:00
aedampir@gmail.com d0c8e82453 Red Tests were fixed
Unused 'using' directive were removed.
2016-04-18 12:46:13 +07:00
Prayank Mathur 43f6cfe28b Added ApiOption overloads to methods on IRepositoryCommitsClient (#1247)
* Added ApiOptions overloads for RepositoryCommitClient methods

* Added overloads to Reactive clients

* Integration tests in progress

* Integration test addition in progress

* More integration tests added

* Added Ensure things

* Minor changes

* Minor changes

* Few changes

* Tried to fix errors

* Tried to fix errors

* Fixed a few things

* Fixed integration tests

* Tidying up

* Added public keyword

* Added unit tests for GetAll() in normal and reactive methods

* Minor changes

* Changed the class name

* Fixed the unit test
2016-04-10 17:28:01 -04:00
Ryan Gribble 83bb3e37eb Fix "repositories" Uri's by removing leading slash - this caused the base address to have the /api/v3/ removed when talking to GHE??? 2016-03-29 13:04:28 +10:00
Brendan Forster 6bedf1ee9b just a bit of code cleanup 2016-02-02 10:01:16 +10:30
Mordechai Zuber b1917364cc Fixes #1035
Replaces #1042
2016-01-03 12:00:36 +02:00
Ryan Gribble 053248dec6 Added EditBranch integration test for Octokit.Reactive project 2015-12-19 19:58:11 +10:00
naveen 3bab0f890f Included the Fact attribute back with the skip referring to the issue. 2015-12-16 08:15:29 -05:00
naveen 289ebf1742 muting the test 2015-12-15 19:03:09 -05:00
Brendan Forster 80719c0033 aaaand format the code 2015-11-04 13:38:51 -08:00
Brendan Forster 6ab19de051 what is tests 2015-04-23 10:18:10 +09:30
Brendan Forster c344dfe7c2 Revert "removed GetAllPublic overload due to paging issue and parameters clobbering"
This reverts commit 26a8bf0e81.
2015-04-23 09:09:17 +09:30
Brendan Forster 26a8bf0e81 removed GetAllPublic overload due to paging issue and parameters clobbering 2015-04-22 12:20:42 +09:30
Henrik Andersson 68840e317f Making the since parameter required
Adding 💄 `Task.FromResult` to tests
2015-04-07 07:15:14 +10:00
Henrik Andersson 818f730a6c Add tests 2015-03-23 23:23:08 +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
Gabriel Weyer 9f4df781c6 Ported changes for GetAllContributors from IRepositoriesClient to IObservableRepositoriesClient 2014-12-13 12:11:34 +11:00
Timothy Haagenson de56f0ba6d reactive unit tests
reactive unit tests
2014-07-09 10:53:06 -05:00
Paul Betts d731f1bd97 More jacked up tests 2014-04-30 21:47:34 -07:00
Paul Betts 1c8ac1d32a Fix up ApiExtensions 2014-04-30 21:31:52 -07:00
Peter MacNaughton d12a609b33 Added missing methods on IObservableRepo...
sitoriesClient
Added unit tests for new methods.
2014-02-10 00:11:38 -07:00
Haacked 3c3febaf77 Remove use of .Wait() from tests 2013-11-05 16:02:33 -08:00
Haacked de2f978c1d Fix broken lukewarm test
Synce we just return the task, this method is called immediately. That's
fine for now. This unit test is just here to document the current behavior
so we know when it changes. It changed!
2013-10-31 10:06:50 -07:00
Haacked ad4be39ea3 Clean up the Octokit.Reactive namespaces
Fixes #84
2013-10-18 22:26:36 -07:00
Haacked 14ad942ea8 RateLimit class encapsulates rate limit headers
Added a RateLimit class to encapsulate pulling rate limit information
from the headers. This is now exposed by ApiInfo as well as the
RateLimitExceeededException. That way these two classes are not grabbing
the same information in different ways which we were doing before.
2013-10-18 14:49:00 -07:00
Haacked 3f5e561111 Add tests to verify current observable behavior
Right now, our observable methods are semi-cold. They don't make the
request until subscribed, but multiple subscriptions get the same
result. This is the way that Octokit.cocoa works.
2013-10-17 09:49:48 -07:00
Haacked 04958410ea Flatten the observables for repositories 2013-10-16 18:54:06 -07:00