Commit Graph

309 Commits

Author SHA1 Message Date
Victor
6c43183837 fix: comment id model update to long instead of int
* #2927: comment id model update to long instead of int

* #2927: code review fixes (1)

* #2927: code review fixes (2)

* #2927: comment id model update to long instead of int: unit tests fix

* #2927: code review fixes

* Fixed most names of parameters

---------

Co-authored-by: Victor Vorobyev <victor@myrtle-sa.com>
Co-authored-by: Brian C. Arnold <brian.arnold@spiderrock.net>
2024-06-10 08:12:08 -05:00
skyemcleman
41d5d240ec feat: Add create organization invitation via email (#2895)
* Add API request to create org invitation

* Add tests for create org invitation

* Add IObservable API request to create org invitation

* Add tests for IObservable create org invitation
2024-03-11 13:02:31 -05:00
Thomas Lem
c2178a4ea2 feat: Adds cancel invitation
* Added api request to cancel an organization invitation

* Added tests

---------

Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
2024-02-13 15:11:14 -06:00
Slyck Lizzie
2a87dd0802 [Feat] Add Repository Autolinks Client (#2868) 2024-02-01 13:56:26 -06:00
Dirty Gooback
f9c5b6992a [feat]: Implement Actions OIDC Client (#2828)
implement actions OIDC client

Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
2024-01-02 16:04:07 -06: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
Dirty Gooback
335632b08c [feat]: Add RenameBranch method to RepositoryBranchesClient (#2799)
* added RenameBranch method to RepositoryBranchesClient

* revert forced version

* tabs -> spaces :(

---------

Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
2023-10-30 14:59:37 -07:00
Michael Jolley
fdd93c8428 [feat]: Adding repository variables 2023-10-09 15:24:05 -05:00
Tom Longhurst
958bc5f1f8 [feat]: SDKs for ActionsArtifacts APIs 2023-09-25 14:16:41 -05:00
Alexander Sklar
da5c4d7d3c [FEAT]: Adds codespaces APIs 2023-06-16 12:26:39 -05:00
gitasaurus
3c82ff359c [FEAT] Adds support for enterprise audit logs 2023-05-09 10:28:58 -05:00
Matisse Hack
e032611e54 Add method to get a single runner group (#2706)
* Add method to get a single runner group

* Fix tests

* Fix typo

* Add observable methods
2023-05-05 15:32:16 -07:00
Liam Neville
2d4ba4e891 [FEAT] Self-hosted runners and Self-hosted runner groups APIs 2023-04-28 13:03:15 -05:00
Lian Duan
ddb66ed712 [FEAT] Implement GetAllOrganizationMembershipsForCurrent (#2654) 2023-03-10 12:42:42 -06:00
notauserx
891015c39f update models with updated permission enum (#2633)
* update models with updated permission enum

* add suppress message attribute

* update integration tests

* refactor: new and legacy update teams endpint

* refactor: add new delete team endpoint

* use TeamPermission on NewTeam

* use updated delete on team context dispose

* add permission enum for team response object

* refactor: remove legacy suffix from method names

* introduce permissions object on Team

* refactor: rename enum to TeamRepositoryPermission

* fix formatting

* change Permission to string to match api specs

* add TeamRepository

* add CheckTeamPermission endpoint support

* fix convention tests

* update comments on TeamRepository props

* add two new endpoints in TeamsClient

* refactor: rename ApiUrl for TeamPermission

* fix test

* implement methods for new endpoints

* add the integration tests

* fix spelling

* update comments

* refactor: rename method name

* fix: add end tag for remarks

* refactor: remove unused method param

* fix docstring comment

* the unit tests are in finally

* add docs for teams api

* split CheckTeamPermissions into two methods

* Update ObservableTeamsClientTests.cs based on review

Co-authored-by: Keegan Campbell <me@kfcampbell.com>

* add cref to legacy update and delete endpoints

* remove editorconfig file

* Update Octokit.Tests/Clients/TeamsClientTests.cs

Co-authored-by: Keegan Campbell <me@kfcampbell.com>

* remove unused line

* rename variable based on review

* rename prop to match constructor param

* add comment to explain TeamPermission enum values on update

Co-authored-by: notauserx <notauserx@users.noreply.github.com>
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
2023-01-20 10:48:00 -08:00
Zachary Cook
84d44dc566 [FEAT] Adds support listing branch/pr per commit 2022-12-08 08:27:50 -06:00
Martin Costello
978093803c [bug] Fix API URLs for GitHub Enterprise Server (#2626)
* Fix API URLs for GHES

Fix leading slashes causing API calls to fail when used with GitHub Enterprise.

* Fix tests

Fix tests that should have been updated in the previous commit.

Co-authored-by: Keegan Campbell <me@kfcampbell.com>
2022-11-30 16:00:45 -08:00
Martin Costello
8f01a31694 [feat]: Adds Actions workflow API clients 2022-11-23 09:35:58 -06:00
semyon-p
b0e02e9d2e [feat]: Added Environments API - GetAll list only feature 2022-11-17 11:49:37 -06:00
Keegan Campbell
131ba87e3f Replay #2221: Implement GitHub Actions Secrets API for both Organization and Repository (#2598)
* created the interface and models for the repository secrets client

* created a repository actions client to sit between repository and secrets for future extensibility

* created the repository secret client and supporting objects to enable data transfer

* created object for create or update secret body and made fixes to pass unit tests

* created repository action unit tests

* created unit tests for RepositorySecretsClient

* removed set from secrets interface

* fixed docs and added observable actions client

* added Actions to repository client

* created IObservable repository secrets client

* fixed property in wrong interface
fixed wrong Ctor unit test

* created repository decrets reactive tests and clients

* created organization actions and scerets classes and made them available through the oprganizations client

* fixed intellisense text

* removed uneeded getall call after return type change

* created organization secret client and classes to support it

* created the observable org secrets client and fixed a typo in a method name

* added more ensure checks

* removed unused xml doc setting

* created the unit tests for the organization secrets client
fixed broken unit test for repository secrets client

* created observable organization actions and secrets client unit tests

* added sodium.core to the integration tests to test secret creation

* fixed keyid type

* added actions client integration test classes (empty since the class currently doesn't have any native methods)

* fixed deserialization issue

* changed property name for deserialization issues

* added doc for repoid on orginzation secrets url generator

* created integration tests for repository and organization secrets

* changed how return occurs for setting list of repos for secret

* fixed some names and removed reset org name

* created integration tests for observable org secrets client

* removed  default org value

* created the integration tests for the observable repository secrets client

* removed default owner project value

* fixed unit tests

* Update links to new docs site

* Update doc links to new docs site

* Update docs links to new docs site

* Fix doc link to point to new docs site

* Update links to new docs site

* Update doc links to new docs site

* Update docs links

* Update docs

* Update docs

* Update doc links

* Update docs

* Update doc links

* Update doc links

* Update doc links

* updated documentation links in actions and secrets clients

* Update Octokit/Models/Response/SecretsPublicKey.cs

Removing line for consistency.

Co-authored-by: Thomas Hughes <iamhughes@github.com>

* Update Octokit/Models/Response/RepositorySecret.cs

Removing line for consistency.

Co-authored-by: Thomas Hughes <iamhughes@github.com>

* set default owner and repo

* switched to using the Helper.Organization from a ORG constant set at the top of the file

* swapped out variable at top of file for the Helper.Organization property

* switched to helper method to create new repositories

* Protected setters --> private setters in response models

* RepositorySecret needs protected setters

Co-authored-by: Mike Tolly <mike.tolly@takeda.com>
Co-authored-by: Thomas Hughes <iamhughes@github.com>
Co-authored-by: mptolly-takeda <61791994+mptolly-takeda@users.noreply.github.com>
2022-10-20 14:59:31 -07:00
Riccardo De Agostini
fa29939f50 Use correct methods and URL to generate release notes (#2592) 2022-10-07 13:06:53 -05:00
Chris Simpson
063e85e4db Adding credential-authorization get endpoints (#2556) 2022-09-12 14:08:59 -05:00
Chris Simpson
cf9db5fc46 feat: Adds Packages and Package versions APIs (#2551) 2022-09-08 09:59:46 -05:00
Fredi Kats
5386257a3f feat: implement getting failed org invites (#2533) 2022-08-09 09:10:12 -05:00
Chris Simpson
651d9818c7 ci(build): Fixes a number of warnings for a cleaner build (#2529)
* Fixing a number of warnings for a cleaner build

* Removing extra Summary slashes
2022-08-08 10:20:37 -05:00
Chris Simpson
6892df80fe feat: Adds codeowners errors endpoint (#2512) 2022-07-27 13:53:02 -05:00
Chris Simpson
251c3a26fc feat: Adds 4 new Reaction delete routes and obsoleting existing routes (#2494) 2022-07-22 11:28:30 -05:00
Chris Simpson
8b5a7fceaf feat: Fixing master > main in integration tests (#2489) 2022-07-20 17:17:10 -05:00
Chris Simpson
13ba84b060 fix: Trims trailing slashes from user passed paths that appear before query string parameters (#2486) 2022-07-15 14:50:35 -05:00
tasadar2
8e6bcd1e49 [FEAT] Added enterprise pre-receive hooks client (#2375) 2022-07-11 09:59:24 -05:00
Lee Boynton
23a91a492e Add method to check if repo vulnerability alerts are enabled (#2453) 2022-07-06 11:29:21 -05:00
Chris Simpson
f317f9dadc Support for IsTemplate and Create Template from Repository (#2331) 2022-06-30 15:20:45 -05:00
Union Palenshus
77213430f1 Adding support for the Device Flow Oauth authentication pattern (#2310)
Adding support for the Device Flow Oauth authentication pattern
2022-04-20 16:29:10 -05:00
Sean Killeen
57fe2ce193 Add repository topics support (#2246) 2021-02-25 10:40:25 -04:00
Jose de Jesus Medina
66a6781584 spellcheck round 2 (#2259) 2020-10-06 09:47:36 -03:00
Brendan Forster
d02a230172 some tidy up before cutting the release (#2201) 2020-06-07 18:25:51 -03:00
Martin Alex Philip Dawson
8d3e7b3c2c add support for organization web hooks (#1884) 2020-06-07 16:53:20 -03:00
Cédric Luthi
69d118230d Add support to get raw file content as byte[] (#2151) 2020-04-12 13:22:35 -03:00
Brendan Forster
43d1b8b60d remove deprecated code for old Check Suites API (#2130) 2020-03-05 09:14:11 -04:00
Brendan Forster
f96885654f add metadata to each client action (#2124) 2020-03-04 21:10:38 -04: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
Steve Desmond
e9409e0cb5 Update IssueEvent ID field from int to long (#2060) 2020-01-19 18:54:46 -04:00
Jose de Jesus Medina
5eb9f06b24 Fix typos in comments (#2040) 2019-10-30 13:51:20 -03:00
Henrik Andersson
8b263cdc0f Add get/update/delete methods for organization memberships (#2014) 2019-10-21 20:08:58 -03: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
d166a8c142 Implement changes to Checks API for Annotations models and re-request endpoint (#1857)
* Attempt to handle both old and new annotations models so we support the changes on github.com as well as still support GHE2.14
add Path and AnnotationLevel fields
flag Filename and WarningLevel as deprecated/obsolete
also flag BlobHref as deprecated on NewCheckRunAnnotation
Adjust ctors to handle new and legacy field options

* adjust tests to remove use of obsoleted fields

* fix a couple of other tests using unrelated obsoleted fields

* Mark check suite Request method and request object as obsolete

* Add Rerequest() method to normal and observable clients
Add unit and integration tests

* add StartColumn and EndColumn as optional fields for CheckRunAnnotation response and NewCheckRunAnnotation request

* remove integration tests for Request() method as they no longer work on github.com anyway
2018-09-03 20:52:03 +10:00
Stanley Goldman
5f1421bd34 Additional GitHub Apps APIs (#1854)
* Adding functionality to query installations for user

* Rename method

* Adding installation methods

* Adding tests

* Adding observable client methods

* Adding InstallationResponse

* Adding GitHub Apps Installations Client

* Tweaking doc comments

* Undoing unintentional changes and cleaning up

* Reordering functions in clients to keep the same code look and feel

* Making sure all methods are documented with their authentication requirements

* Syntax error

* Renaming methods and tests

* Renaming property

* Test cleanup

* XmlDoc comment fixups and consistency

* rename User -To-Server auth methods from xxxForUser to xxxForCurrentUser

* rename GitHubAppsInstallationsClient to GitHubAppInstallationsClient to be consistent with single/plural naming conventions

* make method order match the order on github docs site

* tidy up usings

* correct implementation of GetALlInstallationsForCurrent method to be consistent

* Add missing unit and integration tests for ObservableGitHubAppsClient

* fix renamed method in observable tests

* Add EnsuresNonEmptyArguments tests and fixup asserts in GitHubAppsClient

* Add tests for new Observable client methods and fixup Null/Empty asserts in Observable client

* change non paginated call to call through to other method but with ApiOptions.None

* add unit tests for observable client and fixup errors they found

* add integration tests for new GitHubAppsClient methods, fixed an incorrect route that the tests found!

* add integration tests for extra methods on observable client

* add integration tests for new clients GitHubAppInstallationsClient and ObservableGitHubAppInstallationsClient

* deprecate renamed method properly, to avoid breaking change
2018-09-03 20:36:33 +10:00
Ryan Gribble
ac86133f18 Implement renaming and deprecation of GitHub App Installation Access Token route (#1860)
* change existing CreateInstallationToken method to use new /app/installations route, and provide an obsolete CreateInstallationTokenPreview() method still using the old route, in order to support GHE 2.14

* suppress obsolete usage warning in tests

* add unit test for new method

* add new method to observable client

* fix routes in tests

* remove CreateInstallationTokenPreview() as it isnt actually required
2018-09-03 20:05:36 +10:00
Ryan Gribble
c5d5df5b08 Implement Check Runs API (#1847)
* Add CheckRunEventPayload

* add CheckRunEventPayload into all the right places

* forgot integration tests for RepositoryId methods (+1 squashed commits)

Squashed commits:

[b2445bf3] Implement Create CheckRun methods for normal and observable clients including unit and integration tests and xmldoc comments

* Implement Update CheckRun method
Refactored NewCheckRun to inherit CheckRunUpdate since they share all fields except HeadSha

* Implement GetAllForReference method

* Implement GetAllForCheckSuite method

* tweak XmlDoc to match github documentation

* Implement Get method

* Implement GetAllAnnotations
Moved CheckRunAnnotation model from Request to Common and added a parameterless ctor, since it is now a response model as well as a request model

* Split common CheckRunAnnotation model into separate response and request models due to different field and ctor requirements
Rename other CheckRun request sub classes to be consistent with NewCheckRunAnnotation (eg NewCheckRunOutput, NewCheckRunImage, etc)

* add title field back into CheckRunAnnotation

* fix up XmlDocs

* fix mutable response property - hooray for convention tests!
2018-07-19 08:29:12 +10: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