* 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>
* 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>
* 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>
* add active lock reason to PR
* update docs
* refactor: extract lock and unlock from IIssuesClient
create ILockUnlockClient so both IIssuesClient and IPullRequestClient can
access lock and unlock methods.
* refactor LockUnlock for reactive clients
* Update doc to include lock unlock sample code
* Use Assert.Null to check null value in test
Co-authored-by: notauserx <notauserx@users.noreply.github.com>
* 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
* Update issue comments client to allow returning comments 'since' a specific date
* Update observable issue comments client to allow returning comments 'since' a specific date
* Add test cases to cover newly added methods
* Add pagination to *CommitCommentReactionsClient
* Add unit tests for *CommitCommentReactionsClient
* Add integration tests for *CommitCommentReactionsClient
* Add pagination to *IssueCommentReactionsClient
* Add unit tests for *IssueCommentReactionsClient
* Add integration tests for *IssueCommentReactionsClient
* Add pagination to *IssueReactionsClient
* Add unit tests for *IssueReactionsClient
* Add integration tests for *IssueReactionsClient
* Add pagination to *PullRequestReviewCommentReactionsClient
* Add unit tests for *PullRequestReviewCommentReactionsClient
* Add integration tests for *PullRequestReviewCommentReactionsClient
* Remove rogue using statement and whitespace
* Add null check tests for GetAll with repositoryid overload
* 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
* 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
* 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
* 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!
* 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