mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 04:16:51 +00:00
Implement Get Update and Delete BranchProtection methods in ObservableRepositoryBranchesClient
Add unit tests for Observable methods
This commit is contained in:
@@ -92,5 +92,69 @@ namespace Octokit.Reactive
|
||||
/// <param name="update">New values to update the branch with</param>
|
||||
[Obsolete("BranchProtection preview functionality in the GitHub API has had breaking changes. This existing implementation will cease to work when the preview period ends.")]
|
||||
IObservable<Branch> Edit(int repositoryId, string branch, BranchUpdate update);
|
||||
|
||||
/// <summary>
|
||||
/// Get the branch protection settings for the specified branch />
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/repos/branches/#get-branch-protection">API documentation</a> for more details
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="branch">The name of the branch</param>
|
||||
IObservable<BranchProtectionSettings> GetBranchProtection(string owner, string name, string branch);
|
||||
|
||||
/// <summary>
|
||||
/// Get the branch protection settings for the specified branch />
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/repos/branches/#get-branch-protection">API documentation</a> for more details
|
||||
/// </remarks>
|
||||
/// <param name="repositoryId">The Id of the repository</param>
|
||||
/// <param name="branch">The name of the branch</param>
|
||||
IObservable<BranchProtectionSettings> GetBranchProtection(int repositoryId, string branch);
|
||||
|
||||
/// <summary>
|
||||
/// Update the branch protection settings for the specified branch />
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/repos/branches/#update-branch-protection">API documentation</a> for more details
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="branch">The name of the branch</param>
|
||||
/// <param name="update">Branch protection settings</param>
|
||||
IObservable<BranchProtectionSettings> UpdateBranchProtection(string owner, string name, string branch, BranchProtectionSettingsUpdate update);
|
||||
|
||||
/// <summary>
|
||||
/// Update the branch protection settings for the specified branch />
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/repos/branches/#update-branch-protection">API documentation</a> for more details
|
||||
/// </remarks>
|
||||
/// <param name="repositoryId">The Id of the repository</param>
|
||||
/// <param name="update">Branch protection settings</param>
|
||||
IObservable<BranchProtectionSettings> UpdateBranchProtection(int repositoryId, string branch, BranchProtectionSettingsUpdate update);
|
||||
|
||||
/// <summary>
|
||||
/// Remove the branch protection settings for the specified branch />
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/repos/branches/#remove-branch-protection">API documentation</a> for more details
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="branch">The name of the branch</param>
|
||||
IObservable<bool> DeleteBranchProtection(string owner, string name, string branch);
|
||||
|
||||
/// <summary>
|
||||
/// Remove the branch protection settings for the specified branch />
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/repos/branches/#remove-branch-protection">API documentation</a> for more details
|
||||
/// </remarks>
|
||||
/// <param name="repositoryId">The Id of the repository</param>
|
||||
/// <param name="branch">The name of the branch</param>
|
||||
IObservable<bool> DeleteBranchProtection(int repositoryId, string branch);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user