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.
* add failing integration test for timestamp
* make the test pass by encoding the value
* generalize this pattern for now
* update tests to reflect change in date formatting
* 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