public PagedIterator<GHPullRequestReviewComment> _iterator(int pageSize) { return new PagedIterator<GHPullRequestReviewComment>( owner.root.retrieve() .asIterator(getApiRoute() + "/comments", GHPullRequestReviewComment[].class, pageSize)) { protected void wrapUp(GHPullRequestReviewComment[] page) { for (GHPullRequestReviewComment c : page) c.wrapUp(owner); } }; } };
/** * @deprecated * Former preview method that changed when it got public. Left here for backward compatibility. * Use {@link #submit(String, GHPullRequestReviewEvent)} */ public void submit(String body, GHPullRequestReviewState state) throws IOException { submit(body,state.toEvent()); }
@Override void wrapUp(GitHub root) { super.wrapUp(root); if (review==null) throw new IllegalStateException("Expected pull_request_review payload, but got something else. Maybe we've got another type of event?"); review.wrapUp(pull_request); if (repository!=null) { repository.wrap(root); pull_request.wrapUp(repository); } else { pull_request.wrapUp(root); } } }
@Override void wrapUp(GitHub root) { super.wrapUp(root); if (review==null) throw new IllegalStateException("Expected pull_request_review payload, but got something else. Maybe we've got another type of event?"); review.wrapUp(pull_request); if (repository!=null) { repository.wrap(root); pull_request.wrapUp(repository); } else { pull_request.wrapUp(root); } } }
public PagedIterator<GHPullRequestReviewComment> _iterator(int pageSize) { return new PagedIterator<GHPullRequestReviewComment>( owner.root.retrieve() .asIterator(getApiRoute() + "/comments", GHPullRequestReviewComment[].class, pageSize)) { protected void wrapUp(GHPullRequestReviewComment[] page) { for (GHPullRequestReviewComment c : page) c.wrapUp(owner); } }; } };
public GHPullRequestReview create() throws IOException { return builder.method("POST")._with("comments",comments) .to(pr.getApiRoute() + "/reviews", GHPullRequestReview.class) .wrapUp(pr); }
/** * @deprecated * Former preview method that changed when it got public. Left here for backward compatibility. * Use {@link #submit(String, GHPullRequestReviewEvent)} */ public void submit(String body, GHPullRequestReviewState state) throws IOException { submit(body,state.toEvent()); }
/** * Deletes this review. */ public void delete() throws IOException { new Requester(owner.root).method("DELETE") .to(getApiRoute()); }
public GHPullRequestReview create() throws IOException { return builder.method("POST")._with("comments",comments) .to(pr.getApiRoute() + "/reviews", GHPullRequestReview.class) .wrapUp(pr); }
/** * Deletes this review. */ public void delete() throws IOException { new Requester(owner.root).method("DELETE") .to(getApiRoute()); }
/** * Dismisses this review. */ public void dismiss(String message) throws IOException { new Requester(owner.root).method("PUT") .with("message", message) .to(getApiRoute()+"/dismissals"); state = GHPullRequestReviewState.DISMISSED; }
/** * Dismisses this review. */ public void dismiss(String message) throws IOException { new Requester(owner.root).method("PUT") .with("message", message) .to(getApiRoute()+"/dismissals"); state = GHPullRequestReviewState.DISMISSED; }
/** * Updates the comment. */ public void submit(String body, GHPullRequestReviewEvent event) throws IOException { new Requester(owner.root).method("POST") .with("body", body) .with("event", event.action()) .to(getApiRoute()+"/events",this); this.body = body; this.state = event.toState(); }
/** * Updates the comment. */ public void submit(String body, GHPullRequestReviewEvent event) throws IOException { new Requester(owner.root).method("POST") .with("body", body) .with("event", event.action()) .to(getApiRoute()+"/events",this); this.body = body; this.state = event.toState(); }