Commit Graph

61 Commits

Author SHA1 Message Date
Tom Longhurst 958bc5f1f8 [feat]: SDKs for ActionsArtifacts APIs 2023-09-25 14:16:41 -05:00
gitasaurus 3c82ff359c [FEAT] Adds support for enterprise audit logs 2023-05-09 10:28:58 -05:00
notauserx 891015c39f update models with updated permission enum (#2633)
* update models with updated permission enum

* add suppress message attribute

* update integration tests

* refactor: new and legacy update teams endpint

* refactor: add new delete team endpoint

* use TeamPermission on NewTeam

* use updated delete on team context dispose

* add permission enum for team response object

* refactor: remove legacy suffix from method names

* introduce permissions object on Team

* refactor: rename enum to TeamRepositoryPermission

* fix formatting

* change Permission to string to match api specs

* add TeamRepository

* add CheckTeamPermission endpoint support

* fix convention tests

* update comments on TeamRepository props

* add two new endpoints in TeamsClient

* refactor: rename ApiUrl for TeamPermission

* fix test

* implement methods for new endpoints

* add the integration tests

* fix spelling

* update comments

* refactor: rename method name

* fix: add end tag for remarks

* refactor: remove unused method param

* fix docstring comment

* the unit tests are in finally

* add docs for teams api

* split CheckTeamPermissions into two methods

* Update ObservableTeamsClientTests.cs based on review

Co-authored-by: Keegan Campbell <me@kfcampbell.com>

* add cref to legacy update and delete endpoints

* remove editorconfig file

* Update Octokit.Tests/Clients/TeamsClientTests.cs

Co-authored-by: Keegan Campbell <me@kfcampbell.com>

* remove unused line

* rename variable based on review

* rename prop to match constructor param

* add comment to explain TeamPermission enum values on update

Co-authored-by: notauserx <notauserx@users.noreply.github.com>
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
2023-01-20 10:48:00 -08:00
Kato Stølen 4fbbe4ca2c Add cancellation token support for release assets uploading (#2267) 2021-02-21 17:08:30 -04:00
Cédric Luthi 69d118230d Add support to get raw file content as byte[] (#2151) 2020-04-12 13:22:35 -03:00
Jose de Jesus Medina 5eb9f06b24 Fix typos in comments (#2040) 2019-10-30 13:51:20 -03:00
Ryan Gribble cee6635861 provide a Delete<T>() overload that takes a Uri and accept header, but no body (#1868) 2018-09-09 09:59:31 +10:00
Martin Scholz b4fad9bfab Add multiple assignees to issues (#1339)
* [WIP]

* add new method to add assignees for an issue

* added new overloads

* added unit tests

* fixed missed overload calls

* fixed inconsistency in tests

* added integration tests

* fixed errors in tests

* fixed all remarks

* added new overloads

* added unit tests

* added integration tests

* fixed incorrect variable names

* added new overloads

* added unit tests

* added itegration tests

* fixed integration tests

* removed extra empty lines

* fixed errors in unit tests

* added overloads on IObservableReleasesClient and IReleasesClient

* added new unit tests

* added integration tests

* added Task as return value of unit tests

* added Task as return parameter

* added return value ReleasesClientTests

* another try to get tests work

* another one try

* undo prev commit

* fixed errors in tests

* removed extra ThrowsAsync checks

* added new overloads

* added unit tests

* added integration tests

* added integration tests

* Add ApiOptions overloads to IWatchedClient + tests.

* Add ApiOptions overloads to IObservableWatchedClient + tests.

* More tests.

* fixed error in ObservableWatchedClient

* added unit tests

* added integration tests

* added new overloads

* added unit tests

* added integration tests

* renamed "Ensures" methods to deliver more consistency in code

* fixed failed tests

* Add ApiOptions overloads to methods on I(Observable)IssuesLabelsClient (#1329)

* correcting a couple of tests (#1331)

* Add ApiOption overloads to methods on I(Observable)OrganizationsClient (#1324)

* Add ApiOptions overloads to methods on I(Observable)OrganizationMembersClient (#1332)

* fix description

* add new response for IssueAssignees

* add constructor for IssueAssignees

* add debugger display for NewAssignees

* add methods for observable assignees client; new unit tests

* add observable unit tests for add method

* place AddAssignees under IssueClient

* fix description

* [WIP] add generic delete method

* revert add assignees

* add assignees key under issue client

* remove IssueAssignees dependencies

* fix type IssueAssignees

* add remove method for issue assignees; finish generic delete method

* unit tests for remove assignees

* Add Assignees property to NewIssue and UpdateIssue requets
Add Asignees property to Issue response
Removed [SerializeNull] attribute from UpdateIssue.Assignee as this was causing it to remove assignee when none was specified
Add a couple of integration tests to prove Assignees are being deserialised

* rename NewAssignees to AssignessUpdate

* change Assignees key description

* check null Issue.ToUpdate method

* add accept header for IssuesClientTests

* Fix some more unit tests

* add integration test

Check if an assignee was added to an issue

* fix merge conflicts

* resolve conflicts

* implement some hints from @ryangribble

* resolve merge fixes

* clean up

* some more changes

* create new repo

Create a new repo for integrationtest
'CanRetrieveIssuesWithMultipleAssignees()'

* fix merge

* fix conflicts

* fix xml

* change test

* change delete overloads

* Fix tests

* fix xml

* Add helper function RemoveLabel

* Add helper function RemoveAssignee

* Format last commit

* Add integration tests to exercise new Assignees field on IssueUpdate

* GitHub API doesnt allow Assignee and Assignees properties to both be specified - API docs say that Assignee is deprecated so mark it [Obsolete] and dont populate it in Issue.ToUpdate()

* Add Assignees field to PullRequest response object, and integration tests to verify it is populated.
This field is not listed in the API docs but probing the API revealed it is included in payloads

* add a couple of extra tests to verify the IssueUpdate.Labels is working correctly

* Include assignees in ctor for consistency

* fix IssueUpdate test for new Assignees field
2017-01-11 22:53:41 +10:00
Martin Scholz 93ae832311 [WIP] Protected branches updates - granular methods (#1443)
* Add get method for required status checks

* Add api urls for required status checks

* change name of apir url for required status checks

* fix xml comment

* add update method for required status checks

* add delete method for required status checks

* fix api url

* fix xml comment

* add api url for required status cehcks contexts

* add get method for required status checks contexts

* add replace method for required status checks contexts

* add add method for required status checks contexts

* add new overload for delete method

* add delete method for required status checks contexts; fix overloads for delete

* add api url for restrictions

* add get method for restrictions

* add delete method for restrictions

* add api url for teams restrictions

* add get method for team restrictions; fix delete method restrictions

* fix overhead for get team restrictions

* fix httpmethod for update required status checks

* add set method for team restrictions

* add add method for team restrictions

* add delete method for team restrictions

* add api url for user restrictions

* add get method for user restrictions

* add set method for user restrictions

* add add method for user restrictions

* add delete method for user restrictions

* Add unit test; fix api urls

* Add ExcludeFromTest class

* add exclude attribute to methods

* Add attribute usage

* Add parameter to interface

* add observable unit tests

* rename excludefromtest

exclude all the tests for the new api endpoints because they broke the
pagination and syncobsverable tests.

* rename excludefromattribute

* refactor observable methods

* [WIP] Add integration tests

* finish integration test

* fix renamed branch protection restrictions

* add team and user collections

* rename set to update

* rename test methods

* optimize integration tests

* made some tidy ups
- fixup comment wording Edit => Replace
- remove spurious characters from description
- remove un-needed exclude attributes

* remove ForOrgRepo tests

* remove unused org contexts

* dispose contexts

* remove obsolete GetRedirect

* add clarifying comment to restriction methods
2016-09-21 07:16:51 +10:00
Ryan Gribble 9d22ed4b1c Remove previously obsoleted IConnection.GetRedirect and IApiConnection.GetRedirect methods 2016-09-06 23:13:51 +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
maddin2016 6bedcf8993 add GetAll Method for uri and accepts
add api

fix GetAllMethod

fix ApiOptions
2016-05-27 15:41:30 +02:00
Mordechai Zuber 20d8dd2852 Keep obsolete methods matching with interface and concrete 2016-04-13 18:26:02 -04:00
Prayank Mathur 8e49f04a5d Added implementation for delete that takes custom media type header and changed definition for Unlock accordingly 2016-03-30 14:30:37 +05:30
Prayank Mathur db8738b675 Corrected TheUpdateMethod.EnsureArgumentsNotNull() 2016-03-17 16:38:42 +05:30
Brendan Forster aafdda2f00 Merge branch 'master' into api-paging-part-deux 2016-02-24 11:40:43 +11:00
Brendan Forster c098ecda60 added overloads to IApiConnection which support passing in ApiOptions 2016-02-14 16:56:34 +11:00
Ryan Gribble 1f13001fd8 Change the QueueLdapSync calls to use Post<T>(uri) with no body/data 2016-02-12 09:37:33 +10:00
Brendan Forster 46d9e1f745 remove Get<T> extension method and update impacted tests to use correct method, removing the need for
additional nulls in tests
2016-01-25 14:57:15 +10:30
Brendan Forster 80719c0033 aaaand format the code 2015-11-04 13:38:51 -08:00
Haacked 890f852c90 🎨 Refactor GetQueuedOperation to reduce duplication
Most calls to `GetQueuedOperation` are used to queue up an operation
that'll return a collection in a subsequent call. In the case that the
API returns No Content, we want to return an empty collection. This
refactoring embeds that last bit of logic into `GetQueuedOperation`
rather than making every caller have to do it.
2015-08-07 16:20:45 -07:00
Haacked 0e74097dde Handle NoContent response for queued operations
We didn't handle the 204 response properly for the `StatisticsClient`.
Now we do.

Fixes #836
2015-08-07 10:41:02 -07:00
Kristian Hald 3d56bbf87f Merge remote-tracking branch 'upstream/master' into pr-495ext
Conflicts:
	Octokit/Octokit-MonoAndroid.csproj
	Octokit/Octokit-Monotouch.csproj
2015-05-09 12:51:28 +02:00
Henrik Andersson 3a915fe6cf 🚦 for following redirects 2015-05-08 18:31:46 +10:00
Henrik Andersson 09d1932b4a Add method for getting repo archive link 2015-05-08 18:31:44 +10:00
Haacked afd5f8ab56 Help POST learn about 2fa codes 2015-04-21 16:12:30 -07:00
Haacked 23bb76a112 Implement Authorizations Delete method with 2fa code
When we delete an authorization, we often need to use basic
authentication because the client might not have the associated token
stored anymore. If 2fa is enabled, the client needs to be able to pass
that along.
2015-04-21 13:40:26 -07:00
Kristian Hald 261e47f2f5 Implemented data less 'Post' method and used in ping and test hook calls. 2015-04-20 23:19:59 +02:00
Brendan Forster 037aeb7b1e route GetOrCreateApplicationAuthentication to new endpoint, if user has set a Fingerprint 2015-01-04 14:36:58 +09:30
Brendan Forster fc5c060588 well shit, this builds 2014-10-24 13:06:29 -07:00
Dillon Buchanan f45fc8e3ff Implementing the rest of the Notifications API 2014-10-14 10:40:26 -02:00
Brendan Forster f777bc5b63 added overloads for Delete to accept a payload 2014-07-08 10:09:34 +09:30
Nigel Sampson 034da197da Accepts parameter for Get 2014-03-26 23:08:00 +13:00
Nigel Sampson 90aa5696a0 Accepts parameter for Patch 2014-03-26 22:58:37 +13:00
Amy Palamountain 63da057642 Provide cancellation token option 2014-02-16 17:04:59 +13:00
Amy Palamountain 34383261d7 Moved Queued Wait into IApiConnection 2014-02-16 17:04:46 +13:00
Haroon fff1712fa0 updated wording 2013-11-14 22:40:06 +00:00
Haroon 2ac500ba2c Added Task Put(Uri uri) 2013-11-14 11:49:18 +00:00
Haacked a363696544 Filled in more documentation. Made it consistent. 2013-11-07 10:14:01 -08:00
Haacked e1d618dcaa Implement AssigneesClient
Implement client to list and check available assignees for a repository
2013-10-23 14:51:48 -07:00
Haacked 995e0c5b55 More api cleanup
Make accepts come before contentType everywhere. Also remove unnecessary
overloads of IConnection.
2013-10-15 15:43:52 -07:00
Haacked 50a197742d Fix releases client to pass accepts header 2013-10-15 13:59:14 -07:00
Haacked 25c83ac206 Reorder accepts and contentType parameters 2013-10-15 13:47:49 -07:00
half-ogre f742d507d2 add API doc for IApiConnection 2013-10-15 11:46:35 -07:00
half-ogre 6dc68a29af add API doc for ApiConnection 2013-10-15 11:44:03 -07:00
Haacked f49939ab10 Add Put tests and fix test names 2013-10-15 10:09:25 -07:00
half-ogre 5ff270dc55 use HTTP verbs for clarity: PATCH edition 2013-10-14 12:41:35 -07:00
half-ogre e933ca7391 make Upload a generic POST
The Releases API-specific part of uploading (the accept header) is now
in the Releases client and the API connection just has a generic POST
method. /cc @spraints
2013-10-14 12:38:10 -07:00
half-ogre a0306ae1df use HTTP verbs for clarity: PUT edition
GetOrCreate no more
2013-10-14 12:14:29 -07:00
half-ogre e7da50cb9d remove the T from ApiConnection{T}
It isn't buying is much, and by getting rid of it we can make API
connection more general. getting rid of strangeness like GetItem and
Upload
2013-10-14 12:05:10 -07:00