Merge pull request #333

This commit is contained in:
Kohsuke Kawaguchi
2017-09-09 12:17:39 -07:00
3 changed files with 35 additions and 1 deletions

View File

@@ -99,6 +99,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", null, GHPullRequest.MergeMethod.SQUASH);
branchRef.delete();
}
@Test
// Requires push access to the test repo to pass
public void setLabels() throws Exception {