Commit Graph

73 Commits

Author SHA1 Message Date
Sam Cackett
46787d2cb8 Add DeleteBranchOnMerge option for repositories (#2268) 2021-02-13 16:29:09 -04:00
KarolGrzesiak
62c0b1fe08 Update Repository to include WatchersCount (#2182) 2020-06-07 14:11:56 -03:00
Brendan Forster
45bc5eced7 autofix tests based on feedback from xunit analyzers (#1997) 2019-09-16 19:46:40 -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
Ryan Gribble
9a606b777c handle when no languages exist in a repository (#1831) 2018-06-29 14:51:01 +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
5e89232521 Release v0.25 - She'll be Comin' Round the Mountain (#1656)
* Run `build -Target FormatCode` to fixup whitespace etc

* Fix delete release asset integration test

* Fix repository fork test

* Fix pagination test for PR Review Request

* First cut of release notes

* update release notes

* Update release notes

* include links to contributors

* Add breaking changes/advisories section

* Tidy up formatting

* Tidy up wording
2017-08-23 21:27:15 +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
d8c549c5cc update the code to instantiate RepositoryUpdate with reponame param and keep the existing property init 2017-03-21 01:33:38 +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
de3e809746 Revert merge method changes for New Repository as it is not supported by the github API
This reverts commit cf4c78c900
2016-10-05 07:52:49 +10:00
Ryan Gribble
cf4c78c900 Add new fields to NewRepository request and update RepositoriesClient.Create() method to specify preview accepts header and fix impacted unit tests
Add integration test for Create Repository with merge method specified
2016-10-05 07:51:34 +10: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
d1b0ff485f add integration tests for Update repository 2016-10-01 23:27:44 +10:00
Ryan Gribble
d03f344fb8 Add integration test to assert new fields are returned (but they arent! Have contact GH support as it seems to be an upstream problem) 2016-09-29 09:47:06 +10:00
Martin Scholz
5b9e23c2fb Fix timeout getting multiple repositories (#1411)
* add test

* [WIP]

* put logic for redirects outside of delegating handler

* change send method

* format code

* reorganized http client adapter

* change HttpClientAdapter

* rework http redirect tests - still an issue with accessing the response.RequestMessage.Content property as it is disposed

* remove some unused lines in httpclientadapter

* Reworked redirect implementation to fully clone http request and re-use it later
Now the skipped test from #874 works!
Also had to fix the new ReturnsRenamedRepository test as the ionide repo was renamed again
2016-08-15 06:57:50 +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
71044722e4 added new integration tests 2016-06-17 19:56:35 +07:00
Brendan Forster
bcda94b8d9 fix impacted tests 2016-06-14 15:34:39 +10:00
Brendan Forster
7e8552dae8 Add ApiOptions overloads to I(Observable)RepositoriesClient (#1337) 2016-06-14 10:15:05 +10:00
Ryan Gribble
acbc3fec00 Update impacted tests to use new Context creation and Delete helper methods 2016-06-08 21:52:18 +10:00
Brendan Forster
921511f8d2 correcting a couple of tests (#1331) 2016-05-29 15:33:23 +09:00
Prayank Mathur
db8738b675 Corrected TheUpdateMethod.EnsureArgumentsNotNull() 2016-03-17 16:38:42 +05:30
Anubhav10
3900e1b15d Issue 1002
The test was working. Unskipped it.
2016-03-09 10:02:09 +05:30
Brendan Forster
31d8a40cc2 link to issues in muted tests 2015-12-14 11:32:38 +10:30
Brendan Forster
27988a6ea8 dealwithit.gif 2015-12-14 11:04:04 +10:30
William Barbosa
64326519ee Changes the way the exception is verified 2015-10-08 20:38:18 -03:00
William Barbosa
2777a4a709 Refactors RepositoriesClientTests
Changes the tests in RepositoriesClientTests to use the new using block
syntax
2015-09-22 23:03:34 -03:00
Brendan Forster
72339c81d1 added tests specific to redirects 2015-06-05 15:59:58 +09:30
Brendan Forster
3859ff3627 the test, it passes 2015-05-31 22:12:22 +09:30
Mordechai Zuber
d83a4bbcbc Octokit.Tests.Integration\Clients 2015-05-19 09:54:08 +03:00
Brendan Forster
446fb1b2c0 needs a bit more pagination 2015-04-23 09:17:08 +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
a94051d6b0 Repository name is required when creating a repo
I was trying to create a repository and I wasn't sure which parameters
were required. Following our philosophy of exposing required parameters
in the constructor, I change the `NewRepository` object to take in a
repository name and to make that property readonly.
2015-03-19 16:25:03 -07:00
Kristian Hellang
def374d253 Nuke GetReadme and GetReadmeHtml 🔥
Closes #750
2015-03-18 21:30:36 +01:00
Brendan Forster
8946b09b04 added a couple of tests 2015-03-06 09:44:50 +09:30
Brendan Forster
181a07b706 Merge pull request #691 from rms81/add-get-all-pub-repos
Fix for issue #686 List all public repositories
2015-03-04 20:45:38 +10:30
rms81
5d7fbe7589 Skip Added 2015-02-25 09:06:40 +00:00
Phil Haack
6b0906e0a8 Merge pull request #714 from octokit/orgs-are-users-too
Added Account.Type support
2015-02-23 17:29:50 -08:00
Brendan Forster
18d7d4d33e this test requires the organization environment variable be set 2015-02-24 10:39:48 +09:30
Brendan Forster
620daa7ea2 introduce Account.Type property to represent whether account is user or organization
- This also changes SearchUsersRequest to use AccountSearchType as this is a slightly
different representation of the user/org role.
 - Added some tests to check existing API usage.
2015-02-24 09:13:22 +09:30
rms81
ee8ed34e9e Add Integration Test for GetAllPublic 2015-02-01 19:05:54 +00:00
Gabriel Weyer
1b1a397a09 RepositoryExistsException has now two constructors (one for account and one for organization) 2015-01-08 17:09:08 +11:00
Brendan Forster
28e8372922 extract helper method for setting up GitHubClient 2015-01-04 10:03:45 +09:30