Skip to content

Commit

Permalink
Created new method to automate the merge
Browse files Browse the repository at this point in the history
  • Loading branch information
vanjikumaran committed Feb 24, 2014
1 parent ce5ae13 commit d145ad8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/org/kohsuke/github/GHRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -822,4 +822,15 @@ public boolean equals(Object obj) {
String getApiTailUrl(String tail) {
return "/repos/" + owner.login + "/" + name +'/'+tail;
}

/**
* Merge a pull request(Automating the Merge button).
*
* @return
* Merged repository that belong to you.
*/
public GHRepository mergePullRequest(int id) throws IOException {

return new Requester(root).method("PUT").to("/repos/" + owner.login + "/" + name +"/"+ id+ "/merge", GHRepository.class).wrap(root);
}
}

0 comments on commit d145ad8

Please sign in to comment.