Commit Graph

6 Commits

Author SHA1 Message Date
Tom Longhurst
cd1835326b Fix xUnit Warnings (#2906)
* Fix xUnit Warnings

* Fix

* Fix formatting in AsyncPaginationExtensionGenerator.cs

---------

Co-authored-by: Keegan Campbell <me@kfcampbell.com>
2024-04-15 13:19:26 -07:00
notauserx
1300427bdd [FEAT] Updates permissions for App Installations and Collaborators endpoints 2023-03-08 10:27:29 -06:00
Ryan Gribble
c4774ffaf0 Release v0.29 - This Looks Serious (TLS) (#1765)
* Add release notes

* Fix failing integration test

* Run FormatCode build task to tidy up whitespace

* Remove "UnkownUser" from release notes contributors
2018-02-18 20:36:49 +10:00
Grzegorz Dziadkiewicz
01d16b7c12 Add pagination support to repository invitation. (#1692)
* Add ApiOptions overloads to repository invitations.

* Remove ExcludeFromPaginationApiOptionsConvention for RepositoryInvitationsClient

* Adjust tests to new call form.

* Add null check and null check test for RepositoryInvitations.

* Add integration tests draft.

* Remove redundant using.

* Replace Octocat with dual account test second user.

* Fix mass repository creation by making it synchronous and fix last RepositoryInvitationsClient test utilizing Octokit user.

* Refactor async hack.

* Reduce number of created test repos.
2017-12-03 23:02:11 +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
Martin Scholz
89500f4b8a Repository invitations changes (#1410)
* add invitations accept header

* create class RepositoryInvitation

* add repository invitations client

* add api urls for invitations

* [WIP]

* add methods to repository invitations client

* add invite method to repo collaborators client

need to add some new overload to post method in apiconnection

* some changes

* add observable client

* add dependings

* add missing observable client

* add missing xml params

* check client

* change repository invitation model

* [WIP] tests

* [WIP] tests; fix overloads for client

* change GetAllForCurrent; suppress message

* some more tests

* [WIP]

* [WIP]

* add collaborator request model

* change return types

change return types for invitation methods. add permission attribute for
repository collaborators invite method.

* add some more tests

* fix xml doc

* check for null arguments

* fix tests

* some fixes from @ryangribble

* add parameterless constructor for RepositoryInvitation

* change setter

* change constructor

* fix merge conflicts

* [WIP] RepositoryInvitationsClientTests

* fix api url xml

* change collaborator request constructor

* change unit tests for collaborator request

* change repocollaboratorsclient

change overloads for add in invite methods to set permissions

* [WIP] integration tests

* add methods for interface

* NotFoundExceptions

* add overload for invite method

* rename repo property

* gramar

* overloads for observable repo collaborators client

* change integration tests

* new integration tests

* add decline test

* add test for accept invitation
2016-07-23 18:50:22 +10:00