This method can return null.

I think what's going on is that GitHub takes some non-zero amount of time to compute this value, and our test runs too fast sometimes and try to fetch a PR before its mergeability is computed
This commit is contained in:
Kohsuke Kawaguchi
2015-07-17 15:06:39 +03:00
parent 5f2c84a913
commit f8408bd29f

View File

@@ -82,7 +82,7 @@ public class PullRequestTest extends AbstractGitHubApiTestBase {
PagedIterable<GHPullRequest> ghPullRequests = getRepository().listPullRequests(GHIssueState.OPEN);
for (GHPullRequest pr : ghPullRequests) {
assertNotNull(pr.getUser().root);
assertFalse(pr.getMergeable());
pr.getMergeable();
assertNotNull(pr.getUser().root);
}
}