mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 20:13:40 +00:00
Stubbed out the API for pull requests.
Still missing pull request files, commit lists and merge checks.
This commit is contained in:
committed by
Brendan Forster
parent
0df17bdaaa
commit
e3bf6ed0c9
@@ -0,0 +1,65 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
public interface IPullRequestsClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a single Pull Request by number.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/pulls/#get-a-single-pull-request
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
|
||||
Justification = "Method makes a network request")]
|
||||
Task<PullRequest> Get(string owner, string name, 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>
|
||||
/// <returns></returns>
|
||||
Task<IReadOnlyList<PullRequest>> GetForRepository(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="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>
|
||||
/// <returns></returns>
|
||||
Task<IReadOnlyList<PullRequest>> GetForRepository(string owner, string name, PullRequestRequest request);
|
||||
|
||||
/// <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>
|
||||
/// <returns></returns>
|
||||
Task<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/#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>
|
||||
/// <returns></returns>
|
||||
Task<PullRequest> Update(string owner, string name, int number, PullRequestUpdate pullRequestUpdate);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user