PullRequest review state and event do not have same values

this fixes parsing of response of WS call submitting a review to fail
when event of new review is REQUEST_CHANGES
also, specifying event when creating a pending PR review is useless and
providing it when submitting the review is enough
This commit is contained in:
Sébastien Lesaint
2017-11-30 14:38:47 +01:00
parent e25ae27a15
commit 15991fd2f7
5 changed files with 56 additions and 29 deletions

View File

@@ -45,7 +45,7 @@ public class PullRequestTest extends AbstractGitHubApiTestBase {
assertThat(review.getState(), is(GHPullRequestReviewState.PENDING));
assertThat(review.getBody(), is("Some draft review"));
assertThat(review.getCommitId(), notNullValue());
review.submit("Some review comment", GHPullRequestReviewState.COMMENTED);
review.submit("Some review comment", GHPullRequestReviewEvent.COMMENT);
List<GHPullRequestReviewComment> comments = review.listReviewComments().asList();
assertEquals(1, comments.size());
GHPullRequestReviewComment comment = comments.get(0);