Skip to content

Commit

Permalink
#1967 Modified rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
sbouchexbellomie-Philips committed Oct 17, 2024
1 parent 10d8cf6 commit fd8399c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/org/kohsuke/github/GHBranch.java
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ public GHCommit merge(String head, String commitMessage) throws IOException {
* @see https://docs.github.com/en/rest/branches/branches?apiVersion=2022-11-28#rename-a-branch
*/
public GHBranch rename(String name) throws IOException {
return root().createRequest().method("POST").with("new_name", name)
return root().createRequest()
.method("POST")
.with("new_name", name)
.withUrlPath(getApiRoute() + "/rename")
.fetch(GHBranch.class);
}
Expand Down

0 comments on commit fd8399c

Please sign in to comment.