diff --git a/Octokit/Clients/IRepositoriesClient.cs b/Octokit/Clients/IRepositoriesClient.cs
index a82880ea..2243dcd9 100644
--- a/Octokit/Clients/IRepositoriesClient.cs
+++ b/Octokit/Clients/IRepositoriesClient.cs
@@ -332,10 +332,10 @@ namespace Octokit
/// Edit the specified branch with the values given in
///
/// The owner of the repository
- /// The name of the repository
- /// The name of the branch
+ /// The name of the repository
+ /// The name of the branch
/// New values to update the branch with
/// The updated
- Task EditBranch(string owner, string repositoryName, string branchName, BranchUpdate update);
+ Task EditBranch(string owner, string name, string branch, BranchUpdate update);
}
}
diff --git a/Octokit/Clients/RepositoriesClient.cs b/Octokit/Clients/RepositoriesClient.cs
index cf5cbae8..06cbdebd 100644
--- a/Octokit/Clients/RepositoriesClient.cs
+++ b/Octokit/Clients/RepositoriesClient.cs
@@ -161,6 +161,25 @@ namespace Octokit
return ApiConnection.Patch(ApiUrls.Repository(owner, name), update);
}
+ ///
+ /// Edit the specified branch with the values given in
+ ///
+ /// The owner of the repository
+ /// The name of the repository
+ /// The name of the branch
+ /// New values to update the branch with
+ /// The updated
+ public Task 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(ApiUrls.RepoBranch(owner, name, branch), update, previewAcceptsHeader);
+ }
+
///
/// Gets the specified repository.
///
@@ -505,24 +524,5 @@ namespace Octokit
const string previewAcceptsHeader = "application/vnd.github.loki-preview+json";
return ApiConnection.Get(ApiUrls.RepoBranch(owner, repositoryName, branchName), null, previewAcceptsHeader);
}
-
- ///
- /// Edit the specified branch with the values given in
- ///
- /// The owner of the repository
- /// The name of the repository
- /// The name of the branch
- /// New values to update the branch with
- /// The updated
- public Task 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(ApiUrls.RepoBranch(owner, repositoryName, branchName), update, previewAcceptsHeader);
- }
}
}