* 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 release notes
* Fix failing integration test
* Run FormatCode build task to tidy up whitespace
* Remove "UnkownUser" from release notes contributors
* 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
* Added StringEnum<TEnum>
* Added tests
* Make sure the serializer can work with StringEnum
* Use StringEnum for EventInfo.Event
* Add convention test to assert that all Response models use StringEnum<> to wrap enum properties
* Add Stringnum<> to all response types failing convention test
* Handle StringEnum to Enum conversion when Issue response model populates IssueUpdate request model
* Fix unit test
* Refactor SimpleJsonSerializer to expose the DeserializeEnum strategy so it can be used in StringEnum class
* Need to expose/use SerializeEnum functionality too, so we use the correct string representation of enum values that have custom properties (eg ReactionType Plus1 to "+1")
* fix unit tests, since the string is now the "correct" upstream api value
* Add a couple of tests for the Enum serialize/deserialize when underscores, hyphens and custom property attributes are present
* Compare parsed values for equality
* add convention test to ensure enum members all have Parameter property set
* update test to cover implicit conversions too
* this test should work but fails at the moment due to magic hyphen removal in deserializer causing a one way trip from utf-8 to EncodingType.Utf8 with no way to get back
* (unsuccesfully) expand event info test to try to catch more cases of unknown event types
* fix broken integration test while im here
* Fixed build errors after .NET Core merge
* Value -> StringValue, ParsedValue -> Value
* Don't allow StringValue to be null
* Ignore enums not used in request/response models
* Added ParameterAttribute to almost all enum values
* Ignore Language enum
* Fix failing tests
* Fix milestone sort parameter and tests
* whitespace
* fix milestone unit tests
* Fix StringEnum.Equals ... This could've been embarrassing!
* Change SimpleJsonSerializer Enum handling to only use `[Parameter()]` attributes (no more magic removal of hyphen/underscores from strings)
* Tidy up this integration test while im here
* Only test request/response enums in convention test
* Keep skipping Language
* Remove unused method
* Remove excluded enum types
* Removed unnecessary ParameterAttributes
* Remove unused enum
* Add StringEnum test for string-comparison of two invalid values
* Bring back IssueCommentSort and use it in IssueCommentRequest
This reverts commit 38a4a291d1476ef8c992fe0f76956974b6f32a49.
* Use assembly instead of namespace for Octokit check
* Add failing test to reproduce the issue where only the first enum paramter/value was added to the cache
* Fix deserializer enum cache to include all enum members rather than only the first member encountered
* Use a static SimpleJsonSerializer in StringEnum
* Remove serializer instance in StringEnum
* Add some documentation on StringEnum<TEnum>
* Fix parameter value to resolve failing integration test
* Add release notes and bump version to 0.24
* run "build FormatCode" to fix up whitespace/formatting issues
* Fix failing Ssh key tests due to "validation exception". This key must be in use on github (under another user, most likely from these tests failing). Changed to a new SSH key and tweaked tests to reduce chance of a key being created and not destroyed
* Assignee and Assignees cant both be specified on NewIssue. We missed this one in the PR. Marked Assignee as [Obsolete] and fixed tests to use Assignees
* Fix a couple of Reactions tests that were calling the wrong client methods
* Fix timeline tests - looks like the response class has changed shape a bit, it now has an Issue object in the payload and Id field isnt present (leaving Id field there in case other timeline events do use it)
* Fix some following tests that require the test user to follow more than 1 other user
* Unskip these Event tests now because apparently they work!
* add breaking changes notes
* Update ApiErrorMessageSafe to return null for empty and whitespace strings (#1540)
* return null if ApiError.Message is empty or whitespace
* Uncomment test, which now passes
* update release notes to include PR1540
* Add "Bot" AccountType, was causing a deserialization exception when running the integration test "SearchForExcludedLanguage" (#1541)
* Update to include PR1541
* add bullets to make release notes easier to read
* markup additional code mentions in notes
* Fix grammar
fields => field
Previously, SimpleJsonSerializer.MapClrMemberNameToJsonFieldName
special cased the name "Links" since while that was the name of the
property in the object model, in JSON "_links" was used instead.
It turns out that there was an additional problem, where GitReference
wants to expose as Repository, but the name in JSON responses is
"repo". Instead of simply adding another special case to
MapClrMemberNameToJsonFieldName, we update the implementation of the
serializer to allow [Parameter(Key = "some_name")] to denote what name
we'd like to use for the field in the JSON object when we serialize.