protected String getApiRoute() { return owner.getApiRoute()+"/reviews/"+id; }
protected String getApiRoute() { return owner.getApiRoute()+"/reviews/"+id; }
public PagedIterator<GHPullRequestCommitDetail> _iterator(int pageSize) { return new PagedIterator<GHPullRequestCommitDetail>(root.retrieve().asIterator( String.format("%s/commits", getApiRoute()), GHPullRequestCommitDetail[].class, pageSize)) { @Override protected void wrapUp(GHPullRequestCommitDetail[] page) { for (GHPullRequestCommitDetail c : page) c.wrapUp(GHPullRequest.this); } }; } };
public PagedIterator<GHPullRequestFileDetail> _iterator(int pageSize) { return new PagedIterator<GHPullRequestFileDetail>(root.retrieve().asIterator(String.format("%s/files", getApiRoute()), GHPullRequestFileDetail[].class, pageSize)) { @Override protected void wrapUp(GHPullRequestFileDetail[] page) { } }; } };
public PagedIterator<GHPullRequestFileDetail> _iterator(int pageSize) { return new PagedIterator<GHPullRequestFileDetail>(root.retrieve().asIterator(String.format("%s/files", getApiRoute()), GHPullRequestFileDetail[].class, pageSize)) { @Override protected void wrapUp(GHPullRequestFileDetail[] page) { } }; } };
public PagedIterator<GHPullRequestCommitDetail> _iterator(int pageSize) { return new PagedIterator<GHPullRequestCommitDetail>(root.retrieve().asIterator( String.format("%s/commits", getApiRoute()), GHPullRequestCommitDetail[].class, pageSize)) { @Override protected void wrapUp(GHPullRequestCommitDetail[] page) { for (GHPullRequestCommitDetail c : page) c.wrapUp(GHPullRequest.this); } }; } };
public PagedIterator<GHPullRequestReview> _iterator(int pageSize) { return new PagedIterator<GHPullRequestReview>(root.retrieve() .asIterator(String.format("%s/reviews", getApiRoute()), GHPullRequestReview[].class, pageSize)) { @Override protected void wrapUp(GHPullRequestReview[] page) { for (GHPullRequestReview r: page) { r.wrapUp(GHPullRequest.this); } } }; } };
public PagedIterator<GHPullRequestReview> _iterator(int pageSize) { return new PagedIterator<GHPullRequestReview>(root.retrieve() .asIterator(String.format("%s/reviews", getApiRoute()), GHPullRequestReview[].class, pageSize)) { @Override protected void wrapUp(GHPullRequestReview[] page) { for (GHPullRequestReview r: page) { r.wrapUp(GHPullRequest.this); } } }; } };
public PagedIterator<GHPullRequestReviewComment> _iterator(int pageSize) { return new PagedIterator<GHPullRequestReviewComment>(root.retrieve().asIterator(getApiRoute() + COMMENTS_ACTION, GHPullRequestReviewComment[].class, pageSize)) { protected void wrapUp(GHPullRequestReviewComment[] page) { for (GHPullRequestReviewComment c : page) c.wrapUp(GHPullRequest.this); } }; } };
public PagedIterator<GHPullRequestReviewComment> _iterator(int pageSize) { return new PagedIterator<GHPullRequestReviewComment>(root.retrieve().asIterator(getApiRoute() + COMMENTS_ACTION, GHPullRequestReviewComment[].class, pageSize)) { protected void wrapUp(GHPullRequestReviewComment[] page) { for (GHPullRequestReviewComment c : page) c.wrapUp(GHPullRequest.this); } }; } };
public PagedIterator<GHPullRequestReviewComment> iterator() { return new PagedIterator<GHPullRequestReviewComment>(root.retrieve().asIterator(getApiRoute() + "/comments", GHPullRequestReviewComment[].class)) { protected void wrapUp(GHPullRequestReviewComment[] page) { for (GHPullRequestReviewComment c : page) c.wrapUp(GHPullRequest.this); } }; } };
public void requestReviewers(List<GHUser> reviewers) throws IOException { new Requester(root).method("POST") .withLogins("reviewers", reviewers) .to(getApiRoute() + REQUEST_REVIEWERS); }
public GHPullRequestReview create() throws IOException { return builder.method("POST")._with("comments",comments) .to(pr.getApiRoute() + "/reviews", GHPullRequestReview.class) .wrapUp(pr); }
public void requestReviewers(List<GHUser> reviewers) throws IOException { new Requester(root).method("POST") .withLogins("reviewers", reviewers) .to(getApiRoute() + REQUEST_REVIEWERS); }
public GHPullRequestReview create() throws IOException { return builder.method("POST")._with("comments",comments) .to(pr.getApiRoute() + "/reviews", GHPullRequestReview.class) .wrapUp(pr); }
/** * Merge this pull request. * * The equivalent of the big green "Merge pull request" button. * * @param msg * Commit message. If null, the default one will be used. * @param sha * SHA that pull request head must match to allow merge. */ public void merge(String msg, String sha) throws IOException { new Requester(root).method("PUT").with("commit_message",msg).with("sha",sha).to(getApiRoute()+"/merge"); }
/** * Merge this pull request, using the specified merge method. * * The equivalent of the big green "Merge pull request" button. * * @param msg * Commit message. If null, the default one will be used. * @param method * SHA that pull request head must match to allow merge. */ public void merge(String msg, String sha, MergeMethod method) throws IOException { new Requester(root).method("PUT") .with("commit_message", msg) .with("sha", sha) .with("merge_method", method) .to(getApiRoute() + "/merge"); }
public GHPullRequestReviewComment createReviewComment(String body, String sha, String path, int position) throws IOException { return new Requester(root).method("POST") .with("body", body) .with("commit_id", sha) .with("path", path) .with("position", position) .to(getApiRoute() + COMMENTS_ACTION, GHPullRequestReviewComment.class).wrapUp(this); }
public GHPullRequestReviewComment createReviewComment(String body, String sha, String path, int position) throws IOException { return new Requester(root).method("POST") .with("body", body) .with("commit_id", sha) .with("path", path) .with("position", position) .to(getApiRoute() + "/comments", GHPullRequestReviewComment.class).wrapUp(this); }
public GHPullRequestReviewComment createReviewComment(String body, String sha, String path, int position) throws IOException { return new Requester(root).method("POST") .with("body", body) .with("commit_id", sha) .with("path", path) .with("position", position) .to(getApiRoute() + COMMENTS_ACTION, GHPullRequestReviewComment.class).wrapUp(this); }