Commit Graph

17 Commits

Author SHA1 Message Date
Chris Simpson
8b5a7fceaf feat: Fixing master > main in integration tests (#2489) 2022-07-20 17:17:10 -05:00
Chris Simpson
f317f9dadc Support for IsTemplate and Create Template from Repository (#2331) 2022-06-30 15:20:45 -05:00
Brendan Forster
8cd0b341dd Begin implementation of Enterprise ManagementConsole API, redux (#2010)
* Initial implementation of ManagementConsole - maintenance mode

* Add environment var support for management console password for integration tests

* Add reactive client and unit tests

* Update some xmlDoc

* I think this is a better way to setup the underlying baseUri on IConneciton, to achieve managemet console access rather than requiring a specific GitHubClient that cant call normal API's
Instead, the management client methods can check the base Url and if it contains /api/v3/ they can set their relative endpoint Uri to include a leading "/" which will cause the /api/v3/ to be removed.

* Update EnterpriseClient.cs

Fix xml comments

* Update IEnterpriseClient.cs

Fix xml comments

* Still trying to get the xmDoc perfect, thanks app veyor :)

* XmlDoc'ing my way to success

* Add specific test attribute for management console tests

* check chronic string empty/null

* Use helper's password field in test

* Tidy up maintenance mode tests by using a context/destructor to manage the initial/end state of maintenance mode

* make internal and tidy up URL concatenation

* move GHE endpoint fixup inside ApiUrls methods

* Rework request object to be the correct structure so SimpleJsonSerializer can be used to serialize it.  Remove MaintenanceDate class and just pass in the Date/string for when
Still need to use UrlFormEncoding rather than json in the POST body though...

* Create abstract base class for FormUrlEncoded parameters (similar to existing RequetParameters) and inherit from it in UpdateMaintenanceRequest

* Fix maintenance context logic - destructor should always turn maintenance OFF regardless of initial requested state

* Fix xml comment

* Fix Xml comment

* Those pesky xml comments!

* Fine, I give up!

* Fix string.Format

* fix bad rebase

* fix failing convention tests

* restore missing whitespace

* writing some docs

* some edits

* edit
2019-09-22 15:09:56 -03:00
Ryan Gribble
e93646c9f1 Implement Nested Teams preview API changes (#1682)
* Add new AcceptsHeader
add Parent field to Team
add ParentId field to NewTeam and UpdateTeam
update Create Edit and Delete Team methods to use preview header

* Implement new API call GetAllChildTeams()

* Implement GetAllChildTeams for ObservableClient

* add integration test for observable client

* Add pagination tests for GetAllChildTeams

* Add NestedTeams preview header to all the API calls that use it

* Update tests for accepts header

* Add accepts header to observable client calls

* Fix DELETE implementation to use correct overload

* Fix tests - parent and child teams must be visibility Closed whereas the default if not specified is Private

* make sure all tests are flagged as [OrganizationTest]

* Make sure Update tests change the parent of the team

* Update new methods with NesterTeams preview API header and adjust tests
2017-10-04 16:21:42 +10: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
Ryan Gribble
046c5a36cc Rename client.User.Keys to client.User.GitSshKey
Mark client.User.Keys as [Obsolete]
2016-06-09 06:44:28 +10:00
Ryan Gribble
3977765796 Tweak GpgKeyContext inline with recent change made to other helper contexts 2016-06-09 00:03:07 +10:00
Henrik Andersson
77b04efbdd Fixes as per PR review comments 2016-06-08 22:55:41 +10:00
Henrik Andersson
7171535d8d Add integration tests for UserGpgKeysClient 2016-06-08 22:55:41 +10:00
Ryan Gribble
7fa1faa5c4 integration helper context classes now work against github.com or github enterprise, by using the IConnection used to create the context, to delete it in Dispose()
update CreateContext extension methods to pass in the IConnection
2016-06-08 21:52:16 +10:00
maddin2016
6e03a81e22 rename enterprise team context methods 2016-06-08 10:31:07 +02:00
maddin2016
71f992a478 rename EnterpriseTeamContext to TeamContext 2016-06-08 10:15:41 +02:00
aedampir@gmail.com
eb5687d721 Incosistent modifiers declaration order was fixed.
Unused usings were removed in GithubClientExtensions.cs
2016-04-22 17:40:22 +07:00
Ryan Gribble
047a78361a Transfer methods from SshClient to UserKeysClient
Add unit and integration tests and CreatePublicKeyContext() helper method
2016-02-23 06:58:08 +10:00
Ryan Gribble
c56588d394 Add integration tests and context helper for creating/destroying users on GitHub Enterprise during integration tests 2016-02-22 21:04:13 +10:00
Ryan Gribble
1f13001fd8 Change the QueueLdapSync calls to use Post<T>(uri) with no body/data 2016-02-12 09:37:33 +10:00
William Barbosa
8eba9a6a9c RepositoryContext class and Extension methods 2015-09-22 23:02:17 -03:00