@@ -277,7 +277,7 @@ public GHPullRequestReviewComment createReviewComment(String body, String sha, S
277277 * Commit message. If null, the default one will be used.
278278 */
279279 public void merge (String msg ) throws IOException {
280- merge (msg ,( String ) null );
280+ merge (msg ,null );
281281 }
282282
283283 /**
@@ -291,7 +291,7 @@ public void merge(String msg) throws IOException {
291291 * SHA that pull request head must match to allow merge.
292292 */
293293 public void merge (String msg , String sha ) throws IOException {
294- new Requester ( root ). method ( "PUT" ). with ( "commit_message" , msg ). with ( "sha" , sha ). to ( getApiRoute ()+ "/merge" );
294+ merge ( msg , sha , null );
295295 }
296296
297297 /**
@@ -304,11 +304,12 @@ public void merge(String msg, String sha) throws IOException {
304304 * @param method
305305 * SHA that pull request head must match to allow merge.
306306 */
307- public void merge (String msg , MergeMethod method ) throws IOException {
307+ public void merge (String msg , String sha , MergeMethod method ) throws IOException {
308308 new Requester (root ).method ("PUT" )
309- .with ("commit_message" ,msg )
310- .with ("merge_method" ,method )
311- .to (getApiRoute ()+"/merge" );
309+ .with ("commit_message" ,msg )
310+ .with ("sha" ,sha )
311+ .with ("merge_method" ,method )
312+ .to (getApiRoute ()+"/merge" );
312313 }
313314
314315 public enum MergeMethod { MERGE , SQUASH , REBASE }
0 commit comments