Search in sources :

Example 6 with Pull

use of com.jcabi.github.Pull in project jcabi-github by jcabi.

the class MkPullTest method issueIsPull.

@Test
public void issueIsPull() throws Exception {
    final Pull pull = MkPullTest.pullRequest();
    MatcherAssert.assertThat("Issue is not a pull request", new Issue.Smart(pull.repo().issues().get(pull.number())).isPull(), Matchers.is(true));
}
Also used : Pull(com.jcabi.github.Pull) Test(org.junit.Test)

Example 7 with Pull

use of com.jcabi.github.Pull in project jcabi-github by jcabi.

the class MkPullsTest method canCreateAPull.

/**
 * MkPulls can create a pull.
 * It should create an issue first, and then pull with the same number
 * @throws Exception if some problem inside
 */
@Test
public void canCreateAPull() throws Exception {
    final Repo repo = new MkGithub().randomRepo();
    final Pull pull = repo.pulls().create("hello", "head-branch", "base-branch");
    final Issue.Smart issue = new Issue.Smart(repo.issues().get(pull.number()));
    MatcherAssert.assertThat(issue.title(), Matchers.is("hello"));
}
Also used : Pull(com.jcabi.github.Pull) Issue(com.jcabi.github.Issue) Repo(com.jcabi.github.Repo) Test(org.junit.Test)

Aggregations

Pull (com.jcabi.github.Pull)7 Test (org.junit.Test)7 Issue (com.jcabi.github.Issue)1 Repo (com.jcabi.github.Repo)1 JsonObject (javax.json.JsonObject)1