mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 20:30:41 +00:00
ef0da2f84d
* Tidy up location of existing EditBranch tests * Create RepositoryBranchesClient and move the GetBranch GetAllBranches and EditBranch methods to it, obsoleting the old ones * Add tests for the new RepositoryBranchesClient (keeping old tests for RepositoriesClient around for now) * Disable obsolete warning on reactive client temporarily * Create observable repository branches client and move GetBranch, GetAllBranches, EditBranch methods to it, obsoleting the old ones * Add tests for observable repository branches client, leave old tests in place for now * Fix projects... * Fix whitespace
97 lines
4.8 KiB
C#
97 lines
4.8 KiB
C#
using System;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace Octokit.Reactive
|
|
{
|
|
/// <summary>
|
|
/// A client for GitHub's Repository Branches API.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="https://developer.github.com/v3/repos/branches">Repository Branches API documentation</a> for more details.
|
|
/// </remarks>
|
|
public interface IObservableRepositoryBranchesClient
|
|
{
|
|
/// <summary>
|
|
/// Gets all the branches for the specified repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-branches">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>
|
|
IObservable<Branch> GetAll(string owner, string name);
|
|
|
|
/// <summary>
|
|
/// Gets all the branches for the specified repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-branches">API documentation</a> for more details
|
|
/// </remarks>
|
|
/// <param name="repositoryId">The ID of the repository</param>
|
|
IObservable<Branch> GetAll(int repositoryId);
|
|
|
|
/// <summary>
|
|
/// Gets all the branches for the specified repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-branches">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="options">Options for changing the API response</param>
|
|
IObservable<Branch> GetAll(string owner, string name, ApiOptions options);
|
|
|
|
/// <summary>
|
|
/// Gets all the branches for the specified repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-branches">API documentation</a> for more details
|
|
/// </remarks>
|
|
/// <param name="repositoryId">The ID of the repository</param>
|
|
/// <param name="options">Options for changing the API response</param>
|
|
IObservable<Branch> GetAll(int repositoryId, ApiOptions options);
|
|
|
|
/// <summary>
|
|
/// Gets the specified branch.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="https://developer.github.com/v3/repos/branches/#get-branch">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>
|
|
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
|
|
IObservable<Branch> Get(string owner, string name, string branch);
|
|
|
|
/// <summary>
|
|
/// Gets the specified branch.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="https://developer.github.com/v3/repos/branches/#get-branch">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>
|
|
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
|
|
IObservable<Branch> Get(int repositoryId, string branch);
|
|
|
|
/// <summary>
|
|
/// Edit the specified branch with the values given in <paramref name="update"/>
|
|
/// </summary>
|
|
/// <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">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(string owner, string name, string branch, BranchUpdate update);
|
|
|
|
/// <summary>
|
|
/// Edit the specified branch with the values given in <paramref name="update"/>
|
|
/// </summary>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="branch">The name of the branch</param>
|
|
/// <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);
|
|
}
|
|
}
|