Add 'Preview' support for MergeMethod on GHPullRequest

- Add 'polaris' preview
- Add MergeMethod Enum
- Add merge method to GHPullRequest which takes a MergeMethod
This commit is contained in:
Greg Gianforcaro
2017-01-27 23:36:54 -05:00
parent 1f4325e7db
commit 5b156006fb
3 changed files with 38 additions and 1 deletions

View File

@@ -69,6 +69,19 @@ public class PullRequestTest extends AbstractGitHubApiTestBase {
fail();
}
@Test
public void testSquashMerge() throws Exception {
String name = rnd.next();
GHRef masterRef = getRepository().getRef("heads/master");
GHRef branchRef = getRepository().createRef("refs/heads/" + name, masterRef.getObject().getSha());
getRepository().createContent(name, name, name, name);
Thread.sleep(1000);
GHPullRequest p = getRepository().createPullRequest(name, name, "master", "## test squash");
Thread.sleep(1000);
p.merge("squash merge", GHPullRequest.MergeMethod.SQUASH);
branchRef.delete();
}
@Test
// Requires push access to the test repo to pass
public void setLabels() throws Exception {