-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
e3fd99e
commit 89500f4
Showing
40 changed files
with
1,591 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
Octokit.Reactive/Clients/IObservableRepositoryInvitationsClient.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
using System; | ||
using System.Diagnostics.CodeAnalysis; | ||
using System.Collections.Generic; | ||
|
||
namespace Octokit.Reactive | ||
{ | ||
public interface IObservableRepositoryInvitationsClient | ||
{ | ||
/// <summary> | ||
/// Accept a repository invitation. | ||
/// </summary> | ||
/// <remarks> | ||
/// See the <a href="https://developer.github.com/v3/repos/invitations/#accept-a-repository-invitation">API documentation</a> for more information. | ||
/// </remarks> | ||
/// <param name="invitationId">The id of the invitation.</param> | ||
IObservable<bool> Accept(int invitationId); | ||
|
||
/// <summary> | ||
/// Decline a repository invitation. | ||
/// </summary> | ||
/// <remarks> | ||
/// See the <a href="https://developer.github.com/v3/repos/invitations/#decline-a-repository-invitation">API documentation</a> for more information. | ||
/// </remarks> | ||
/// <param name="invitationId">The id of the invitation.</param> | ||
IObservable<bool> Decline(int invitationId); | ||
|
||
/// <summary> | ||
/// Deletes a repository invitation. | ||
/// </summary> | ||
/// <remarks> | ||
/// See the <a href="https://developer.github.com/v3/repos/invitations/#delete-a-repository-invitation">API documentation</a> for more information. | ||
/// </remarks> | ||
/// <param name="repositoryId">The id of the repository.</param> | ||
/// <param name="invitationId">The id of the invitation.</param> | ||
IObservable<bool> Delete(int repositoryId, int invitationId); | ||
|
||
/// <summary> | ||
/// Gets all invitations for the current user. | ||
/// </summary> | ||
/// <remarks> | ||
/// See the <a href="https://developer.github.com/v3/repos/invitations/#list-a-users-repository-invitations">API documentation</a> for more information. | ||
/// </remarks> | ||
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] | ||
IObservable<RepositoryInvitation> GetAllForCurrent(); | ||
|
||
/// <summary> | ||
/// Gets all the invitations on a repository. | ||
/// </summary> | ||
/// <remarks> | ||
/// See the <a href="https://developer.github.com/v3/repos/invitations/#list-invitations-for-a-repository">API documentation</a> for more information. | ||
/// </remarks> | ||
/// <param name="repositoryId">The id of the repository</param> | ||
IObservable<RepositoryInvitation> GetAllForRepository(int repositoryId); | ||
|
||
/// <summary> | ||
/// Updates a repository invitation. | ||
/// </summary> | ||
/// <remarks> | ||
/// See the <a href="https://developer.github.com/v3/repos/invitations/#update-a-repository-invitation">API documentation</a> for more information. | ||
/// </remarks> | ||
/// <param name="repositoryId">The id of the repository.</param> | ||
/// <param name="invitationId">The id of the invitation.</param> | ||
/// <param name="permissions">The permission to set.</param> | ||
/// <returns><see cref="RepositoryInvitation"/></returns> | ||
IObservable<RepositoryInvitation> Edit(int repositoryId, int invitationId, InvitationUpdate permissions); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.