mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-20 14:15:12 +00:00
added new overloads
This commit is contained in:
@@ -50,9 +50,22 @@ namespace Octokit.Reactive
|
|||||||
/// <param name="number">The issue number</param>
|
/// <param name="number">The issue number</param>
|
||||||
/// <returns>A signal containing the requested <see cref="Issue"/>s.</returns>
|
/// <returns>A signal containing the requested <see cref="Issue"/>s.</returns>
|
||||||
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
|
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
|
||||||
Justification = "Method makes a network request")]
|
Justification = "Method makes a network request")]
|
||||||
IObservable<Issue> Get(string owner, string name, int number);
|
IObservable<Issue> Get(string owner, string name, int number);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a single Issue by number.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#get-a-single-issue
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="number">The issue number</param>
|
||||||
|
/// <returns>A signal containing the requested <see cref="Issue"/>s.</returns>
|
||||||
|
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
|
||||||
|
Justification = "Method makes a network request")]
|
||||||
|
IObservable<Issue> Get(int repositoryId, int number);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets all open issues assigned to the authenticated user across all the authenticated user’s visible
|
/// Gets all open issues assigned to the authenticated user across all the authenticated user’s visible
|
||||||
/// repositories including owned repositories, member repositories, and organization repositories.
|
/// repositories including owned repositories, member repositories, and organization repositories.
|
||||||
@@ -198,6 +211,16 @@ namespace Octokit.Reactive
|
|||||||
/// <returns>A signal containing one or more <see cref="Issue"/>s.</returns>
|
/// <returns>A signal containing one or more <see cref="Issue"/>s.</returns>
|
||||||
IObservable<Issue> GetAllForRepository(string owner, string name);
|
IObservable<Issue> GetAllForRepository(string owner, string name);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all open issues assigned to the authenticated user for the repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <returns>A signal containing one or more <see cref="Issue"/>s.</returns>
|
||||||
|
IObservable<Issue> GetAllForRepository(int repositoryId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets all open issues assigned to the authenticated user for the repository.
|
/// Gets all open issues assigned to the authenticated user for the repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -210,6 +233,17 @@ namespace Octokit.Reactive
|
|||||||
/// <returns>A signal containing one or more <see cref="Issue"/>s.</returns>
|
/// <returns>A signal containing one or more <see cref="Issue"/>s.</returns>
|
||||||
IObservable<Issue> GetAllForRepository(string owner, string name, ApiOptions options);
|
IObservable<Issue> GetAllForRepository(string owner, string name, ApiOptions options);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all open issues assigned to the authenticated user for the repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="options">Options for changing the API response</param>
|
||||||
|
/// <returns>A signal containing one or more <see cref="Issue"/>s.</returns>
|
||||||
|
IObservable<Issue> GetAllForRepository(int repositoryId, ApiOptions options);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets issues for a repository.
|
/// Gets issues for a repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -222,6 +256,17 @@ namespace Octokit.Reactive
|
|||||||
/// <returns>A signal containing one or more <see cref="Issue"/>s.</returns>
|
/// <returns>A signal containing one or more <see cref="Issue"/>s.</returns>
|
||||||
IObservable<Issue> GetAllForRepository(string owner, string name, RepositoryIssueRequest request);
|
IObservable<Issue> GetAllForRepository(string owner, string name, RepositoryIssueRequest request);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets issues for a repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="request">Used to filter and sort the list of issues returned</param>
|
||||||
|
/// <returns>A signal containing one or more <see cref="Issue"/>s.</returns>
|
||||||
|
IObservable<Issue> GetAllForRepository(int repositoryId, RepositoryIssueRequest request);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets issues for a repository.
|
/// Gets issues for a repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -235,6 +280,18 @@ namespace Octokit.Reactive
|
|||||||
/// <returns>A signal containing one or more <see cref="Issue"/>s.</returns>
|
/// <returns>A signal containing one or more <see cref="Issue"/>s.</returns>
|
||||||
IObservable<Issue> GetAllForRepository(string owner, string name, RepositoryIssueRequest request, ApiOptions options);
|
IObservable<Issue> GetAllForRepository(string owner, string name, RepositoryIssueRequest request, ApiOptions options);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets issues for a repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="request">Used to filter and sort the list of issues returned</param>
|
||||||
|
/// <param name="options">Options for changing the API response</param>
|
||||||
|
/// <returns>A signal containing one or more <see cref="Issue"/>s.</returns>
|
||||||
|
IObservable<Issue> GetAllForRepository(int repositoryId, RepositoryIssueRequest request, ApiOptions options);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
||||||
/// issue.
|
/// issue.
|
||||||
@@ -246,6 +303,16 @@ namespace Octokit.Reactive
|
|||||||
/// <returns>A signal containing the new <see cref="Issue"/>.</returns>
|
/// <returns>A signal containing the new <see cref="Issue"/>.</returns>
|
||||||
IObservable<Issue> Create(string owner, string name, NewIssue newIssue);
|
IObservable<Issue> Create(string owner, string name, NewIssue newIssue);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
||||||
|
/// issue.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>http://developer.github.com/v3/issues/#create-an-issue</remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="newIssue">A <see cref="NewIssue"/> instance describing the new issue to create</param>
|
||||||
|
/// <returns>A signal containing the new <see cref="Issue"/>.</returns>
|
||||||
|
IObservable<Issue> Create(int repositoryId, NewIssue newIssue);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
||||||
/// issue.
|
/// issue.
|
||||||
@@ -259,6 +326,18 @@ namespace Octokit.Reactive
|
|||||||
/// <returns>A signal containing the updated <see cref="Issue"/>.</returns>
|
/// <returns>A signal containing the updated <see cref="Issue"/>.</returns>
|
||||||
IObservable<Issue> Update(string owner, string name, int number, IssueUpdate issueUpdate);
|
IObservable<Issue> Update(string owner, string name, int number, IssueUpdate issueUpdate);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
||||||
|
/// issue.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>http://developer.github.com/v3/issues/#create-an-issue</remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="number">The issue number</param>
|
||||||
|
/// <param name="issueUpdate">An <see cref="IssueUpdate"/> instance describing the changes to make to the issue
|
||||||
|
/// </param>
|
||||||
|
/// <returns>A signal containing the updated <see cref="Issue"/>.</returns>
|
||||||
|
IObservable<Issue> Update(int repositoryId, int number, IssueUpdate issueUpdate);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue.
|
/// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -269,14 +348,32 @@ namespace Octokit.Reactive
|
|||||||
/// <returns>A signal indicating completion.</returns>
|
/// <returns>A signal indicating completion.</returns>
|
||||||
IObservable<Unit> Lock(string owner, string name, int number);
|
IObservable<Unit> Lock(string owner, string name, int number);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue.
|
/// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>https://developer.github.com/v3/issues/#unlock-an-issue</remarks>
|
/// <remarks>https://developer.github.com/v3/issues/#lock-an-issue</remarks>
|
||||||
/// <param name="owner">The owner of the repository</param>
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
/// <param name="name">The name of the repository</param>
|
/// <param name="number">The issue number</param>
|
||||||
/// <param name="number">The issue number</param>
|
/// <returns>A signal indicating completion.</returns>
|
||||||
/// <returns>A signal indicating completion.</returns>
|
IObservable<Unit> Lock(int repositoryId, int number);
|
||||||
IObservable<Unit> Unlock(string owner, string name, int number);
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>https://developer.github.com/v3/issues/#unlock-an-issue</remarks>
|
||||||
|
/// <param name="owner">The owner of the repository</param>
|
||||||
|
/// <param name="name">The name of the repository</param>
|
||||||
|
/// <param name="number">The issue number</param>
|
||||||
|
/// <returns>A signal indicating completion.</returns>
|
||||||
|
IObservable<Unit> Unlock(string owner, string name, int number);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>https://developer.github.com/v3/issues/#unlock-an-issue</remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="number">The issue number</param>
|
||||||
|
/// <returns>A signal indicating completion.</returns>
|
||||||
|
IObservable<Unit> Unlock(int repositoryId, int number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Reactive;
|
||||||
using System.Reactive.Threading.Tasks;
|
using System.Reactive.Threading.Tasks;
|
||||||
using Octokit.Reactive.Internal;
|
using Octokit.Reactive.Internal;
|
||||||
using System.Reactive;
|
|
||||||
|
|
||||||
namespace Octokit.Reactive
|
namespace Octokit.Reactive
|
||||||
{
|
{
|
||||||
@@ -74,6 +74,20 @@ namespace Octokit.Reactive
|
|||||||
return _client.Get(owner, name, number).ToObservable();
|
return _client.Get(owner, name, number).ToObservable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a single Issue by number.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#get-a-single-issue
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="number">The issue number</param>
|
||||||
|
/// <returns>A signal containing the requested <see cref="Issue"/>s.</returns>
|
||||||
|
public IObservable<Issue> Get(int repositoryId, int number)
|
||||||
|
{
|
||||||
|
return _client.Get(repositoryId, number).ToObservable();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets all open issues assigned to the authenticated user across all the authenticated user’s visible
|
/// Gets all open issues assigned to the authenticated user across all the authenticated user’s visible
|
||||||
/// repositories including owned repositories, member repositories, and organization repositories.
|
/// repositories including owned repositories, member repositories, and organization repositories.
|
||||||
@@ -287,6 +301,19 @@ namespace Octokit.Reactive
|
|||||||
return GetAllForRepository(owner, name, ApiOptions.None);
|
return GetAllForRepository(owner, name, ApiOptions.None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all open issues assigned to the authenticated user for the repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <returns>A signal containing one or more <see cref="Issue"/>s.</returns>
|
||||||
|
public IObservable<Issue> GetAllForRepository(int repositoryId)
|
||||||
|
{
|
||||||
|
return GetAllForRepository(repositoryId, ApiOptions.None);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets all open issues assigned to the authenticated user for the repository.
|
/// Gets all open issues assigned to the authenticated user for the repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -306,6 +333,22 @@ namespace Octokit.Reactive
|
|||||||
return GetAllForRepository(owner, name, new RepositoryIssueRequest(), options);
|
return GetAllForRepository(owner, name, new RepositoryIssueRequest(), options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all open issues assigned to the authenticated user for the repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="options">Options for changing the API response</param>
|
||||||
|
/// <returns>A signal containing one or more <see cref="Issue"/>s.</returns>
|
||||||
|
public IObservable<Issue> GetAllForRepository(int repositoryId, ApiOptions options)
|
||||||
|
{
|
||||||
|
Ensure.ArgumentNotNull(options, "options");
|
||||||
|
|
||||||
|
return GetAllForRepository(repositoryId, new RepositoryIssueRequest(), options);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets issues for a repository.
|
/// Gets issues for a repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -325,6 +368,22 @@ namespace Octokit.Reactive
|
|||||||
return GetAllForRepository(owner, name, request, ApiOptions.None);
|
return GetAllForRepository(owner, name, request, ApiOptions.None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets issues for a repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="request">Used to filter and sort the list of issues returned</param>
|
||||||
|
/// <returns>A signal containing one or more <see cref="Issue"/>s.</returns>
|
||||||
|
public IObservable<Issue> GetAllForRepository(int repositoryId, RepositoryIssueRequest request)
|
||||||
|
{
|
||||||
|
Ensure.ArgumentNotNull(request, "request");
|
||||||
|
|
||||||
|
return GetAllForRepository(repositoryId, request, ApiOptions.None);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets issues for a repository.
|
/// Gets issues for a repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -346,6 +405,24 @@ namespace Octokit.Reactive
|
|||||||
return _connection.GetAndFlattenAllPages<Issue>(ApiUrls.Issues(owner, name), request.ToParametersDictionary(), options);
|
return _connection.GetAndFlattenAllPages<Issue>(ApiUrls.Issues(owner, name), request.ToParametersDictionary(), options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets issues for a repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="request">Used to filter and sort the list of issues returned</param>
|
||||||
|
/// <param name="options">Options for changing the API response</param>
|
||||||
|
/// <returns>A signal containing one or more <see cref="Issue"/>s.</returns>
|
||||||
|
public IObservable<Issue> GetAllForRepository(int repositoryId, RepositoryIssueRequest request, ApiOptions options)
|
||||||
|
{
|
||||||
|
Ensure.ArgumentNotNull(request, "request");
|
||||||
|
Ensure.ArgumentNotNull(options, "options");
|
||||||
|
|
||||||
|
return _connection.GetAndFlattenAllPages<Issue>(ApiUrls.Issues(repositoryId), request.ToParametersDictionary(), options);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
||||||
/// issue.
|
/// issue.
|
||||||
@@ -364,6 +441,21 @@ namespace Octokit.Reactive
|
|||||||
return _client.Create(owner, name, newIssue).ToObservable();
|
return _client.Create(owner, name, newIssue).ToObservable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
||||||
|
/// issue.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>http://developer.github.com/v3/issues/#create-an-issue</remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="newIssue">A <see cref="NewIssue"/> instance describing the new issue to create</param>
|
||||||
|
/// <returns>A signal containing the new <see cref="Issue"/>.</returns>
|
||||||
|
public IObservable<Issue> Create(int repositoryId, NewIssue newIssue)
|
||||||
|
{
|
||||||
|
Ensure.ArgumentNotNull(newIssue, "newIssue");
|
||||||
|
|
||||||
|
return _client.Create(repositoryId, newIssue).ToObservable();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
||||||
/// issue.
|
/// issue.
|
||||||
@@ -384,6 +476,23 @@ namespace Octokit.Reactive
|
|||||||
return _client.Update(owner, name, number, issueUpdate).ToObservable();
|
return _client.Update(owner, name, number, issueUpdate).ToObservable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
||||||
|
/// issue.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>http://developer.github.com/v3/issues/#create-an-issue</remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="number">The issue number</param>
|
||||||
|
/// <param name="issueUpdate">An <see cref="IssueUpdate"/> instance describing the changes to make to the issue
|
||||||
|
/// </param>
|
||||||
|
/// <returns>A signal containing the updated <see cref="Issue"/>.</returns>
|
||||||
|
public IObservable<Issue> Update(int repositoryId, int number, IssueUpdate issueUpdate)
|
||||||
|
{
|
||||||
|
Ensure.ArgumentNotNull(issueUpdate, "issueUpdate");
|
||||||
|
|
||||||
|
return _client.Update(repositoryId, number, issueUpdate).ToObservable();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue.
|
/// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -393,12 +502,24 @@ namespace Octokit.Reactive
|
|||||||
/// <param name="number">The issue number</param>
|
/// <param name="number">The issue number</param>
|
||||||
/// <returns>A signal indicating completion.</returns>
|
/// <returns>A signal indicating completion.</returns>
|
||||||
public IObservable<Unit> Lock(string owner, string name, int number)
|
public IObservable<Unit> Lock(string owner, string name, int number)
|
||||||
{
|
{
|
||||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
|
|
||||||
return _client.Lock(owner, name, number).ToObservable();
|
return _client.Lock(owner, name, number).ToObservable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>https://developer.github.com/v3/issues/#lock-an-issue</remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="number">The issue number</param>
|
||||||
|
/// <returns>A signal indicating completion.</returns>
|
||||||
|
public IObservable<Unit> Lock(int repositoryId, int number)
|
||||||
|
{
|
||||||
|
return _client.Lock(repositoryId, number).ToObservable();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue.
|
/// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue.
|
||||||
@@ -409,11 +530,23 @@ namespace Octokit.Reactive
|
|||||||
/// <param name="number">The issue number</param>
|
/// <param name="number">The issue number</param>
|
||||||
/// <returns>A signal indicating completion.</returns>
|
/// <returns>A signal indicating completion.</returns>
|
||||||
public IObservable<Unit> Unlock(string owner, string name, int number)
|
public IObservable<Unit> Unlock(string owner, string name, int number)
|
||||||
{
|
{
|
||||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
|
|
||||||
return _client.Unlock(owner, name, number).ToObservable();
|
return _client.Unlock(owner, name, number).ToObservable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>https://developer.github.com/v3/issues/#unlock-an-issue</remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="number">The issue number</param>
|
||||||
|
/// <returns>A signal indicating completion.</returns>
|
||||||
|
public IObservable<Unit> Unlock(int repositoryId, int number)
|
||||||
|
{
|
||||||
|
return _client.Unlock(repositoryId, number).ToObservable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,9 +50,22 @@ namespace Octokit
|
|||||||
/// <param name="number">The issue number</param>
|
/// <param name="number">The issue number</param>
|
||||||
/// <returns>The created <see cref="Task"/> representing requesting the issue from the API.</returns>
|
/// <returns>The created <see cref="Task"/> representing requesting the issue from the API.</returns>
|
||||||
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
|
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
|
||||||
Justification = "Method makes a network request")]
|
Justification = "Method makes a network request")]
|
||||||
Task<Issue> Get(string owner, string name, int number);
|
Task<Issue> Get(string owner, string name, int number);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a single Issue by number.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#get-a-single-issue
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="number">The issue number</param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing requesting the issue from the API.</returns>
|
||||||
|
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
|
||||||
|
Justification = "Method makes a network request")]
|
||||||
|
Task<Issue> Get(int repositoryId, int number);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets all open issues assigned to the authenticated user across all the authenticated user’s visible
|
/// Gets all open issues assigned to the authenticated user across all the authenticated user’s visible
|
||||||
/// repositories including owned repositories, member repositories, and organization repositories.
|
/// repositories including owned repositories, member repositories, and organization repositories.
|
||||||
@@ -198,6 +211,16 @@ namespace Octokit
|
|||||||
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
||||||
Task<IReadOnlyList<Issue>> GetAllForRepository(string owner, string name);
|
Task<IReadOnlyList<Issue>> GetAllForRepository(string owner, string name);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all open issues assigned to the authenticated user for the repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
||||||
|
Task<IReadOnlyList<Issue>> GetAllForRepository(int repositoryId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets all open issues assigned to the authenticated user for the repository.
|
/// Gets all open issues assigned to the authenticated user for the repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -210,6 +233,17 @@ namespace Octokit
|
|||||||
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
||||||
Task<IReadOnlyList<Issue>> GetAllForRepository(string owner, string name, ApiOptions options);
|
Task<IReadOnlyList<Issue>> GetAllForRepository(string owner, string name, ApiOptions options);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all open issues assigned to the authenticated user for the repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="options">Options for changing the API response</param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
||||||
|
Task<IReadOnlyList<Issue>> GetAllForRepository(int repositoryId, ApiOptions options);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets issues for a repository.
|
/// Gets issues for a repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -222,6 +256,17 @@ namespace Octokit
|
|||||||
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
||||||
Task<IReadOnlyList<Issue>> GetAllForRepository(string owner, string name, RepositoryIssueRequest request);
|
Task<IReadOnlyList<Issue>> GetAllForRepository(string owner, string name, RepositoryIssueRequest request);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets issues for a repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="request">Used to filter and sort the list of issues returned</param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
||||||
|
Task<IReadOnlyList<Issue>> GetAllForRepository(int repositoryId, RepositoryIssueRequest request);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets issues for a repository.
|
/// Gets issues for a repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -235,6 +280,18 @@ namespace Octokit
|
|||||||
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
||||||
Task<IReadOnlyList<Issue>> GetAllForRepository(string owner, string name, RepositoryIssueRequest request, ApiOptions options);
|
Task<IReadOnlyList<Issue>> GetAllForRepository(string owner, string name, RepositoryIssueRequest request, ApiOptions options);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets issues for a repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="request">Used to filter and sort the list of issues returned</param>
|
||||||
|
/// <param name="options">Options for changing the API response</param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
||||||
|
Task<IReadOnlyList<Issue>> GetAllForRepository(int repositoryId, RepositoryIssueRequest request, ApiOptions options);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
||||||
/// issue.
|
/// issue.
|
||||||
@@ -246,6 +303,16 @@ namespace Octokit
|
|||||||
/// <returns>The created <see cref="Task"/> representing the new issue from the API.</returns>
|
/// <returns>The created <see cref="Task"/> representing the new issue from the API.</returns>
|
||||||
Task<Issue> Create(string owner, string name, NewIssue newIssue);
|
Task<Issue> Create(string owner, string name, NewIssue newIssue);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
||||||
|
/// issue.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>http://developer.github.com/v3/issues/#create-an-issue</remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="newIssue">A <see cref="NewIssue"/> instance describing the new issue to create</param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing the new issue from the API.</returns>
|
||||||
|
Task<Issue> Create(int repositoryId, NewIssue newIssue);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates an issue for the specified repository. Any user with pull access to a repository can update an
|
/// Updates an issue for the specified repository. Any user with pull access to a repository can update an
|
||||||
/// issue.
|
/// issue.
|
||||||
@@ -259,6 +326,18 @@ namespace Octokit
|
|||||||
/// <returns>The created <see cref="Task"/> representing the updated issue from the API.</returns>
|
/// <returns>The created <see cref="Task"/> representing the updated issue from the API.</returns>
|
||||||
Task<Issue> Update(string owner, string name, int number, IssueUpdate issueUpdate);
|
Task<Issue> Update(string owner, string name, int number, IssueUpdate issueUpdate);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updates an issue for the specified repository. Any user with pull access to a repository can update an
|
||||||
|
/// issue.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>http://developer.github.com/v3/issues/#edit-an-issue</remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="number">The issue number</param>
|
||||||
|
/// <param name="issueUpdate">An <see cref="IssueUpdate"/> instance describing the changes to make to the issue
|
||||||
|
/// </param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing the updated issue from the API.</returns>
|
||||||
|
Task<Issue> Update(int repositoryId, int number, IssueUpdate issueUpdate);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue.
|
/// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -269,6 +348,15 @@ namespace Octokit
|
|||||||
/// <returns>The created <see cref="Task"/> representing accessing the API.</returns>
|
/// <returns>The created <see cref="Task"/> representing accessing the API.</returns>
|
||||||
Task Lock(string owner, string name, int number);
|
Task Lock(string owner, string name, int number);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>https://developer.github.com/v3/issues/#lock-an-issue</remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="number">The issue number</param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing accessing the API.</returns>
|
||||||
|
Task Lock(int repositoryId, int number);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue.
|
/// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -278,5 +366,14 @@ namespace Octokit
|
|||||||
/// <param name="number">The issue number</param>
|
/// <param name="number">The issue number</param>
|
||||||
/// <returns>The created <see cref="Task"/> representing accessing the API.</returns>
|
/// <returns>The created <see cref="Task"/> representing accessing the API.</returns>
|
||||||
Task Unlock(string owner, string name, int number);
|
Task Unlock(string owner, string name, int number);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>https://developer.github.com/v3/issues/#unlock-an-issue</remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="number">The issue number</param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing accessing the API.</returns>
|
||||||
|
Task Unlock(int repositoryId, int number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -69,6 +69,20 @@ namespace Octokit
|
|||||||
return ApiConnection.Get<Issue>(ApiUrls.Issue(owner, name, number));
|
return ApiConnection.Get<Issue>(ApiUrls.Issue(owner, name, number));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a single Issue by number.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#get-a-single-issue
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="number">The issue number</param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing requesting the issue from the API.</returns>
|
||||||
|
public Task<Issue> Get(int repositoryId, int number)
|
||||||
|
{
|
||||||
|
return ApiConnection.Get<Issue>(ApiUrls.Issue(repositoryId, number));
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets all open issues assigned to the authenticated user across all the authenticated user’s visible
|
/// Gets all open issues assigned to the authenticated user across all the authenticated user’s visible
|
||||||
/// repositories including owned repositories, member repositories, and organization repositories.
|
/// repositories including owned repositories, member repositories, and organization repositories.
|
||||||
@@ -276,9 +290,25 @@ namespace Octokit
|
|||||||
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
||||||
public Task<IReadOnlyList<Issue>> GetAllForRepository(string owner, string name)
|
public Task<IReadOnlyList<Issue>> GetAllForRepository(string owner, string name)
|
||||||
{
|
{
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
|
|
||||||
return GetAllForRepository(owner, name, new RepositoryIssueRequest());
|
return GetAllForRepository(owner, name, new RepositoryIssueRequest());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all open issues assigned to the authenticated user for the repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
||||||
|
public Task<IReadOnlyList<Issue>> GetAllForRepository(int repositoryId)
|
||||||
|
{
|
||||||
|
return GetAllForRepository(repositoryId, new RepositoryIssueRequest());
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets all open issues assigned to the authenticated user for the repository.
|
/// Gets all open issues assigned to the authenticated user for the repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -291,9 +321,29 @@ namespace Octokit
|
|||||||
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
||||||
public Task<IReadOnlyList<Issue>> GetAllForRepository(string owner, string name, ApiOptions options)
|
public Task<IReadOnlyList<Issue>> GetAllForRepository(string owner, string name, ApiOptions options)
|
||||||
{
|
{
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
|
Ensure.ArgumentNotNull(options, "options");
|
||||||
|
|
||||||
return GetAllForRepository(owner, name, new RepositoryIssueRequest(), options);
|
return GetAllForRepository(owner, name, new RepositoryIssueRequest(), options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all open issues assigned to the authenticated user for the repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="options">Options for changing the API response</param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
||||||
|
public Task<IReadOnlyList<Issue>> GetAllForRepository(int repositoryId, ApiOptions options)
|
||||||
|
{
|
||||||
|
Ensure.ArgumentNotNull(options, "options");
|
||||||
|
|
||||||
|
return GetAllForRepository(repositoryId, new RepositoryIssueRequest(), options);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets issues for a repository.
|
/// Gets issues for a repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -313,6 +363,22 @@ namespace Octokit
|
|||||||
return GetAllForRepository(owner, name, request, ApiOptions.None);
|
return GetAllForRepository(owner, name, request, ApiOptions.None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets issues for a repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="request">Used to filter and sort the list of issues returned</param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
||||||
|
public Task<IReadOnlyList<Issue>> GetAllForRepository(int repositoryId, RepositoryIssueRequest request)
|
||||||
|
{
|
||||||
|
Ensure.ArgumentNotNull(request, "request");
|
||||||
|
|
||||||
|
return GetAllForRepository(repositoryId, request, ApiOptions.None);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets issues for a repository.
|
/// Gets issues for a repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -334,6 +400,24 @@ namespace Octokit
|
|||||||
return ApiConnection.GetAll<Issue>(ApiUrls.Issues(owner, name), request.ToParametersDictionary(), options);
|
return ApiConnection.GetAll<Issue>(ApiUrls.Issues(owner, name), request.ToParametersDictionary(), options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets issues for a repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="request">Used to filter and sort the list of issues returned</param>
|
||||||
|
/// <param name="options">Options for changing the API response</param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing requesting a list of issue from the API.</returns>
|
||||||
|
public Task<IReadOnlyList<Issue>> GetAllForRepository(int repositoryId, RepositoryIssueRequest request, ApiOptions options)
|
||||||
|
{
|
||||||
|
Ensure.ArgumentNotNull(request, "request");
|
||||||
|
Ensure.ArgumentNotNull(options, "options");
|
||||||
|
|
||||||
|
return ApiConnection.GetAll<Issue>(ApiUrls.Issues(repositoryId), request.ToParametersDictionary(), options);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
||||||
/// issue.
|
/// issue.
|
||||||
@@ -352,6 +436,21 @@ namespace Octokit
|
|||||||
return ApiConnection.Post<Issue>(ApiUrls.Issues(owner, name), newIssue);
|
return ApiConnection.Post<Issue>(ApiUrls.Issues(owner, name), newIssue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
|
||||||
|
/// issue.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>http://developer.github.com/v3/issues/#create-an-issue</remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="newIssue">A <see cref="NewIssue"/> instance describing the new issue to create</param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing the new issue from the API.</returns>
|
||||||
|
public Task<Issue> Create(int repositoryId, NewIssue newIssue)
|
||||||
|
{
|
||||||
|
Ensure.ArgumentNotNull(newIssue, "newIssue");
|
||||||
|
|
||||||
|
return ApiConnection.Post<Issue>(ApiUrls.Issues(repositoryId), newIssue);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates an issue for the specified repository. Issue owners and users with push access can edit an issue.
|
/// Updates an issue for the specified repository. Issue owners and users with push access can edit an issue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -371,6 +470,23 @@ namespace Octokit
|
|||||||
return ApiConnection.Patch<Issue>(ApiUrls.Issue(owner, name, number), issueUpdate);
|
return ApiConnection.Patch<Issue>(ApiUrls.Issue(owner, name, number), issueUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updates an issue for the specified repository. Any user with pull access to a repository can update an
|
||||||
|
/// issue.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>http://developer.github.com/v3/issues/#edit-an-issue</remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="number">The issue number</param>
|
||||||
|
/// <param name="issueUpdate">An <see cref="IssueUpdate"/> instance describing the changes to make to the issue
|
||||||
|
/// </param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing the updated issue from the API.</returns>
|
||||||
|
public Task<Issue> Update(int repositoryId, int number, IssueUpdate issueUpdate)
|
||||||
|
{
|
||||||
|
Ensure.ArgumentNotNull(issueUpdate, "issueUpdate");
|
||||||
|
|
||||||
|
return ApiConnection.Patch<Issue>(ApiUrls.Issue(repositoryId, number), issueUpdate);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue.
|
/// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -387,6 +503,18 @@ namespace Octokit
|
|||||||
return ApiConnection.Put<Issue>(ApiUrls.IssueLock(owner, name, number), new object(), null, AcceptHeaders.IssueLockingUnlockingApiPreview);
|
return ApiConnection.Put<Issue>(ApiUrls.IssueLock(owner, name, number), new object(), null, AcceptHeaders.IssueLockingUnlockingApiPreview);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>https://developer.github.com/v3/issues/#lock-an-issue</remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="number">The issue number</param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing accessing the API.</returns>
|
||||||
|
public Task Lock(int repositoryId, int number)
|
||||||
|
{
|
||||||
|
return ApiConnection.Put<Issue>(ApiUrls.IssueLock(repositoryId, number), new object(), null, AcceptHeaders.IssueLockingUnlockingApiPreview);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue.
|
/// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -402,5 +530,17 @@ namespace Octokit
|
|||||||
|
|
||||||
return ApiConnection.Delete(ApiUrls.IssueLock(owner, name, number), new object(), AcceptHeaders.IssueLockingUnlockingApiPreview);
|
return ApiConnection.Delete(ApiUrls.IssueLock(owner, name, number), new object(), AcceptHeaders.IssueLockingUnlockingApiPreview);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>https://developer.github.com/v3/issues/#unlock-an-issue</remarks>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="number">The issue number</param>
|
||||||
|
/// <returns>The created <see cref="Task"/> representing accessing the API.</returns>
|
||||||
|
public Task Unlock(int repositoryId, int number)
|
||||||
|
{
|
||||||
|
return ApiConnection.Delete(ApiUrls.IssueLock(repositoryId, number), new object(), AcceptHeaders.IssueLockingUnlockingApiPreview);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user