diff --git a/src/main/java/org/kohsuke/github/GHApp.java b/src/main/java/org/kohsuke/github/GHApp.java index ca4df1f576..20e81090f1 100644 --- a/src/main/java/org/kohsuke/github/GHApp.java +++ b/src/main/java/org/kohsuke/github/GHApp.java @@ -189,7 +189,7 @@ GHApp wrapUp(GitHub root) { * @return a list of App installations * @see List installations */ - @Preview + @Preview(MACHINE_MAN) @Deprecated public PagedIterable listInstallations() { return root.createRequest() @@ -210,7 +210,7 @@ public PagedIterable listInstallations() { * on error * @see Get an installation */ - @Preview + @Preview(MACHINE_MAN) @Deprecated public GHAppInstallation getInstallationById(long id) throws IOException { return root.createRequest() @@ -233,7 +233,7 @@ public GHAppInstallation getInstallationById(long id) throws IOException { * @see Get an organization * installation */ - @Preview + @Preview(MACHINE_MAN) @Deprecated public GHAppInstallation getInstallationByOrganization(String name) throws IOException { return root.createRequest() @@ -258,7 +258,7 @@ public GHAppInstallation getInstallationByOrganization(String name) throws IOExc * @see Get a repository * installation */ - @Preview + @Preview(MACHINE_MAN) @Deprecated public GHAppInstallation getInstallationByRepository(String ownerName, String repositoryName) throws IOException { return root.createRequest() @@ -280,7 +280,7 @@ public GHAppInstallation getInstallationByRepository(String ownerName, String re * on error * @see Get a user installation */ - @Preview + @Preview(MACHINE_MAN) @Deprecated public GHAppInstallation getInstallationByUser(String name) throws IOException { return root.createRequest() diff --git a/src/main/java/org/kohsuke/github/GHAppCreateTokenBuilder.java b/src/main/java/org/kohsuke/github/GHAppCreateTokenBuilder.java index e1cc198c47..a1fd02e004 100644 --- a/src/main/java/org/kohsuke/github/GHAppCreateTokenBuilder.java +++ b/src/main/java/org/kohsuke/github/GHAppCreateTokenBuilder.java @@ -78,7 +78,7 @@ public GHAppCreateTokenBuilder permissions(Map permiss * @throws IOException * on error */ - @Preview + @Preview(MACHINE_MAN) @Deprecated public GHAppInstallationToken create() throws IOException { return builder.method("POST") diff --git a/src/main/java/org/kohsuke/github/GHAppInstallation.java b/src/main/java/org/kohsuke/github/GHAppInstallation.java index c3cffc2955..407504efbc 100644 --- a/src/main/java/org/kohsuke/github/GHAppInstallation.java +++ b/src/main/java/org/kohsuke/github/GHAppInstallation.java @@ -124,7 +124,7 @@ public String getRepositoriesUrl() { * * @return the paged iterable */ - @Preview + @Preview(MACHINE_MAN) @Deprecated public PagedSearchIterable listRepositories() { GitHubRequest request; @@ -322,7 +322,7 @@ GHAppInstallation wrapUp(GitHub root) { * on error * @see Delete an installation */ - @Preview + @Preview(GAMBIT) @Deprecated public void deleteInstallation() throws IOException { root.createRequest() diff --git a/src/main/java/org/kohsuke/github/GHBranch.java b/src/main/java/org/kohsuke/github/GHBranch.java index 6788c94617..799ea71aa9 100644 --- a/src/main/java/org/kohsuke/github/GHBranch.java +++ b/src/main/java/org/kohsuke/github/GHBranch.java @@ -89,7 +89,7 @@ public boolean isProtected() { * * @return API URL that deals with the protection of this branch. */ - @Preview + @Preview(Previews.LUKE_CAGE) @Deprecated public URL getProtectionUrl() { return GitHubClient.parseURL(protection_url); @@ -102,6 +102,8 @@ public URL getProtectionUrl() { * @throws IOException * the io exception */ + @Preview(Previews.LUKE_CAGE) + @Deprecated public GHBranchProtection getProtection() throws IOException { return root.createRequest() .withPreview(Previews.LUKE_CAGE) @@ -135,7 +137,7 @@ public void disableProtection() throws IOException { * @return GHBranchProtectionBuilder for enabling protection * @see GHCommitStatus#getContext() GHCommitStatus#getContext() */ - @Preview + @Preview(Previews.LUKE_CAGE) @Deprecated public GHBranchProtectionBuilder enableProtection() { return new GHBranchProtectionBuilder(this); diff --git a/src/main/java/org/kohsuke/github/GHBranchProtection.java b/src/main/java/org/kohsuke/github/GHBranchProtection.java index f10a558a75..4f9728fcfe 100644 --- a/src/main/java/org/kohsuke/github/GHBranchProtection.java +++ b/src/main/java/org/kohsuke/github/GHBranchProtection.java @@ -43,7 +43,7 @@ public class GHBranchProtection { * @throws IOException * the io exception */ - @Preview + @Preview(ZZZAX) @Deprecated public void enabledSignedCommits() throws IOException { requester().method("POST").withUrlPath(url + REQUIRE_SIGNATURES_URI).fetch(RequiredSignatures.class); @@ -55,7 +55,7 @@ public void enabledSignedCommits() throws IOException { * @throws IOException * the io exception */ - @Preview + @Preview(ZZZAX) @Deprecated public void disableSignedCommits() throws IOException { requester().method("DELETE").withUrlPath(url + REQUIRE_SIGNATURES_URI).send(); @@ -86,7 +86,7 @@ public RequiredReviews getRequiredReviews() { * @throws IOException * the io exception */ - @Preview + @Preview(ZZZAX) @Deprecated public boolean getRequiredSignatures() throws IOException { return requester().withUrlPath(url + REQUIRE_SIGNATURES_URI).fetch(RequiredSignatures.class).enabled; diff --git a/src/main/java/org/kohsuke/github/GHCheckRun.java b/src/main/java/org/kohsuke/github/GHCheckRun.java index 33d62c8281..fc890ffb2b 100644 --- a/src/main/java/org/kohsuke/github/GHCheckRun.java +++ b/src/main/java/org/kohsuke/github/GHCheckRun.java @@ -298,7 +298,7 @@ public static enum AnnotationLevel { * * @return a builder which you should customize, then call {@link GHCheckRunBuilder#create} */ - @Preview + @Preview(Previews.ANTIOPE) @Deprecated public @NonNull GHCheckRunBuilder update() { return new GHCheckRunBuilder(owner, getId()); diff --git a/src/main/java/org/kohsuke/github/GHCheckRunBuilder.java b/src/main/java/org/kohsuke/github/GHCheckRunBuilder.java index 6554dec313..9623f97214 100644 --- a/src/main/java/org/kohsuke/github/GHCheckRunBuilder.java +++ b/src/main/java/org/kohsuke/github/GHCheckRunBuilder.java @@ -46,7 +46,7 @@ * @see documentation */ @SuppressFBWarnings(value = "URF_UNREAD_FIELD", justification = "Jackson serializes these even without a getter") -@Preview +@Preview(Previews.ANTIOPE) @Deprecated public final class GHCheckRunBuilder { diff --git a/src/main/java/org/kohsuke/github/GHCommit.java b/src/main/java/org/kohsuke/github/GHCommit.java index 01784bf842..e201842bd5 100644 --- a/src/main/java/org/kohsuke/github/GHCommit.java +++ b/src/main/java/org/kohsuke/github/GHCommit.java @@ -11,6 +11,7 @@ import java.util.Date; import java.util.List; +import static org.kohsuke.github.Previews.ANTIOPE; import static org.kohsuke.github.Previews.GROOT; /** @@ -453,7 +454,7 @@ private GHUser resolveUser(User author) throws IOException { * * @return {@link PagedIterable} with the pull requests which contain this commit */ - @Preview + @Preview(GROOT) @Deprecated public PagedIterable listPullRequests() { return owner.root.createRequest() @@ -469,7 +470,7 @@ public PagedIterable listPullRequests() { * @throws IOException * the io exception */ - @Preview + @Preview(GROOT) @Deprecated public PagedIterable listBranchesWhereHead() throws IOException { return owner.root.createRequest() @@ -565,7 +566,7 @@ public GHCommitStatus getLastStatus() throws IOException { * @throws IOException * on error */ - @Preview + @Preview(ANTIOPE) @Deprecated public PagedIterable getCheckRuns() throws IOException { return owner.getCheckRuns(sha); diff --git a/src/main/java/org/kohsuke/github/GHCommitComment.java b/src/main/java/org/kohsuke/github/GHCommitComment.java index 18298552f3..321067a0da 100644 --- a/src/main/java/org/kohsuke/github/GHCommitComment.java +++ b/src/main/java/org/kohsuke/github/GHCommitComment.java @@ -133,7 +133,7 @@ public GHReaction createReaction(ReactionContent content) throws IOException { .wrap(owner.root); } - @Preview + @Preview(SQUIRREL_GIRL) @Deprecated public PagedIterable listReactions() { return owner.root.createRequest() diff --git a/src/main/java/org/kohsuke/github/GHCommitSearchBuilder.java b/src/main/java/org/kohsuke/github/GHCommitSearchBuilder.java index 30f228d238..9338d26d92 100644 --- a/src/main/java/org/kohsuke/github/GHCommitSearchBuilder.java +++ b/src/main/java/org/kohsuke/github/GHCommitSearchBuilder.java @@ -10,7 +10,7 @@ * @author Marc de Verdelhan * @see GitHub#searchCommits() GitHub#searchCommits() */ -@Preview +@Preview(Previews.CLOAK) @Deprecated public class GHCommitSearchBuilder extends GHSearchBuilder { GHCommitSearchBuilder(GitHub root) { diff --git a/src/main/java/org/kohsuke/github/GHCreateRepositoryBuilder.java b/src/main/java/org/kohsuke/github/GHCreateRepositoryBuilder.java index 43d59ea8e9..ed8f72a845 100644 --- a/src/main/java/org/kohsuke/github/GHCreateRepositoryBuilder.java +++ b/src/main/java/org/kohsuke/github/GHCreateRepositoryBuilder.java @@ -3,7 +3,7 @@ import java.io.IOException; import java.net.URL; -import static org.kohsuke.github.Previews.BAPTISE; +import static org.kohsuke.github.Previews.BAPTISTE; /** * Creates a repository @@ -209,10 +209,10 @@ public GHCreateRepositoryBuilder team(GHTeam team) { * true if enabled * @return a builder to continue with building */ - @Preview + @Preview(BAPTISTE) @Deprecated public GHCreateRepositoryBuilder templateRepository(boolean enabled) { - this.builder.withPreview(BAPTISE); + this.builder.withPreview(BAPTISTE); this.builder.with("is_template", enabled); return this; } @@ -239,10 +239,10 @@ public GHCreateRepositoryBuilder owner(String owner) { * @return a builder to continue with building * @see GitHub API Previews */ - @Preview + @Preview(BAPTISTE) @Deprecated public GHCreateRepositoryBuilder fromTemplateRepository(String templateOwner, String templateRepo) { - this.builder.withPreview(BAPTISE); + this.builder.withPreview(BAPTISTE); this.apiUrlTail = "/repos/" + templateOwner + "/" + templateRepo + "/generate"; return this; } diff --git a/src/main/java/org/kohsuke/github/GHDiscussion.java b/src/main/java/org/kohsuke/github/GHDiscussion.java index 1187747849..93a9ee2328 100644 --- a/src/main/java/org/kohsuke/github/GHDiscussion.java +++ b/src/main/java/org/kohsuke/github/GHDiscussion.java @@ -130,7 +130,7 @@ static PagedIterable readAll(GHTeam team) throws IOException { * * @return a {@link GHDiscussion.Updater} */ - @Preview + @Preview(Previews.SQUIRREL_GIRL) @Deprecated public GHDiscussion.Updater update() { return new GHDiscussion.Updater(this); @@ -141,7 +141,7 @@ public GHDiscussion.Updater update() { * * @return a {@link GHDiscussion.Setter} */ - @Preview + @Preview(Previews.SQUIRREL_GIRL) @Deprecated public GHDiscussion.Setter set() { return new GHDiscussion.Setter(this); diff --git a/src/main/java/org/kohsuke/github/GHIssue.java b/src/main/java/org/kohsuke/github/GHIssue.java index e661294ff4..6a2f13fb66 100644 --- a/src/main/java/org/kohsuke/github/GHIssue.java +++ b/src/main/java/org/kohsuke/github/GHIssue.java @@ -448,7 +448,7 @@ public PagedIterable listComments() throws IOException { .toIterable(GHIssueComment[].class, item -> item.wrapUp(this)); } - @Preview + @Preview(SQUIRREL_GIRL) @Deprecated public GHReaction createReaction(ReactionContent content) throws IOException { return root.createRequest() @@ -460,7 +460,7 @@ public GHReaction createReaction(ReactionContent content) throws IOException { .wrap(root); } - @Preview + @Preview(SQUIRREL_GIRL) @Deprecated public PagedIterable listReactions() { return root.createRequest() diff --git a/src/main/java/org/kohsuke/github/GHIssueComment.java b/src/main/java/org/kohsuke/github/GHIssueComment.java index 73efe23c33..38a3c6b0c1 100644 --- a/src/main/java/org/kohsuke/github/GHIssueComment.java +++ b/src/main/java/org/kohsuke/github/GHIssueComment.java @@ -126,7 +126,7 @@ public void delete() throws IOException { owner.root.createRequest().method("DELETE").withUrlPath(getApiRoute()).send(); } - @Preview + @Preview(SQUIRREL_GIRL) @Deprecated public GHReaction createReaction(ReactionContent content) throws IOException { return owner.root.createRequest() @@ -138,7 +138,7 @@ public GHReaction createReaction(ReactionContent content) throws IOException { .wrap(owner.root); } - @Preview + @Preview(SQUIRREL_GIRL) @Deprecated public PagedIterable listReactions() { return owner.root.createRequest() diff --git a/src/main/java/org/kohsuke/github/GHPullRequest.java b/src/main/java/org/kohsuke/github/GHPullRequest.java index 7a920c6438..7906ffe15f 100644 --- a/src/main/java/org/kohsuke/github/GHPullRequest.java +++ b/src/main/java/org/kohsuke/github/GHPullRequest.java @@ -576,7 +576,7 @@ public GHPullRequest setBaseBranch(String newBaseBranch) throws IOException { * @throws IOException * the io exception */ - @Preview + @Preview(LYDIAN) @Deprecated public void updateBranch() throws IOException { root.createRequest() diff --git a/src/main/java/org/kohsuke/github/GHPullRequestReviewComment.java b/src/main/java/org/kohsuke/github/GHPullRequestReviewComment.java index 5fe6cd1823..6c3ec49018 100644 --- a/src/main/java/org/kohsuke/github/GHPullRequestReviewComment.java +++ b/src/main/java/org/kohsuke/github/GHPullRequestReviewComment.java @@ -198,7 +198,7 @@ public GHPullRequestReviewComment reply(String body) throws IOException { .wrapUp(owner); } - @Preview + @Preview(SQUIRREL_GIRL) @Deprecated public GHReaction createReaction(ReactionContent content) throws IOException { return owner.root.createRequest() @@ -210,7 +210,7 @@ public GHReaction createReaction(ReactionContent content) throws IOException { .wrap(owner.root); } - @Preview + @Preview(SQUIRREL_GIRL) @Deprecated public PagedIterable listReactions() { return owner.root.createRequest() diff --git a/src/main/java/org/kohsuke/github/GHReaction.java b/src/main/java/org/kohsuke/github/GHReaction.java index ca51b9de58..e7da06ee03 100644 --- a/src/main/java/org/kohsuke/github/GHReaction.java +++ b/src/main/java/org/kohsuke/github/GHReaction.java @@ -11,7 +11,7 @@ * @author Kohsuke Kawaguchi * @see Reactable */ -@Preview +@Preview(SQUIRREL_GIRL) @Deprecated public class GHReaction extends GHObject { private GitHub root; diff --git a/src/main/java/org/kohsuke/github/GHRepository.java b/src/main/java/org/kohsuke/github/GHRepository.java index 9b82be41ca..ba4a16de93 100644 --- a/src/main/java/org/kohsuke/github/GHRepository.java +++ b/src/main/java/org/kohsuke/github/GHRepository.java @@ -708,7 +708,7 @@ public boolean isPrivate() { * @return the boolean */ @Deprecated - @Preview + @Preview(BAPTISTE) public boolean isTemplate() { // isTemplate is still in preview, we do not want to retrieve it unless needed. if (isTemplate == null) { @@ -1925,7 +1925,7 @@ public GHCommitStatus getLastCommitStatus(String sha1) throws IOException { * @see List check runs * for a specific ref */ - @Preview + @Preview(ANTIOPE) @Deprecated public PagedIterable getCheckRuns(String ref) throws IOException { GitHubRequest request = root.createRequest() @@ -1999,7 +1999,7 @@ public GHCommitStatus createCommitStatus(String sha1, GHCommitState state, Strin * the commit hash * @return a builder which you should customize, then call {@link GHCheckRunBuilder#create} */ - @Preview + @Preview(ANTIOPE) @Deprecated public @NonNull GHCheckRunBuilder createCheckRun(@NonNull String name, @NonNull String headSHA) { return new GHCheckRunBuilder(this, name, headSHA); @@ -2012,7 +2012,7 @@ public GHCommitStatus createCommitStatus(String sha1, GHCommitState state, Strin * the existing checkId * @return a builder which you should customize, then call {@link GHCheckRunBuilder#create} */ - @Preview + @Preview(BAPTISTE) @Deprecated public @NonNull GHCheckRunBuilder updateCheckRun(long checkId) { return new GHCheckRunBuilder(this, checkId); @@ -2959,10 +2959,14 @@ void populate() throws IOException { // There is bug in Push event payloads that returns the wrong url. // All other occurrences of "url" take the form "https://api.github.com/...". // For Push event repository records, they take the form "https://github.com/{fullName}". - root.createRequest().withPreview(BAPTISE).setRawUrlPath(url.toString()).fetchInto(this).wrap(root); + root.createRequest().withPreview(BAPTISTE).setRawUrlPath(url.toString()).fetchInto(this).wrap(root); } catch (HttpException e) { if (e.getCause() instanceof JsonParseException) { - root.createRequest().withPreview(BAPTISE).withUrlPath("/repos/" + full_name).fetchInto(this).wrap(root); + root.createRequest() + .withPreview(BAPTISTE) + .withUrlPath("/repos/" + full_name) + .fetchInto(this) + .wrap(root); } else { throw e; } diff --git a/src/main/java/org/kohsuke/github/GitHub.java b/src/main/java/org/kohsuke/github/GitHub.java index bb51a2de0e..7a36cb4f74 100644 --- a/src/main/java/org/kohsuke/github/GitHub.java +++ b/src/main/java/org/kohsuke/github/GitHub.java @@ -1013,7 +1013,7 @@ public PagedIterable listMyAuthorizations() throws IOException * @see Get the authenticated * GitHub App */ - @Preview + @Preview(MACHINE_MAN) @Deprecated public GHApp getApp() throws IOException { return createRequest().withPreview(MACHINE_MAN).withUrlPath("/app").fetch(GHApp.class).wrapUp(this); @@ -1108,7 +1108,7 @@ public void checkApiUrlValidity() throws IOException { * * @return the gh commit search builder */ - @Preview + @Preview(Previews.CLOAK) @Deprecated public GHCommitSearchBuilder searchCommits() { return new GHCommitSearchBuilder(this); diff --git a/src/main/java/org/kohsuke/github/GitHubRequest.java b/src/main/java/org/kohsuke/github/GitHubRequest.java index 61018f8656..65ac49192f 100644 --- a/src/main/java/org/kohsuke/github/GitHubRequest.java +++ b/src/main/java/org/kohsuke/github/GitHubRequest.java @@ -437,6 +437,10 @@ public B withPreview(String name) { return withHeader("Accept", name); } + public B withPreview(Previews preview) { + return withPreview(preview.mediaType()); + } + /** * With requester. * diff --git a/src/main/java/org/kohsuke/github/Preview.java b/src/main/java/org/kohsuke/github/Preview.java index 4d3ccd5038..240130a9bd 100644 --- a/src/main/java/org/kohsuke/github/Preview.java +++ b/src/main/java/org/kohsuke/github/Preview.java @@ -21,10 +21,10 @@ * An optional field defining what API media types must be set inorder to support the usage of this annotations * target. *

- * This value should be set using the existing constants defined in {@link Previews} + * This value must be set using the existing constants defined in {@link Previews} * * @return The API preview media type. */ - public String[] value() default {}; + public Previews[] value() default {}; } diff --git a/src/main/java/org/kohsuke/github/Previews.java b/src/main/java/org/kohsuke/github/Previews.java index 3be4ee57b2..c669e7e612 100644 --- a/src/main/java/org/kohsuke/github/Previews.java +++ b/src/main/java/org/kohsuke/github/Previews.java @@ -7,20 +7,21 @@ * * @author Kohsuke Kawaguchi */ -class Previews { +enum Previews { + /** * Check-runs and check-suites * * @see GitHub API Previews */ - static final String ANTIOPE = "application/vnd.github.antiope-preview+json"; + ANTIOPE("application/vnd.github.antiope-preview+json"), /** * Enhanced Deployments * * @see GitHub API Previews */ - static final String ANT_MAN = "application/vnd.github.ant-man-preview+json"; + ANT_MAN("application/vnd.github.ant-man-preview+json"), /** * Create repository from template repository @@ -28,28 +29,28 @@ class Previews { * @see GitHub API * Previews */ - static final String BAPTISE = "application/vnd.github.baptiste-preview+json"; + BAPTISTE("application/vnd.github.baptiste-preview+json"), /** * Commit Search * * @see GitHub API Previews */ - static final String CLOAK = "application/vnd.github.cloak-preview+json"; + CLOAK("application/vnd.github.cloak-preview+json"), /** * New deployment statuses and support for updating deployment status environment * * @see GitHub API Previews */ - static final String FLASH = "application/vnd.github.flash-preview+json"; + FLASH("application/vnd.github.flash-preview+json"), /** * Owners of GitHub Apps can now uninstall an app using the Apps API * * @see GitHub API Previews */ - static final String GAMBIT = "application/vnd.github.gambit-preview+json"; + GAMBIT("application/vnd.github.gambit-preview+json"), /** * List branches or pull requests for a commit @@ -57,21 +58,21 @@ class Previews { * @see GitHub API * Previews */ - static final String GROOT = "application/vnd.github.groot-preview+json"; + GROOT("application/vnd.github.groot-preview+json"), /** * Manage projects * * @see GitHub API Previews */ - static final String INERTIA = "application/vnd.github.inertia-preview+json"; + INERTIA("application/vnd.github.inertia-preview+json"), /** * Update a pull request branch * * @see GitHub API Previews */ - static final String LYDIAN = "application/vnd.github.lydian-preview+json"; + LYDIAN("application/vnd.github.lydian-preview+json"), /** * Require multiple approving reviews @@ -79,21 +80,21 @@ class Previews { * @see GitHub API * Previews */ - static final String LUKE_CAGE = "application/vnd.github.luke-cage-preview+json"; + LUKE_CAGE("application/vnd.github.luke-cage-preview+json"), /** * Manage integrations through the API * * @see GitHub API Previews */ - static final String MACHINE_MAN = "application/vnd.github.machine-man-preview+json"; + MACHINE_MAN("application/vnd.github.machine-man-preview+json"), /** * View a list of repository topics in calls that return repository results * * @see GitHub API Previews */ - static final String MERCY = "application/vnd.github.mercy-preview+json"; + MERCY("application/vnd.github.mercy-preview+json"), /** * New visibility parameter for the Repositories API @@ -101,27 +102,38 @@ class Previews { * @see GitHub * API Previews */ - static final String NEBULA = "application/vnd.github.nebula-preview+json"; + NEBULA("application/vnd.github.nebula-preview+json"), /** * Draft pull requests * * @see GitHub API Previews */ - static final String SHADOW_CAT = "application/vnd.github.shadow-cat-preview+json"; + SHADOW_CAT("application/vnd.github.shadow-cat-preview+json"), /** * Reactions * * @see GitHub API Previews */ - static final String SQUIRREL_GIRL = "application/vnd.github.squirrel-girl-preview+json"; + SQUIRREL_GIRL("application/vnd.github.squirrel-girl-preview+json"), /** * Require signed commits * * @see GitHub API Previews */ - static final String ZZZAX = "application/vnd.github.zzzax-preview+json"; + ZZZAX("application/vnd.github.zzzax-preview+json") + + ; + + private final String mediaType; + + Previews(String mediaType) { + this.mediaType = mediaType; + } + public String mediaType() { + return mediaType; + } } diff --git a/src/main/java/org/kohsuke/github/Reactable.java b/src/main/java/org/kohsuke/github/Reactable.java index 82908f28d6..777ef7a472 100644 --- a/src/main/java/org/kohsuke/github/Reactable.java +++ b/src/main/java/org/kohsuke/github/Reactable.java @@ -2,12 +2,14 @@ import java.io.IOException; +import static org.kohsuke.github.Previews.SQUIRREL_GIRL; + /** * Those {@link GHObject}s that can have {@linkplain GHReaction reactions}. * * @author Kohsuke Kawaguchi */ -@Preview +@Preview(SQUIRREL_GIRL) @Deprecated public interface Reactable { /** @@ -15,7 +17,7 @@ public interface Reactable { * * @return the paged iterable */ - @Preview + @Preview(SQUIRREL_GIRL) @Deprecated PagedIterable listReactions(); @@ -28,7 +30,7 @@ public interface Reactable { * @throws IOException * the io exception */ - @Preview + @Preview(SQUIRREL_GIRL) @Deprecated GHReaction createReaction(ReactionContent content) throws IOException; }