Commit Graph

54 Commits

Author SHA1 Message Date
awedist
7d54cb0d85 feat: Implement dependency review and dependency submission APIs (#2932)
Implement dependency review and dependency submission

Co-authored-by: André Pereira <Andre.LuisPereira@Student.HTW-Berlin.de>
2024-06-14 17:03:11 -05:00
Dylan Morley
a2a4f09c24 [FEAT]: Adding Copilot for Business support (#2826)
* initial tests and implementation of Copilot for Business client API

* updated billing settings documentation

* renames and refactors - clarity and simplified

* using context to ensure license clean up

* extra documentation and used ApiOptions instead of custom class

* implemented observable clients

* Fixing convention issues

* renaming for clarity

---------

Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
2024-01-02 15:57:14 -06:00
Alexander Sklar
da5c4d7d3c [FEAT]: Adds codespaces APIs 2023-06-16 12:26:39 -05:00
Keegan Campbell
bf6678543f Remove instances of lower-case h (#2655) 2023-01-12 11:56:44 -06:00
Martin Costello
8f01a31694 [feat]: Adds Actions workflow API clients 2022-11-23 09:35:58 -06:00
Chris Simpson
3c05db4065 Splitting out the misc client into separate clients as per current documentation (#2574) 2022-09-20 14:37:49 -05:00
Chris Simpson
cf9db5fc46 feat: Adds Packages and Package versions APIs (#2551) 2022-09-08 09:59:46 -05:00
notauserx
4d46d5fb41 docs: update code docs for SetRequestTimeout (#2520) 2022-08-03 10:17:48 -05:00
Ryan Gribble
4df21a61de Implement Check Suites API (#1846)
* Check run request models

* Check Run response models

* Check run clients

* Check run ApiUrls and AcceptHeaders

* Pack it all together for now

* Add missing accept headers to connection calls

* Standardize class definitions

* Standardize function names

* Merge ICheckRunAnnotationsClient into ICheckRunsClient

* Properly organize clients

* Cleanup CheckRun response model

* Fix slug check run urls

* Add checks installation permission

* Use StringEnums where appropriate

* Cleanup check run output models

* Flesh out CheckSuite model

* Delete CheckRunsList

* Remove a sealed, fix some line endings

* Adding check suite models

* Skeleton check suite client implementation

* Add check suite ApiUrls

* Flesh out check suites client

* Add parameterless CheckRun constructor

* Add DebuggerDisplay to checks models

* Add observable checks interfaces

* Add return values to POST and PATCH check clients

* Fix some check suite client return values

* Skeleton reactive checks implementation

* Implement observable checks clients

* Remove rogue tabs

* Add CheckSuiteEventPayload

* Add CheckRunEventPayload

* Add DebuggerDisplay attributes to checks API payloads

* Properly nullables check suite/run conclusion

* Add CheckSuiteEventTests

* Fix checks client accessor naming issues

* Add missing Text field to CheckRunOutput

* Marks CheckRunUpdate's conclusion as nullable

* Fix reactive checks client naming

* Today I learned DateTimeOffset is a struct

Makes CheckRunUpdate's DateTimeOffsets nullable

* Modify check clients to put slug version before repo id version

* Add nullable to CheckRun.CompletedAt

* Implement parameterless ICheckRunsClient.GetAllForReference and GetAllForCheckSuite

* Add missing RequestParameters base to CheckSuiteRequest

* Implement checks API GetAll methods

* Bring parity to Reactive checks clients

* fix project settings to get GitHubApp helper working again

* remove un-needed InstallationId setting - provide helper method to find installation based on owner

* fix up request object ctors based on required/optional parameters

* fix up request object ctors based on required/optional parameters

* add some initial integration tests for CheckSuites and CheckRuns including some helper methods

* Add test for Request CheckSuite
Fix Request CheckSuite to use correct Uri
Fix Request CheckSuite return type as it doesnt return an object
Fix CheckSuiteTriggerRequest ctor to make required fields mandatory

* simplify Get CheckSuite test to not require as much data setup

* Add test for CheckSuite GetAllForReference

* Add test for CheckSuite UpdatePreferences

* rename response models

* rename CheckSuitesList to CheckSuitesResponse and use as response to the GetAll calls

* Fix tests

* Fix observable

* fix model convention tests

* remove CheckRuns so we can focus only on CheckSuites for now

* naming things is hard

* oh so many unit tests for CheckSuites methods

* make client mockable

* Fix issue with .Max() when no results returned

* fix request parameter names

* add Xml doc comments

* Add XmlDoc comments to request/common model objects

* rename class to match usage

* tidy ups

* xmldoc for observable clients

* fix method order

* add observable unit tests and get them passing

* Add Observable unit tests and get them passing

* add observable integration tests

* tidy up ApiUrl method name

* whitespace/using tidy ups

* Ensure CheckSuiteEventPayload class is handled in deserializer and add to activity test

* add response model XmlDoc comments

* missed one xmldoc

* add xmldoc to NewCheckSuite request and remove HeadBranch property as it doesnt exist anymore

* add some extra check suites integration tests
2018-07-14 20:01:41 +10:00
Itai Bar-Haim
5ffc96995f Adding initial support for GitHub Apps. (#1738)
* Added authentication using bearer token.

* Added Installation and AccessToken clients.

* Added new clients to Reactive project

* added support for DateTime serialized as FileTime

* added support for StatusEventPayload

* added support for StatusEventPayload

* Added test for StatusEventPayload and fixed serializer to return that event payload type.

* WIP - added ApplicationClient and related Api Urls.

* Continued implementing Installations support.

* Fixing build (WIP)

* fixed build

* added Account property to Installation. prefer nameof(x) over literal "x".

* fixed according to code review.

* fixed build.

* switched Installation ID from int to long.

* added Permissions and Events properties to Installation.

* added documentation to Application and Installation properties in IGitHubClient.

* wip - added tests to new clients

* wip - fix build

* wip - fixed build.

* added InstallationsClient tests.

* added integration test for InstallationsClient.

* changes requested in code review.

* add Get method for App

* Create GitHubApp response model instead of re-using existing Application response model

* add Get method to observable client

* fixed build (both locally and failed test).

* Fixed documentation and added some missing XML docs.

* added DebuggerDisplay to StatusEventPayload

* updated XML docs and added some missing bits. prefer nameof(x) over literal "x".

* Add xml comments to AccessToken response model and use DateTimeOffset rather than DateTime

* Tidy up XmlComments and make consistent across client and observable client and interfaces

* fixup unit tests to independently verify preview header

* Implement GetInstallation method

* revert commits unrelated to GitHubApps - these can be done on a separate PR if required

* this extra authenticator class doesnt appear to be used anywhere

* undo project file change as it doesnt appear to be necessary

* Revert "Merge remote-tracking branch 'remote/GitHubApps' into GitHubApps"

This reverts commit c53cc110b8d807f62fdfeaa7df19e1532d050007, reversing
changes made to 0c9e413d420a4725738644ea5b13af6ec102d456.

* Revert "Revert "Merge remote-tracking branch 'remote/GitHubApps' into GitHubApps""

This reverts commit 02d52b8adf814b6945c60cb59a907a8cd34b1ce7.

* add XmlDoc comments to response models and flesh out installation permissions

* name AcceptHeaders member consistently

* accidentally lost changes to Credentials.cs

* Enhance Intergation test framework to handle GitHubApp settings and discoer tests appropriately
Get code ready for GitHubJWT nuget package but for now just hardcode a JWT in ENV VAR
Add 1 integration test for each method and ensure they are working!

* fixed compiler warnings.

* Added support for Installation=>Id field that arrives in a Pull Request Event payload.

(See the last field in the sample JSON of https://developer.github.com/v3/activity/events/types/#pullrequestevent)

* Change integration test project to netcoreapp2.0 so we can use GitHubJwt nuget package in integration tests

* First cut at some GitHubApp doco

* update mkdocs config

* Moved the Installation property to ActivityPayload, so it's available in all payloads.

This feature is not undocumented, unfortunately, but valid:
https://platform.github.community/t/determining-which-installation-an-event-came-from/539/11

* Split Installation to Installation and InstallationId, and added a comfort method for gaining its AccessToken.

* fixed InstallationId CreateAccessToken to receive IGitHubAppsClient. added (and fixed) docs.

* reverted object-oriented style comfort method and it's docs.

* update all test projects to netcoreapp2.0

* tweak build configs to use 2.0.3 SDK

* also need to update cake frosting build to netcoreapp2.0

* tweak docs some more

* fix convention test failures

* test projects still had some old runtime parts in them!

* travis osx image needs to be at least 10.12 for .NET Core 2.0

* shell script might need the same argument tweak for cake

* more doc tweaks

* Make sure compiler warning output isnt somehow causing Linux and OSX builds to fail

* moar logging for linux/OSX builds

* stop sourcelink on linux/OSX builds to see if that is the problem

* set verbosity to detailed for the dotnet build step

* try new sourcelink and list out remotes

* is travis being weird with git clone?

* SourceLink may be defaulting to true on CI server so explicitly set it as false rather than omitting it

* detailed is a bit too verbose for travis, try normal

* turn sourcelink back on for Linux/OSX

* fix compiler warning

* Try SourceLink.Create.CommandLine instead of SourceLink.Create.GitHub

* CliToolReferences did not update to latest versions

* remove debug origin info

* turn off msbuild output

* go back to SourceLink.Create.GitHub!

* time diff between dev PC and API causes issues if specifying a full 600 second token

* handle extra date format that Installation end point now returns

* field needs to be protected in order to be deserialized

* provide even more buffer for client vs server clock drift

* Update to latest GitHubJwt reference

* go back to SDK 1 since SDK 2 is having sporadic travisCI faliures in TestSourceLink build step

* get appveyor working

* update sourcelink back to latest, and use SDK 1.04 (runtime 1.0.5)
2018-04-16 20:42:23 +10:00
Itai Bar-Haim
4e804f61a6 Prefer using nameof(x) over literal "x" (#1781)
* updated XML docs and added some missing bits.

* prefer nameof(x) over literal "x"
2018-03-07 20:43:10 +10:00
Ryan Gribble
ed1feb625a Release v0.28 - Get to the Chopper!!! (#1709)
* Update release notes

* fix whitespace
2017-11-06 21:38:15 +10:00
Philippe Miossec
c8ff57b24c Add possibility to configure GitHubClient timeout (#963) (#1693)
* Add possibility to configure GitHubClient timeout (#963)

A first attempt to fix the problem describe in #963 by adding a possibility
to extend the default timeout value (100s)
that is too short to be able to post assets in github release.

* Rename to SetRequestTimeout
Make comments consistent
2017-10-29 10:51:37 +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
Ryan Gribble
9d8e8ae8af Remove obsolete items - SshKey
- SshKeysClient
- SshKey
- SshKeyInfo
- SshKeyUpdate
2016-07-16 22:46:42 +10:00
Ryan Gribble
2cc2ccda62 Remove obsolete items - GitHubClient
- Release
- Notification
- GitDatabase
2016-07-16 22:46:41 +10:00
lrz-hal
831ff1cf31 Add observable reactions client 2016-05-29 14:07:37 +02:00
Devesh Khandelwal
73d321da93 Refactor: Pull out Migrations client from Enterprise.
Following the API sidebar structure, the migrations client is pulled out
and put into another Migration client.
2016-05-20 19:10:22 +05:30
Ryan Gribble
09ebe007b7 Add unit test for ObservableMiscellaneousClient
Fix observable's constructor (obsoleting old constructor) to make it consistent with the other API clients
2016-04-03 22:20:02 +10:00
Ryan Gribble
e7187cbb0d Merge remote-tracking branch 'upstream/master' into enterprise-adminstats 2016-01-16 14:01:48 +10:00
Robert Pethick
bfb0e1bc88 Accidentally didn't push one file... 2016-01-04 17:41:15 +00:00
Robert Pethick
29f31e34bc Update ObservableGitHubClient and ObservableRepositoriesClient to match 2016-01-04 17:37:09 +00:00
Ryan Gribble
a2c8771ff4 Reactive - dont forget to Init the Enterprise client in GitHubClient ctor! 2015-12-27 01:35:13 +10:00
Ryan Gribble
dc1a03bc3a Add Enterprise to Reactive GitHubClient 2015-12-27 01:29:53 +10:00
Robert Pethick
ffc0b35608 Switch GitDatabase->Git on IGitHubProvider 2015-12-24 17:01:37 +00:00
Brendan Forster
80719c0033 aaaand format the code 2015-11-04 13:38:51 -08:00
Mark Taylor
b2c7e1c2a7 Chnage LastApiInfo to GetLastApiInfo with cloned version 2015-08-16 21:27:26 +01:00
Mark Taylor
f8ee4f94a1 WIP checkin for getting last ApiInfo object 2015-07-31 10:35:51 +01:00
Gabriel Weyer
f23ddf81f9 Finalized integration testing for review comments 2014-05-04 10:46:35 +10:00
Haacked
9e0fb886ca Implement observable oauth client
Rx will never die
2014-04-22 08:39:30 -07:00
Brendan Forster
705f0948d3 updated properties on IObservableGitHubClient 2014-02-18 10:52:02 +11:00
Brendan Forster
c6b0ea7357 renamed IObservableBlobClient to IObservableBlobsClient 2014-02-18 10:44:36 +11:00
Kristian Hellang
ae23a2ae7a Fixed minor namespace and whitespace issues 2013-12-01 23:42:04 +01:00
Kristian Hellang
c4f6c6d19d Added observable clients for gist and gist comments 2013-12-01 23:18:40 +01:00
pltaylor
a91104c3e9 Merge Master
Again.
2013-11-14 19:43:07 -05:00
pltaylor
59441ed030 Implement Observable Tree client and refactor names 2013-11-11 08:45:48 -05:00
pltaylor
16e20c51ba Add blob client to ObservableGithubClient 2013-11-06 19:44:00 -05:00
pltaylor
f8dfd4a582 Add way to get to ObservableEventsClient 2013-11-05 19:05:58 -05:00
John Nye
ede12b9e27 Create GitDatabaseClient and ObservableGitDatabaseClient 2013-11-01 22:10:48 +00:00
Perry Taylor
46e9a57443 I was concentrating on different white spaces.
And it was right in front of me:)
2013-10-30 21:39:35 -04:00
Perry Taylor
eac14ae72e Fix whitespaces 2013-10-30 21:34:17 -04:00
Perry Taylor
ff71007bf6 Add Simple constructors 2013-10-30 21:26:56 -04:00
Haacked
a98b53a246 Add reactive notifications client 2013-10-19 17:10:00 -07:00
Haacked
ad4be39ea3 Clean up the Octokit.Reactive namespaces
Fixes #84
2013-10-18 22:26:36 -07:00
Haacked
abde37c576 Flatten the observables for authorizations 2013-10-16 18:54:11 -07:00
Haacked
c446c79094 Flatten the observables for releases 2013-10-16 18:54:11 -07:00
Haacked
8b2e3d1944 Flatten the observables for SSH keys 2013-10-16 18:54:08 -07:00
Haacked
05255d7236 Flatten the observables for organizations 2013-10-16 18:54:07 -07:00
Haacked
04958410ea Flatten the observables for repositories 2013-10-16 18:54:06 -07:00
half-ogre
6f3fa81789 move internal stuff to .Internal namespace 2013-10-08 15:14:06 -07:00