mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
* add active lock reason to PR * update docs * refactor: extract lock and unlock from IIssuesClient create ILockUnlockClient so both IIssuesClient and IPullRequestClient can access lock and unlock methods. * refactor LockUnlock for reactive clients * Update doc to include lock unlock sample code * Use Assert.Null to check null value in test Co-authored-by: notauserx <notauserx@users.noreply.github.com>
48 lines
2.3 KiB
C#
48 lines
2.3 KiB
C#
using System;
|
|
using System.Reactive;
|
|
|
|
namespace Octokit.Reactive
|
|
{
|
|
/// <summary>
|
|
/// Client to manage locking/unlocking a conversation for an Issue or a Pull request
|
|
/// </summary>
|
|
public interface IObservableLockUnlockClient
|
|
{
|
|
/// <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="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="number">The issue number</param>
|
|
/// <param name="lockReason">The reason for locking the issue</param>
|
|
IObservable<Unit> Lock(string owner, string name, int number, LockReason? lockReason = null);
|
|
|
|
/// <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>
|
|
/// <param name="lockReason">The reason for locking the issue</param>
|
|
IObservable<Unit> Lock(long repositoryId, int number, LockReason? lockReason = null);
|
|
|
|
/// <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>
|
|
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>
|
|
IObservable<Unit> Unlock(long repositoryId, int number);
|
|
}
|
|
}
|