72 Commits

Author SHA1 Message Date
Sean Killeen 05aa951d41 Remove /en slug in docs.github.com links (and stop VSCode from formatting on save) (#2573) 2022-09-20 14:35:13 -05:00
Chris Simpson 176bf386a0 maint: Tidying up DefineConstants (#2538) 2022-08-12 12:19:26 -05:00
Chris Simpson 651d9818c7 ci(build): Fixes a number of warnings for a cleaner build (#2529)
* Fixing a number of warnings for a cleaner build

* Removing extra Summary slashes
2022-08-08 10:20:37 -05:00
Chris Simpson 840935a8d7 maint: Removes private repositories limit exception (#2514) 2022-07-27 14:04:51 -05:00
Diogo Rolo 4f4ef5ba73 Fix null reference access when ContentType is null (#2501) 2022-07-21 16:36:02 -05:00
Chris Simpson b023602347 [FEAT] Adding in handling for secondary rate limit exceptions (#2473) 2022-07-11 09:03:31 -05:00
Jose de Jesus Medina 66a6781584 spellcheck round 2 (#2259) 2020-10-06 09:47:36 -03:00
Fredrik Høisæther Rasch af74ae8e20 Add Server Time Difference to ApiInfo (#2196) 2020-06-07 18:25:34 -03:00
Brendan Forster 8d7bda96e4 handle case insensitive headers when parsing for API rate limiting (#2175) 2020-04-12 13:04:30 -03:00
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