Make variable names consistent and move EditBranch() function to preserve alphabetical ordering

This commit is contained in:
Ryan Gribble
2015-12-13 23:05:30 +10:00
parent 56e4f15e62
commit 34bb670030
2 changed files with 22 additions and 22 deletions
+3 -3
View File
@@ -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);
}
}
+19 -19
View File
@@ -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);
}
}
}