78 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
Seedysoft
615dee9c30 Fix Pacakges typo (#2917) 2024-05-13 15:50:00 -07: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
Yankai
66587ee0d1 [feat] Add Response caching 2023-02-07 11:35:54 -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
Sean Killeen
05aa951d41 Remove /en slug in docs.github.com links (and stop VSCode from formatting on save) (#2573) 2022-09-20 14:35:13 -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
Grzegorz Dziadkiewicz
04c9a9a0de Update MiscellaneousClient to ApiClient approach and add pagination support to GetAllLicenses. (#1716)
Co-authored-by: Brendan Forster <brendan@github.com>
2020-02-25 18:48:00 -04: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
Thomas Hughes
81635c6dfe Fixes #1750, changing description of productInformation param for clarity (#1751)
* Updated GitHubClient.cs XML Docs to match dev docs.

* Updated Connection.cs XML Docs to match dev docs.

* Updated ProductHeaderValue.cs XML Docs to match GitHub dev docs.

* Updated EnterpriseProbe.cs XML Docs to match GitHub dev docs.

* Updated GitHubClient.cs XML Docs to match GitHub dev docs, corrected grammar issue.

* Updated Connection.cs XML Docs to match GitHub dev docs, corrected grammar issue.

* Updated ProductHeaderValue.cs XML Docs to match GitHub dev docs, corrected grammar issue.

* Removed my tabs, replaced with spaces to match format.

* Removed tabs again

* There seems to be some kind of bug where tabs are being shown though my local editor show none, so I'm submitting a bug to GitHub.com and editing in-browser to fix.

* Update GitHubClient.cs

* There seems to be some kind of bug where tabs are being shown though my local editor show none, so I'm submitting a bug to GitHub.com and editing in-browser to fix.

* Update Connection.cs

* There seems to be some kind of bug where tabs are being shown though my local editor show none, so I'm submitting a bug to GitHub.com and editing in-browser to fix.

* Change a couple of tabs to spaces

* tabs to spaces

* tabs to spaces
2018-01-31 22:03:51 +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
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
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
Ivandro Ismael
97dee1e6d8 Deployments tidy up [WIP] (#1497)
* [RepositoriesClient] - Fix github deployments url.

* [ReposirotiesClient] - Fix Collcaborators => Deployments in comments.
2016-11-21 21:44:15 +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
maddin2016
06fdace3b4 create classes for standalone reaction client and CommitCommentReaction 2016-05-27 15:17:56 +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
Devesh Khandelwal
71e7cc2055 Correct spelling: docmentation -> documentation 2016-03-22 12:34:19 +05:30
Ryan Gribble
e7187cbb0d Merge remote-tracking branch 'upstream/master' into enterprise-adminstats 2016-01-16 14:01:48 +10:00
Robert Pethick
4b16ea6a29 Move Release to IRepositoriesClient from IGitHubClient 2016-01-04 17:04:47 +00:00
Robert Pethick
ffc0b35608 Switch GitDatabase->Git on IGitHubProvider 2015-12-24 17:01:37 +00:00
Ryan Gribble
c9026e4723 add base Enterprise client to GitHubClient 2015-12-24 15:05:34 +10: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
Brendan Forster
177290473e by default you want the GitHub API 2015-05-08 18:26:13 +09:30
Brendan Forster
6d933679f3 fleshing out some of IGitHubClient 2015-01-03 09:30:03 -08:00
Gabriel Weyer
be4c1192b3 Merge 2014-05-03 10:37:59 +10:00
Haacked
d7a69e20d7 Implement OAuth Web Flow
Provide methods to make it easy for developers to implement the
web flow.

https://developer.github.com/v3/oauth/#web-application-flow
2014-04-19 16:01:35 -07:00
Tim Sneed
3909498437 Internalize ProductHeaderValue
What Haacked, PaulBetts, and Shiftkey suggested
2014-02-28 06:33:44 -06:00
Brendan Forster
221ce7fee4 Merge branch 'master' into shiftkey/convention-tests-part-deux
Conflicts:
	Octokit/Clients/RepositoriesClient.cs
2014-02-20 11:14:13 +11:00
Haacked
dae6cb2ca6 Implement RepositoryExistsException
This exception is thrown when we try to create a repository but it
already exists on the server.
2014-02-18 21:03:29 -08:00
Brendan Forster
4da060b1e2 moved Statistics under Repository as per the docs 2014-02-18 21:54:35 +11:00
Amy Palamountain
f926187cc8 Added Statistics Client 2014-02-16 17:04:07 +13:00
Peter MacNaughton
ed462e7cd6 Merge branch 'master' into deployments_client 2014-02-02 11:16:19 -07:00
Brendan Forster
2a814dd981 removed duplicate IGitHubClient.Tree property 2014-01-22 11:36:41 -08:00
pmacnaughton
b147a70b3c Merge branch 'master' into deployments_client 2014-01-20 10:29:19 -07:00
Brendan Forster
997706173f eliminated IGitHubClient.Blob property 2014-01-14 12:26:52 -08:00
pmacnaughton
c8d99c30f4 Implemented DeploymentsClient and unit tests 2014-01-10 15:11:02 -07:00
Gabriel Weyer
25b2ab5164 Merge 2013-12-30 12:40:26 +11:00
Haroon
78bc6c7a99 added search to IGitHubClient 2013-12-24 21:25:25 +00:00
Gabriel Weyer
a88ef55825 Merge 2013-12-03 10:10:00 +11:00
Gabriel Weyer
95b82b6e5b Merging 2013-11-24 19:24:38 +11:00
Simon Cropp
011bfa729a Merge remote-tracking branch 'upstream/master' 2013-11-21 08:52:50 +11:00
Gabriel Weyer
a01857ecd5 Implemented pull request review comments API 2013-11-17 08:34:23 +11:00