mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-05-27 16:42:03 +00:00
600c8657e4
* removes obsolete OranizationsClient.GetAll (replaced with GetAllForUser) * removes obsolete PullRequestsClient.Comment (replaced with ReviewComment) * removes obsolete TeamsClient.GetMembership (replaced with GetMembershipDetails) removes obsolete TeamsClient.AddMembership (replaced with AddOrEditMembership) removes obsolete TeamsClient.AddMembership (replaced with AddOrEditMembership) removes obsolete TeamMembership response class (replaced with TeamMembershipDetails) * removes obsolete RepositoryBranchesClient.GetRequiredStatusChecksContexts (replaced with GetAllRequiredStatusChecksContexts) removes obsolete RepositoryBranchesClient.GetProtectedBranchTeamRestrictions (replaced with GetAllProtectedBranchTeamRestrictions) removes obsolete RepositoryBranchesClient.GetProtectedBranchUserRestrictions (replaced with GetAllProtectedBranchUserRestrictions) * removes obsolete RepositoryTrafficClient.GetReferrers (replaced with GetAllReferrers) removes obsolete RepositoryTrafficClient.GetPaths (replaced with GetAllPaths) * removes obsolete constructors from BranchProtectionUpdateSettings and UpdateTeam request models * removes obsolete Assignee property from NewIssue and IssueUpdate request models (replaced with Assignees)
247 lines
12 KiB
C#
247 lines
12 KiB
C#
using System;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace Octokit.Reactive
|
|
{
|
|
/// <summary>
|
|
/// A client for GitHub's Pull Requests API.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="http://developer.github.com/v3/activity/notifications/">Pull Requests API documentation</a> for more information.
|
|
/// </remarks>
|
|
public interface IObservablePullRequestsClient
|
|
{
|
|
/// <summary>
|
|
/// Client for managing reviews.
|
|
/// </summary>
|
|
IObservablePullRequestReviewsClient Review { get; }
|
|
|
|
/// <summary>
|
|
/// Client for managing review comments.
|
|
/// </summary>
|
|
IObservablePullRequestReviewCommentsClient ReviewComment { get; }
|
|
|
|
/// <summary>
|
|
/// Client for managing review requests.
|
|
/// </summary>
|
|
IObservablePullRequestReviewRequestsClient ReviewRequest { get; }
|
|
|
|
/// <summary>
|
|
/// Gets a single Pull Request by number.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// http://developer.github.com/v3/pulls/#get-a-single-pull-request
|
|
/// </remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="number">The number of the pull request</param>
|
|
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
|
|
Justification = "Method makes a network request")]
|
|
IObservable<PullRequest> Get(string owner, string name, int number);
|
|
|
|
/// <summary>
|
|
/// Gets a single Pull Request by number.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// http://developer.github.com/v3/pulls/#get-a-single-pull-request
|
|
/// </remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="number">The number of the pull request</param>
|
|
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
|
|
Justification = "Method makes a network request")]
|
|
IObservable<PullRequest> Get(long repositoryId, int number);
|
|
|
|
/// <summary>
|
|
/// Gets all open pull requests for the repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// http://developer.github.com/v3/pulls/#list-pull-requests
|
|
/// </remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
IObservable<PullRequest> GetAllForRepository(string owner, string name);
|
|
|
|
/// <summary>
|
|
/// Gets all open pull requests for the repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// http://developer.github.com/v3/pulls/#list-pull-requests
|
|
/// </remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
IObservable<PullRequest> GetAllForRepository(long repositoryId);
|
|
|
|
/// <summary>
|
|
/// Gets all open pull requests for the repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// http://developer.github.com/v3/pulls/#list-pull-requests
|
|
/// </remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="options">Options for changing the API response</param>
|
|
IObservable<PullRequest> GetAllForRepository(string owner, string name, ApiOptions options);
|
|
|
|
/// <summary>
|
|
/// Gets all open pull requests for the repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// http://developer.github.com/v3/pulls/#list-pull-requests
|
|
/// </remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="options">Options for changing the API response</param>
|
|
IObservable<PullRequest> GetAllForRepository(long repositoryId, ApiOptions options);
|
|
|
|
/// <summary>
|
|
/// Query pull requests for the repository based on criteria
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// http://developer.github.com/v3/pulls/#list-pull-requests
|
|
/// </remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="request">Used to filter and sort the list of pull requests returned</param>
|
|
IObservable<PullRequest> GetAllForRepository(string owner, string name, PullRequestRequest request);
|
|
|
|
/// <summary>
|
|
/// Query pull requests for the repository based on criteria
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// http://developer.github.com/v3/pulls/#list-pull-requests
|
|
/// </remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="request">Used to filter and sort the list of pull requests returned</param>
|
|
IObservable<PullRequest> GetAllForRepository(long repositoryId, PullRequestRequest request);
|
|
|
|
/// <summary>
|
|
/// Query pull requests for the repository based on criteria
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// http://developer.github.com/v3/pulls/#list-pull-requests
|
|
/// </remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="request">Used to filter and sort the list of pull requests returned</param>
|
|
/// <param name="options">Options for changing the API response</param>
|
|
IObservable<PullRequest> GetAllForRepository(string owner, string name, PullRequestRequest request, ApiOptions options);
|
|
|
|
/// <summary>
|
|
/// Query pull requests for the repository based on criteria
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// http://developer.github.com/v3/pulls/#list-pull-requests
|
|
/// </remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="request">Used to filter and sort the list of pull requests returned</param>
|
|
/// <param name="options">Options for changing the API response</param>
|
|
IObservable<PullRequest> GetAllForRepository(long repositoryId, PullRequestRequest request, ApiOptions options);
|
|
|
|
/// <summary>
|
|
/// Creates a pull request for the specified repository.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/pulls/#create-a-pull-request</remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="newPullRequest">A <see cref="NewPullRequest"/> instance describing the new PullRequest to create</param>
|
|
IObservable<PullRequest> Create(string owner, string name, NewPullRequest newPullRequest);
|
|
|
|
/// <summary>
|
|
/// Creates a pull request for the specified repository.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/pulls/#create-a-pull-request</remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="newPullRequest">A <see cref="NewPullRequest"/> instance describing the new PullRequest to create</param>
|
|
IObservable<PullRequest> Create(long repositoryId, NewPullRequest newPullRequest);
|
|
|
|
/// <summary>
|
|
/// Update a pull request for the specified repository.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/pulls/#update-a-pull-request</remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="number">The PullRequest number</param>
|
|
/// <param name="pullRequestUpdate">An <see cref="PullRequestUpdate"/> instance describing the changes to make to the PullRequest
|
|
/// </param>
|
|
IObservable<PullRequest> Update(string owner, string name, int number, PullRequestUpdate pullRequestUpdate);
|
|
|
|
/// <summary>
|
|
/// Update a pull request for the specified repository.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/pulls/#update-a-pull-request</remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="number">The PullRequest number</param>
|
|
/// <param name="pullRequestUpdate">An <see cref="PullRequestUpdate"/> instance describing the changes to make to the PullRequest
|
|
/// </param>
|
|
IObservable<PullRequest> Update(long repositoryId, int number, PullRequestUpdate pullRequestUpdate);
|
|
|
|
/// <summary>
|
|
/// Merge a pull request.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/pulls/#merge-a-pull-request-merge-buttontrade</remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="number">The pull request number</param>
|
|
/// <param name="mergePullRequest">A <see cref="MergePullRequest"/> instance describing a pull request merge</param>
|
|
IObservable<PullRequestMerge> Merge(string owner, string name, int number, MergePullRequest mergePullRequest);
|
|
|
|
/// <summary>
|
|
/// Merge a pull request.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/pulls/#merge-a-pull-request-merge-buttontrade</remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="number">The pull request number</param>
|
|
/// <param name="mergePullRequest">A <see cref="MergePullRequest"/> instance describing a pull request merge</param>
|
|
IObservable<PullRequestMerge> Merge(long repositoryId, int number, MergePullRequest mergePullRequest);
|
|
|
|
/// <summary>
|
|
/// Gets the pull request merge status.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged</remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="number">The pull request number</param>
|
|
IObservable<bool> Merged(string owner, string name, int number);
|
|
|
|
/// <summary>
|
|
/// Gets the pull request merge status.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged</remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="number">The pull request number</param>
|
|
IObservable<bool> Merged(long repositoryId, int number);
|
|
|
|
/// <summary>
|
|
/// Gets the list of commits on a pull request.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/pulls/#list-commits-on-a-pull-request</remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="number">The pull request number</param>
|
|
IObservable<PullRequestCommit> Commits(string owner, string name, int number);
|
|
|
|
/// <summary>
|
|
/// Gets the list of commits on a pull request.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/pulls/#list-commits-on-a-pull-request</remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="number">The pull request number</param>
|
|
IObservable<PullRequestCommit> Commits(long repositoryId, int number);
|
|
|
|
/// <summary>
|
|
/// Get the list of files on a pull request.
|
|
/// </summary>
|
|
/// <remarks>https://developer.github.com/v3/pulls/#list-pull-requests-files</remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="number">The pull request number</param>
|
|
IObservable<PullRequestFile> Files(string owner, string name, int number);
|
|
|
|
/// <summary>
|
|
/// Get the list of files on a pull request.
|
|
/// </summary>
|
|
/// <remarks>https://developer.github.com/v3/pulls/#list-pull-requests-files</remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="number">The pull request number</param>
|
|
IObservable<PullRequestFile> Files(long repositoryId, int number);
|
|
}
|
|
}
|