* Add support for /mets/public_keys/<keyType>
* "files.insertFinalNewline": false
* revert and make setttings.json change csharp only
* formatting
* remove final new line
---------
Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
* Fixes ids for Releases, Collaborators, and Contributors
* updates the interface for releases
* update the obverable release client
* updates ids from int to long based on GH database schema
* converts a test condition to use the proper type
* updates generated paging and observable classes
* Create a GitHub App from a manifest
* Add missing InstallationPermissions
* observable and tests
* Remove ManualRoute on Observable route
---------
Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
When serializing the `NewDeployment` type, the `Payload` is serialized as an escaped string because JSON.NET doesn't know it's meant to be JSON.
This causes a problem when you call the API because the Payload is supposed to be a JSON dictionary that's just part of the overall payload. It's not supposed to be an escaped string.
That's why the JSON deserializer fails on it. Not only that, any deployments created using the current Octokit.net will create an invalid payload.
This PR fixes it by changing the type of `Payload` to a dictionary. THIS IS A BREAKING CHANGE, but the old behavior was broken so it forces a new correct behavior.
Fixes#2250
PullRequestCommit Author and Committer fields were mistakenly typed with
Committer when they should be of type User.
Previously the types of properties were:
* `PullRequestCommit.Author/Committer`: `Committer`
* `Commit.Author/Committer`: `Committer`
Correct types should be:
* `PullRequestCommit.Author/Committer`: `User`
* `Commit.Author/Committer`: `Committer`
These fields always fail to deserialize in the API calls but produce no
errors, only objects with default values.
* 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
* add Archived to ProjectCard response
add Archived to ProjectCardUpdate
update integration tests
* Add ProjectCardRequest model and update GetAll calls to use it
Update unit tests
Update integration tests
* skip_branch_with_pr still ends up building the branch on the initial push, so let's only build master instead
* add node_id to Deployments payloads (Deployment and DeploymentStatus and Account/User/Organization)
* add node_id to gist responses
* add node_id to Git Blob
* add node_id to Git Commit response
* add node_id to GitReference response
* add node_id to everything that inherits GitReference
* add node_id to Issue
* add node_id to IssueComment/IssueEvent
* add node_id to Label
* add node_id to Milestone
* add node_id to Project/ProjectCard/ProjectColumn
* add node_id to Reaction
* add node_id to Release/ReleaseAsset
* add node_id to Team
* add node_id to Repository.RepositoryContributor/RepositoryInvitation/RepositoryTag
* add node_id to Commit related responses
* Add node_id to PullRequest related responses
* Add node_id to any response models it was found to be missing, based on auditing integration test responses
* remove unused test variable that was using a response ctor
* fix tests that need to handle node_id now
* Committer is a request object as well as response, so make nodeId optional
* fix test
* Add "transfer repository" accept header
* Create RepositoryTransfer class
This will be used to send the POST request to initiate the transfer.
* Create Ensure method to check for empty or null arrays
* Change arg name in Ensure for nonempty arrays
array -> value
* Add xmldoc for ArgumentNotNullOrEmptyArray
* Create Transfer method in IRepositoriesClient
* Implement Transfer method in RepositoriesClient
* Fix typo in xmldoc for Transfer
* Add <returns> to Transfer xmldoc
* Create Transfer method in IObservableRepositoriesClient
* Implement Transfer in ObservableRepositoriesClient
* Add DebuggerDIsplayAttribute do RepositoryTransfer
* Add unit tests for RepositoryTransfer constructors
* Change TeamId property type to IReadOnlyList<int>
* Rewrite DebuggerDisplay property into something more succint
* Make new Ensure method into an IEnumerable<T> checker
* Add XmlDoc to RepositoryTransfer
* Tweaks to first ctor XmlDoc
* Create basic unit tests for Transfer
* Create ApiUrls.RepositoryTransfer
* Use ApiUrls.RepositoryTransfer to get URI in Transfer
Previous implementation used wrong URI
* Start implementing RepositoriesClientTests.TheTransferMethod
* Implement org -> user transfer integration test
* Implement user -> org transfer integration test
* [WIP] Implement user -> org transfer with teams
Implementation doesn't work, API usage seems correct.
* Mark transfer user -> org w/ teams integration test with FIXME
* Add second end point URI to ApiUrls
* Add other Transfer overload to RepositoriesClient for other end point
* Create unit tests for other Transfer endpoint
* Add overload to IRepositoriesClient
* Add integration tests for overload
* Reorganize unit tests for TheTransferMethod
* Rename id to repositoryId
* Reorganize unit tests for RepositoriesClientTests.Transfer
* Add second endpoint to IObservableRepositoriesClient
* Add XmlDoc to second Transfer endpoint
* Add XmlDoc to second Transfer endpoint in RepositoriesClient
* Reimplement "with teams" integration tests using TeamContext
* Rename integration test for consistency
* Add asserts to actual ownership transfer
* Rename RepositoryTransfer.TeamId property to TeamIds
* Add awaiit to ThrowsAsync in RepositoriesClientTests
* Put await in right places for unit tests
* Add Ensures for Transfer method in RepositoriesClient
* Add XmlDoc to ApiUrls.RepositoryTransfer with repo id
* Update XmlDoc for RepositoryTransfer constructor and teamIds property
* Rename currentOwner to owner
* Add Ensure guards to ObservableRepositoriesClient.Transfer methods
* Add unit tests for ObservableRepositoriesClient
* Added a convention test to detect a model constructor exposing all properties
* add ctors to classes where they are missing
* rename ctor parameters that dont match properties
* add missing parameters to existing ctors
* add specific PunchCard ctor to allow mocking, and update test to resolve call ambiguity
* Added base class properties to the convention test
Added member exclusion attribute
* Updated newly offending classes
2 excludes and 2 ctors
* rename exclusion attribute to be a bit shorter
* Added support for Milestone filter in SearchIssuesRequest
* Fixed some styling issues to match with the style of the existing code
* Wrap milestone value with double quotes as milestones can contain spaces
* Allow milestone filter to contain double quotes
* Ability to search by milestone exclusions
* Moved the EscapeDoubleQuotes method to StringExtensions
* add deserializer tests for nullable enums, StringEnum and nullable StringEnum properties
* Fix deserializing nullable structs by using the underlying type when nullable
* StringEnum<T> should behave like an enum, returning default(T) when it is uninitialised/null/blank
* Don't allow null to be passed into StringEnum ctor - if it needs to be null then it should be declared as nullable
* fix expected json
* move logic to determine if property is a StringEnum<T> into helper function
* serializer needs to treat StringEnum<T> specially by serializing the enum value according to existing serializer strategy (parameter attributes and so on)
* remove fallback to default(T)
* add test to assert ctor throws exception when null passed in
* remove test for default(T) fallback behaviour
* Fix exception in serializer test - StringEnum property must be initialized otherwise an exception is thrown when attempting to serialize
* Dont allow empty strings either