mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 20:13:40 +00:00
Remove the obsolete branch protection methods and classes as they are now no longer supported (#1620)
This commit is contained in:
@@ -117,39 +117,6 @@ namespace Octokit
|
||||
return ApiConnection.Get<Branch>(ApiUrls.RepoBranch(repositoryId, branch), null, AcceptHeaders.ProtectedBranchesApiPreview);
|
||||
}
|
||||
|
||||
/// <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("This existing implementation will cease to work when the Branch Protection API preview period ends. Please use other RepositoryBranchesClient methods instead.")]
|
||||
public Task<Branch> Edit(string owner, string name, string branch, BranchUpdate update)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
Ensure.ArgumentNotNullOrEmptyString(branch, "branch");
|
||||
Ensure.ArgumentNotNull(update, "update");
|
||||
|
||||
return ApiConnection.Patch<Branch>(ApiUrls.RepoBranch(owner, name, branch), update, AcceptHeaders.ProtectedBranchesApiPreview);
|
||||
}
|
||||
|
||||
/// <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("This existing implementation will cease to work when the Branch Protection API preview period ends. Please use other RepositoryBranchesClient methods instead.")]
|
||||
public Task<Branch> Edit(long repositoryId, string branch, BranchUpdate update)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(branch, "branch");
|
||||
Ensure.ArgumentNotNull(update, "update");
|
||||
|
||||
return ApiConnection.Patch<Branch>(ApiUrls.RepoBranch(repositoryId, branch), update, AcceptHeaders.ProtectedBranchesApiPreview);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the branch protection settings for the specified branch
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user