Commit Graph

63 Commits

Author SHA1 Message Date
Jose de Jesus Medina 5eb9f06b24 Fix typos in comments (#2040) 2019-10-30 13:51:20 -03:00
Itai Bar-Haim 4e804f61a6 Prefer using nameof(x) over literal "x" (#1781)
* updated XML docs and added some missing bits.

* prefer nameof(x) over literal "x"
2018-03-07 20:43:10 +10:00
Ryan Gribble 5e89232521 Release v0.25 - She'll be Comin' Round the Mountain (#1656)
* Run `build -Target FormatCode` to fixup whitespace etc

* Fix delete release asset integration test

* Fix repository fork test

* Fix pagination test for PR Review Request

* First cut of release notes

* update release notes

* Update release notes

* include links to contributors

* Add breaking changes/advisories section

* Tidy up formatting

* Tidy up wording
2017-08-23 21:27:15 +10:00
Henrik Andersson 1d1ca0a572 Add client for organization outside collaborators (#1639)
* Add client for organization outside collaborators

* Add unit/integration tests

* Add methods for removing an outside collaborator

* Add unit/integration tests

* Add new Put method to Connection which accepts a preview header

* Add methods for converting an org member to an outside collaborator

* Fix copy paste errors in new exceptions

* According to API docs, a 403 should be returned if the member is not a member of the org, but a 404 is actually returned

* Add unit/integration tests

* Remove unused using directives

* Got a bit overzealous with my removal of using directives

* Fix integration tests by using the configured Organization and test username rather than henrik's :)

* Remove ApiOptions overloads as it isn't currently supported

* Fix XML doc grammar

* Fix failing unit tests

* Missed a couple of nameof replacements
2017-08-07 10:20:57 +10:00
Chad Tolkien fc5bc947aa Fixes #1621 NewRepositoryWebHook no longer creates new instance... (#1623)
Fixes #1621 NewRepositoryWebHook should not discard existing fields
2017-07-22 13:09:33 +10:00
Mickaël Derriey 13d5dab516 Port to .NET Core (#1503)
Port to .NET Core
2017-01-21 14:42:02 +10:00
Ryan Gribble 3c818934b8 Release v0.24 - A Sight For Sore Eyes (#1539)
* 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
2017-01-17 18:56:55 +10:00
Sean Killeen 01a2d97212 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
2017-01-16 23:13:00 +10:00
Sean Killeen 4cec3a6532 Introduce AbuseException (#1528)
* Add some tests to be completed

* Actually fail the tests

* Create AbuseException class

Copied from ForbiddenException and then gone over to inherit from it.

* Actually add AbuseException to csproj

* Update test file

* Ran .\build FixProjects

* Test updates

* Default message update for AbuseException

* Separate the exception creation logic

* Remove message assertion -- doesn't matter here

* Additional test for abuse message

* Remove unnecessary variable assignment

* Failing test for unsafe request

* Attempt to fix test

Still broken -- I don't think empty strings count to trigger the default
message

* Remove test that will always fail due to another issue

Opened #1529 to explore this.

* New tests (some failing)

* Passing tests are, like, better than failing tests.

* Last passing test

* Cleanup

* Add test for zero value and fix code

Lol boundary cases.

* cleanup

* Mark ParseRetryAfterSeconds as static

* Add GetObjectData override to AbuseException

To include data for RetryAfterSeconds variable, and satisfy the build
check.

* Add back failing test & skip it

* Change to nullable int with null default

* Fix tests around nullable default

* whitespace fixes

* Compact the logic; tests still pass

* Invert the if statements for compactness / clarity

* Test subclasses & reformatting

* Test name changes

* Whitespace fix

* Remove redundant line
2017-01-12 07:30:43 +10:00
Mordechai Zuber 4be25ba8bd Add missing SecurityCritical attribute
Fixes #1471
2016-10-13 15:54:27 +03:00
Alexander Efremov d7d03fafa3 Redundant parentheses were removed. (#1275) 2016-04-21 16:15:26 +10:00
Devesh Khandelwal cdd46465db Add custom exception for the HTTP 451 response (#1239)
* Add HTTP 451: Legal Takedown Exception.

* Add LegalRestrictionException in HandleErrors.

* Cast 451 to HttpStatusCode and include exception in csproj files.

* Tests added and "FixProjects".

* Fix: 403 -> 451 in 451Tests.
2016-04-10 14:07:18 -04:00
aedampir@gmail.com 695cf8e75b Unused "using" directives were removed in whole solution. 2016-03-25 13:38:07 +07:00
Brendan Forster 6bedf1ee9b just a bit of code cleanup 2016-02-02 10:01:16 +10:30
Brendan Forster 238b138b16 Merge pull request #995 from naveensrinivasan/mono
Targeting mono
2015-12-18 10:34:43 +10:30
Mordechai Zuber 44304ca70b use string per recommended style 2015-12-16 21:23:36 +02:00
naveen ebbec94888 Merge branch 'octokit/master' into mono 2015-12-15 17:32:52 -05:00
Haacked 4fdb8f4368 Remove unnecessary base call on default ctor 2015-12-13 22:23:10 -08:00
naveen 85e520d5d6 Fixes for mono
removed DocPlagiarizer

Fixed tests

removed unused variable

removed unused variable that was causing the build to fail

fixed the file name casing.

updated the nugget.exe to download System.Net.Http

PCL is required for mono

more fixes for travis
2015-12-11 20:36:47 -05:00
Anton Sizikov cde2518b86 String comparison specified for content type 2015-12-10 08:53:12 +01:00
Anton Sizikov 2af1f240e8 Merge branch 'master' into api-exception-prints-payload-on-tostring 2015-12-10 08:31:58 +01:00
Anton Sizikov a7e06c7cd0 Removed custom message format and just print raw body 2015-12-08 10:10:59 +01:00
Haacked 4fe8e96060 Merge branch 'better-merge-exception-rebased' of https://github.com/elbaloo/octokit.net into elbaloo-better-merge-exception-rebased 2015-12-07 15:13:13 -08:00
Anton Sizikov 5ef499686e Overrided ToString methods for ApiException and ApiError 2015-12-06 19:34:32 +01:00
Henrik Andersson c4b4233683 Throw exception with helpful message if duplicate webhook config values exists. 2015-11-11 23:07:28 +10:00
Brendan Forster 80719c0033 aaaand format the code 2015-11-04 13:38:51 -08:00
Brendan Forster 1408866d43 Merge branch 'gitignore-exception' 2015-11-04 09:16:33 -08:00
Victor Castillo Escoto 25d39a055e Make new merge exceptions inherit from 'Octokit.ApiException'
Affect 'Octokit.PullRequestNotMergeableException'
and 'Octokit.PullRequestMismatchException'
2015-10-13 19:53:38 -05:00
Brendan Forster db57a92a7e sketching out the exception necessary when raising specific merge exceptions 2015-10-09 09:05:17 -05:00
Victor Castillo Escoto d5b5545f5b Add .com links to PrivateRepositoryQuotaExceededException
Add following links:
- 'Deleting a repository' at https://help.github.com/articles/deleting-a-repository/
- 'What plan should I use?' at https://help.github.com/articles/what-plan-should-i-choose/
2015-10-07 12:14:05 -04:00
William Barbosa 7dee540afd Throwing proper exception on RepositoresClient 2015-10-04 10:12:34 -03:00
William Barbosa 0b5f3e9611 Adds InvalidGitIgnoreTemplateException 2015-10-02 19:25:46 -03:00
Haacked 8a7e5efa81 Use base type for argument 2015-08-04 21:20:15 -07:00
Haacked eb5d14cfdc Organize usings and remove unused 2015-08-04 21:12:37 -07:00
Brendan Forster b191ebc3cd extract specific exception for when invalid paths raised 2015-07-19 07:44:59 +09:30
Haacked 2e2009f6e8 Fix some typos 2015-04-19 22:20:52 -07:00
Haacked 93dd16f829 Add more info to TwoFactorChallengeFailedException
I was running into an issue where i wanted more information from the
TwoFactorChallengeFailedException. It turns out, the exception could
easily provide both the TwoFactorType AND the authentication code
provided. So 💥!
2015-04-19 19:42:13 -07:00
Brendan Forster 47c0540165 Merge pull request #662 from octokit/haacked/api-response-refactor
Make the response objects readonly.
2015-01-28 09:31:27 +10:30
Gabriel Weyer 1b1a397a09 RepositoryExistsException has now two constructors (one for account and one for organization) 2015-01-08 17:09:08 +11:00
Haacked 89e8fdfeaf Make Response.Body readonly 2015-01-04 19:15:40 -08:00
Haacked d8f50292e3 Stop manufacturing Response objects just to create an exception 2015-01-04 19:15:38 -08:00
Haacked 53a6516de2 Change IResponse.Body to object
This removes the awkward Body and BodyAsObject property combo we used to
have.
2015-01-04 19:06:50 -08:00
Haacked be9f446df4 Move Response to its own file and Internal namespace
A class named "Response" could conflict with a lot of things.
2015-01-04 19:03:25 -08:00
Haacked 4c8bab20eb IApiResponse no longer inherits IResponse 2015-01-04 18:58:53 -08:00
Haacked 9f675924b7 Make response models readonly
It's bothered me that our response models are mutable. They really
shouldn't be. I made the properties have a protected setter instead of
private to provide flexibility for others who might be deriving from
these classes or testing them.

Fixes #650
2015-01-03 20:21:36 -08:00
Brendan Forster 3be89e7c01 document a bunch of the Exceptions namespace 2015-01-03 09:30:05 -08:00
Cameron MacFarland f6c42b78c5 Fixing xml docs 2014-06-10 09:03:27 +08:00
Brendan Forster e0dab3ea8b fix impacted tests, live a happy life 2014-04-30 13:52:42 +08:00
Brendan Forster 74b6e93fae deprecated field which is no longer necessary 2014-04-30 13:35:12 +08:00
Brendan Forster 46afc41015 making some of the additional fields less wrong 2014-04-30 13:34:36 +08:00