Commit Graph

30 Commits

Author SHA1 Message Date
Maxim Lobanov 0074e76a8f add missed events (#2101) 2020-02-18 09:28:51 -04:00
Brendan Forster 28892df03d some cleanup of the project (#2063) 2020-01-23 14:51:00 -04:00
Jose de Jesus Medina 5eb9f06b24 Fix typos in comments (#2040) 2019-10-30 13:51:20 -03:00
Henrik Andersson 311e89a5e9 Add missing issue event types (#2024)
* Add 'transferred' event type

* Add missing force push event. Fixes https://github.com/octokit/octokit.net/issues/2025
2019-10-07 21:19:07 -03:00
Matt Richardson 3147ddd694 Handle event ids greater than int32.maxvalue (#1940)
Fixes https://github.com/octokit/octokit.net/issues/1939
2019-02-19 21:16:30 +10:00
Ryan Gribble 101522070d Release v0.31 - Check yo' self! (#1851)
* 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
2018-07-21 18:12:42 +10:00
Ryan Gribble 23b25f5922 add GraphQL Node ID's to response models (#1806)
* 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
2018-06-29 15:41:50 +10:00
Ehsan Mirsaeedi 8442073a0a A missing event state: comment_deleted (#1818)
* A missing event state: comment_deleted

Adding support for the comment_deleted event status.

* Add two new Event Status: Marked & Unmarked duplicates

* Update EventInfo.cs
2018-06-20 22:35:57 +10:00
Kristian Hellang 5ee4d64046 Add StringEnum to handle unknown enum values returned from API (#1595)
* 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
2017-06-25 19:29:57 +10:00
Mickaël Derriey 73feecefb3 Change response models 'Url' properties from Uri to string (#1585)
* Add convention test to ensure 'Url' properties are of type string

Closes #1582

* Change 'Url' properties from Uri to string

Global Find/Replace FTW!

* fix compilation errors in the integration tests project

* Extend 'Url' properties type check to request models

* Stick to convention tests naming convention

* Remove unused using directives in models

Changing from `Uri` to `string` means the `using System;`
directive was not needed anymore in some files

* Update exception message wording

* empty commit to trigger a new build - hopefully Travis passes

* add convention test to ensure request models have Uri 'Url' properties

* make request models 'Url' properties Uri

fix typo in convention test name

* revert some request models 'Url' properties as `string`

see https://github.com/octokit/octokit.net/pull/1585#issuecomment-297186728

* Change test so that all model types must have 'Url' properties of type string

 - Filter test input to only get types which have 'Url' properties
 - Merge response and request model types tests into one
 - Unparameterize the exception since we only check for the string type now

* Fix string.Format tokens

If this PR doesn't get rebased, it'll be my wall of shame FOREVER!

* and then it's even more embarrassing when the commit message says rebased but you really meant squashed

* Remove exclusion of `Release` from request models
2017-04-30 22:19:39 +10:00
Linda Naughton eb10aae74f Adding RemovedFromProject and other missing EventInfoState types. (#1591)
* Adding missing review types to event info.

* Fixing whitespace.

* Reword `BaseRefChanged` comment

* Adding missing event types.
2017-04-30 02:03:40 +10:00
Ryan Gribble a936184cff response enums can be camelcase as underscores are removed in the deserializer 2017-03-16 06:42:54 +10:00
Ryan Gribble 31bfc5c730 Found another new event type! 2017-03-11 11:57:59 +10:00
Ryan Gribble 3a1e4b806f Fix failing tests by adding 2 new (undocumented) EventInfoState values 2017-03-11 11:32:54 +10:00
Linda Naughton eeb98c7fcd Add Missing Event Types (#1536)
* Adding missing review types to event info.

* Fixing whitespace.

* Reword `BaseRefChanged` comment
2017-01-13 17:58:00 +10:00
Henrik Andersson 23d9310133 Implement Issue Timeline preview API (#1435)
* Implement Issue Timeline preview API

* Add DebuggerDisplay to response models

* Rename method

* Add Observable Issue Timeline client

* Add that missing property thing

* Add teh comments

* Added unit tests

* Fix method names

* Add missing event type enum and API preview accept header

* Add integration tests for async client

* Pass in API preview header

* Add observable integration tests

* Unbreak the broken tests...

* Remove unnecessary usings

* Add missing events

* Fix API URLs

* Add overloads for using repository Id instead of owner/repo and paging

* Add tests for repository id overloads

* Add paging tests

* I'm clearly a bit rusty about this test thing here...

* Missed a check for null argument

* Added missing XMLDocs
2016-08-08 07:51:07 +10:00
Mordechai Zuber 44304ca70b use string per recommended style 2015-12-16 21:23:36 +02:00
Haacked 694e09970b Remove extraneous commas 2015-08-04 21:20:09 -07:00
Haacked eb5d14cfdc Organize usings and remove unused 2015-08-04 21:12:37 -07:00
Darren Camp c6812d1c41 Fix for issue #738
Added Unsubscribed value to the EventInfoState enumeration
2015-03-12 08:37:44 +08:00
Jan Ove Skogheim 015ecb97de Revert https://github.com/janovesk/octokit.net/commit/4d2bc143b305e65d59ed8d8404f6e1b1e5858dbb. The parameter attribute only works for serialization, not deserialization. 2015-02-25 20:32:26 +01:00
Jan Ove Skogheim 4d2bc143b3 Support the correct spelling (https://developer.github.com/v3/issues/events/) of event types. 2015-02-19 22:57:33 +01:00
Micah c3a67ae777 Creates constructors for all Models.Response.
Resolves https://github.com/octokit/octokit.net/issues/677.

Removes obscolete properties (gravatar).
Makes Models.Response properties all be protected (most were already).
2015-01-24 16:07:03 -08:00
Kristian Hellang 21ca33817d Fixed failing tests 2015-01-06 00:27:16 +01:00
Dillon Buchanan 690bb77129 IssueEvent & EventInfo Field/Enum Updates
Fixes #642
2014-12-22 17:33:40 -05:00
Amy Palamountain fa9c618302 Debugger display ++ 2014-02-19 21:43:35 +13:00
Kyle Nunery f29901b695 Using existing User class instead of Actor class 2013-11-03 00:50:45 -05:00
Kyle Nunery ea25d99676 Add missing xml comments 2013-11-03 00:50:44 -05:00
Kyle Nunery 4868b0e4f2 add event id to EventInfo model 2013-11-03 00:45:53 -05:00
Kyle Nunery 769be5bcbc Added Issue Events client interface and corresponding types 2013-11-03 00:45:52 -05:00