mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-08 04:40:54 +00:00
Make variable names consistent and move EditBranch() function to preserve alphabetical ordering
This commit is contained in:
@@ -332,10 +332,10 @@ namespace Octokit
|
||||
/// Edit the specified branch with the values given in <paramref name="update"/>
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="repositoryName">The name of the repository</param>
|
||||
/// <param name="branchName">The name of the branch</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>
|
||||
/// <returns>The updated <see cref="T:Octokit.Branch"/></returns>
|
||||
Task<Branch> EditBranch(string owner, string repositoryName, string branchName, BranchUpdate update);
|
||||
Task<Branch> EditBranch(string owner, string name, string branch, BranchUpdate update);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,6 +161,25 @@ namespace Octokit
|
||||
return ApiConnection.Patch<Repository>(ApiUrls.Repository(owner, name), update);
|
||||
}
|
||||
|
||||
/// <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>
|
||||
/// <returns>The updated <see cref="T:Octokit.Branch"/></returns>
|
||||
public Task<Branch> EditBranch(string owner, string name, string branch, BranchUpdate update)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "repositoryName");
|
||||
Ensure.ArgumentNotNullOrEmptyString(branch, "branchName");
|
||||
Ensure.ArgumentNotNull(update, "update");
|
||||
|
||||
const string previewAcceptsHeader = "application/vnd.github.loki-preview+json";
|
||||
return ApiConnection.Patch<Branch>(ApiUrls.RepoBranch(owner, name, branch), update, previewAcceptsHeader);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the specified repository.
|
||||
/// </summary>
|
||||
@@ -505,24 +524,5 @@ namespace Octokit
|
||||
const string previewAcceptsHeader = "application/vnd.github.loki-preview+json";
|
||||
return ApiConnection.Get<Branch>(ApiUrls.RepoBranch(owner, repositoryName, branchName), null, previewAcceptsHeader);
|
||||
}
|
||||
|
||||
/// <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="repositoryName">The name of the repository</param>
|
||||
/// <param name="branchName">The name of the branch</param>
|
||||
/// <param name="update">New values to update the branch with</param>
|
||||
/// <returns>The updated <see cref="T:Octokit.Branch"/></returns>
|
||||
public Task<Branch> EditBranch(string owner, string repositoryName, string branchName, BranchUpdate update)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(repositoryName, "repositoryName");
|
||||
Ensure.ArgumentNotNullOrEmptyString(branchName, "branchName");
|
||||
Ensure.ArgumentNotNull(update, "update");
|
||||
|
||||
const string previewAcceptsHeader = "application/vnd.github.loki-preview+json";
|
||||
return ApiConnection.Patch<Branch>(ApiUrls.RepoBranch(owner, repositoryName, branchName), update, previewAcceptsHeader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user