public GHDeploymentBuilder ref(String branch) { builder.with("ref",branch); return this; } public GHDeploymentBuilder task(String task) {
@Preview @Deprecated public GHReaction createReaction(ReactionContent content) throws IOException { return new Requester(owner.root) .withPreview(SQUIRREL_GIRL) .with("content", content.getContent()) .to(getApiRoute()+"/reactions", GHReaction.class).wrap(root); }
/** * @param message the commit message */ public GHCommitBuilder message(String message) { req.with("message", message); return this; }
/** * Allow or disallow merging pull requests with a merge commit. */ public GHCreateRepositoryBuilder allowMergeCommit(boolean b) { this.builder.with("allow_merge_commit",b); return this; }
/** * Optional. * * @param draft {@code true} to create a draft (unpublished) release, {@code false} to create a published one. * Default is {@code false}. */ public GHReleaseBuilder draft(boolean draft) { builder.with("draft", draft); return this; }
/** * Optional * * @param prerelease {@code true} to identify the release as a prerelease. {@code false} to identify the release * as a full release. Default is {@code false}. */ public GHReleaseBuilder prerelease(boolean prerelease) { builder.with("prerelease", prerelease); return this; }
/** * GItHub login or email address by which to filter by commit author. */ public GHCommitQueryBuilder author(String author) { req.with("author",author); return this; }
/** * @param body The release notes body. */ public GHReleaseUpdater body(String body) { builder.with("body", body); return this; }
/** * Used when updating (but not creating a new content) to specify * Thetblob SHA of the file being replaced. */ public GHContentBuilder sha(String sha) { req.with("sha", sha); return this; }
/** * Enables issue tracker */ public GHCreateRepositoryBuilder issues(boolean b) { this.builder.with("has_issues",b); return this; }
/** * Subscribes to this conversation to get notifications. */ public GHSubscription subscribe(boolean subscribed, boolean ignored) throws IOException { return new Requester(root) .with("subscribed", subscribed) .with("ignored", ignored) .method("PUT").to(subscription_url, GHSubscription.class).wrapUp(root); }
/** * Updates this ref to the specified commit. * * @param sha * The SHA1 value to set this reference to * @param force * Whether or not to force this ref update. */ public void updateTo(String sha, Boolean force) throws IOException { new Requester(root) .with("sha", sha).with("force", force).method("PATCH").to(url, GHRef.class).wrap(root); }
public PagedIterator<GHRepository> _iterator(int pageSize) { return new PagedIterator<GHRepository>(retrieve().with("since",since).asIterator("/repositories", GHRepository[].class, pageSize)) { @Override protected void wrapUp(GHRepository[] page) { for (GHRepository c : page) c.wrap(GitHub.this); } }; } };
public PagedIterator<GHRepository> _iterator(int pageSize) { return new PagedIterator<GHRepository>(root.retrieve().with("sort",sort).asIterator(getApiTailUrl("forks"), GHRepository[].class, pageSize)) { @Override protected void wrapUp(GHRepository[] page) { for (GHRepository c : page) { c.wrap(root); } } }; } };
public PagedIterator<GHIssue> _iterator(int pageSize) { return new PagedIterator<GHIssue>(root.retrieve().with("state",state).asIterator(getApiTailUrl("issues"), GHIssue[].class, pageSize)) { @Override protected void wrapUp(GHIssue[] page) { for (GHIssue c : page) c.wrap(GHRepository.this); } }; } };
/** * Updates the body of the commit message. */ public void update(String body) throws IOException { new Requester(owner.root) .with("body", body) .method("PATCH").to(getApiTail(), GHCommitComment.class); this.body = body; }
public GHContent getFileContent(String path, String ref) throws IOException { Requester requester = root.retrieve(); String target = getApiTailUrl("contents/" + path); return requester.with("ref",ref).to(target, GHContent.class).wrap(this); }