Skip to content

Commit f95ec6f

Browse files
committed
Fixed getBranch() when branch name was not URL safe.
1 parent 411e060 commit f95ec6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/gitlab4j/api/RepositoryApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public Pager<Branch> getBranches(Integer projectId, int itemsPerPage) throws Git
8686
* @throws GitLabApiException if any exception occurs
8787
*/
8888
public Branch getBranch(Integer projectId, String branchName) throws GitLabApiException {
89-
Response response = get(Response.Status.OK, null, "projects", projectId, "repository", "branches", branchName);
89+
Response response = get(Response.Status.OK, null, "projects", projectId, "repository", "branches", urlEncode(branchName));
9090
return (response.readEntity(Branch.class));
9191
}
9292

0 commit comments

Comments
 (0)