From 723f8bf5a404b20f6ec50915d9aebdb1aacd019a Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Thu, 20 Jun 2024 03:54:02 -0700 Subject: [PATCH] Remove calls to preview --- src/main/java/org/kohsuke/github/GHApp.java | 14 +----- .../github/GHAppCreateTokenBuilder.java | 8 +--- .../org/kohsuke/github/GHAppInstallation.java | 13 +---- .../GHAuthenticatedAppInstallation.java | 5 +- .../java/org/kohsuke/github/GHBranch.java | 10 +--- .../kohsuke/github/GHBranchProtection.java | 7 +-- .../github/GHBranchProtectionBuilder.java | 4 +- .../java/org/kohsuke/github/GHCheckRun.java | 2 - .../org/kohsuke/github/GHCheckRunBuilder.java | 10 +--- .../java/org/kohsuke/github/GHCommit.java | 8 ---- .../org/kohsuke/github/GHCommitComment.java | 6 --- .../kohsuke/github/GHCommitSearchBuilder.java | 3 -- .../github/GHCreateRepositoryBuilder.java | 6 +-- .../java/org/kohsuke/github/GHDeployment.java | 7 --- .../kohsuke/github/GHDeploymentBuilder.java | 9 +--- .../org/kohsuke/github/GHDeploymentState.java | 5 -- .../kohsuke/github/GHDeploymentStatus.java | 4 -- .../github/GHDeploymentStatusBuilder.java | 12 +---- .../java/org/kohsuke/github/GHDiscussion.java | 3 -- src/main/java/org/kohsuke/github/GHIssue.java | 6 --- .../org/kohsuke/github/GHIssueComment.java | 6 --- .../org/kohsuke/github/GHOrganization.java | 4 -- .../java/org/kohsuke/github/GHProject.java | 8 +--- .../org/kohsuke/github/GHProjectCard.java | 6 +-- .../org/kohsuke/github/GHProjectColumn.java | 9 +--- .../org/kohsuke/github/GHPullRequest.java | 11 +---- .../github/GHPullRequestQueryBuilder.java | 5 +- .../github/GHPullRequestReviewComment.java | 6 --- .../java/org/kohsuke/github/GHReaction.java | 3 -- .../java/org/kohsuke/github/GHRepository.java | 47 ++----------------- .../kohsuke/github/GHRepositoryBuilder.java | 6 --- src/main/java/org/kohsuke/github/GHUser.java | 8 +--- src/main/java/org/kohsuke/github/GitHub.java | 21 ++------- .../java/org/kohsuke/github/Reactable.java | 5 -- .../org/kohsuke/github/internal/Previews.java | 2 - .../kohsuke/github/AbuseLimitHandlerTest.java | 2 +- .../kohsuke/github/GHOrganizationTest.java | 4 +- .../org/kohsuke/github/GHRepositoryTest.java | 6 +-- ...-r_h_g_deployments_315601644_statuses.json | 2 +- .../starTest/mappings/8-r_h_g_stargazers.json | 2 +- .../mappings/1-r_h_ghworkflowruntest.json | 2 +- ...10-r_h_g_actions_artifacts_1242831517.json | 2 +- .../mappings/11-r_h_g_actions_artifacts.json | 2 +- ...12-r_h_g_actions_artifacts_1242831742.json | 2 +- ...13-r_h_g_actions_artifacts_1242831742.json | 2 +- ...tions_workflows_artifacts-workflowyml.json | 2 +- .../mappings/3-r_h_g_actions_runs.json | 2 +- ..._actions_workflows_7433027_dispatches.json | 2 +- .../mappings/5-r_h_g_actions_runs.json | 2 +- ...h_g_actions_runs_7892624040_artifacts.json | 2 +- ..._h_g_actions_artifacts_1242831742_zip.json | 2 +- ..._h_g_actions_artifacts_1242831517_zip.json | 2 +- .../9-r_h_g_actions_artifacts_1242831742.json | 2 +- 53 files changed, 51 insertions(+), 280 deletions(-) diff --git a/src/main/java/org/kohsuke/github/GHApp.java b/src/main/java/org/kohsuke/github/GHApp.java index 2da38b79fb..904b7c3696 100644 --- a/src/main/java/org/kohsuke/github/GHApp.java +++ b/src/main/java/org/kohsuke/github/GHApp.java @@ -11,8 +11,6 @@ import java.util.Map; import java.util.stream.Collectors; -import static org.kohsuke.github.internal.Previews.MACHINE_MAN; - // TODO: Auto-generated Javadoc /** * A Github App. @@ -208,7 +206,6 @@ public void setPermissions(Map permissions) { * @return a list of App installations * @see List installations */ - @Preview(MACHINE_MAN) public PagedIterable listInstallations() { return listInstallations(null); } @@ -223,9 +220,8 @@ public PagedIterable listInstallations() { * @return a list of App installations since a given time. * @see List installations */ - @Preview(MACHINE_MAN) public PagedIterable listInstallations(final Date since) { - Requester requester = root().createRequest().withPreview(MACHINE_MAN).withUrlPath("/app/installations"); + Requester requester = root().createRequest().withUrlPath("/app/installations"); if (since != null) { requester.with("since", GitHubClient.printDate(since)); } @@ -244,10 +240,8 @@ public PagedIterable listInstallations(final Date since) { * on error * @see Get an installation */ - @Preview(MACHINE_MAN) public GHAppInstallation getInstallationById(long id) throws IOException { return root().createRequest() - .withPreview(MACHINE_MAN) .withUrlPath(String.format("/app/installations/%d", id)) .fetch(GHAppInstallation.class); } @@ -265,10 +259,8 @@ public GHAppInstallation getInstallationById(long id) throws IOException { * @see Get an organization * installation */ - @Preview(MACHINE_MAN) public GHAppInstallation getInstallationByOrganization(String name) throws IOException { return root().createRequest() - .withPreview(MACHINE_MAN) .withUrlPath(String.format("/orgs/%s/installation", name)) .fetch(GHAppInstallation.class); } @@ -288,10 +280,8 @@ public GHAppInstallation getInstallationByOrganization(String name) throws IOExc * @see Get a repository * installation */ - @Preview(MACHINE_MAN) public GHAppInstallation getInstallationByRepository(String ownerName, String repositoryName) throws IOException { return root().createRequest() - .withPreview(MACHINE_MAN) .withUrlPath(String.format("/repos/%s/%s/installation", ownerName, repositoryName)) .fetch(GHAppInstallation.class); } @@ -308,10 +298,8 @@ public GHAppInstallation getInstallationByRepository(String ownerName, String re * on error * @see Get a user installation */ - @Preview(MACHINE_MAN) public GHAppInstallation getInstallationByUser(String name) throws IOException { return root().createRequest() - .withPreview(MACHINE_MAN) .withUrlPath(String.format("/users/%s/installation", name)) .fetch(GHAppInstallation.class); } diff --git a/src/main/java/org/kohsuke/github/GHAppCreateTokenBuilder.java b/src/main/java/org/kohsuke/github/GHAppCreateTokenBuilder.java index b809297e66..348282ecf6 100644 --- a/src/main/java/org/kohsuke/github/GHAppCreateTokenBuilder.java +++ b/src/main/java/org/kohsuke/github/GHAppCreateTokenBuilder.java @@ -5,8 +5,6 @@ import java.util.List; import java.util.Map; -import static org.kohsuke.github.internal.Previews.MACHINE_MAN; - // TODO: Auto-generated Javadoc /** * Creates a access token for a GitHub App Installation. @@ -108,12 +106,8 @@ public GHAppCreateTokenBuilder permissions(Map permiss * @throws IOException * on error */ - @Preview(MACHINE_MAN) public GHAppInstallationToken create() throws IOException { - return builder.method("POST") - .withPreview(MACHINE_MAN) - .withUrlPath(apiUrlTail) - .fetch(GHAppInstallationToken.class); + return builder.method("POST").withUrlPath(apiUrlTail).fetch(GHAppInstallationToken.class); } } diff --git a/src/main/java/org/kohsuke/github/GHAppInstallation.java b/src/main/java/org/kohsuke/github/GHAppInstallation.java index 7466c0abe2..0e18ec6800 100644 --- a/src/main/java/org/kohsuke/github/GHAppInstallation.java +++ b/src/main/java/org/kohsuke/github/GHAppInstallation.java @@ -12,9 +12,6 @@ import java.util.Map; import java.util.stream.Collectors; -import static org.kohsuke.github.internal.Previews.GAMBIT; -import static org.kohsuke.github.internal.Previews.MACHINE_MAN; - // TODO: Auto-generated Javadoc /** * A Github App Installation. @@ -135,11 +132,10 @@ public String getRepositoriesUrl() { * {@link GHAuthenticatedAppInstallation#listRepositories()}. */ @Deprecated - @Preview(MACHINE_MAN) public PagedSearchIterable listRepositories() { GitHubRequest request; - request = root().createRequest().withPreview(MACHINE_MAN).withUrlPath("/installation/repositories").build(); + request = root().createRequest().withUrlPath("/installation/repositories").build(); return new PagedSearchIterable<>(root(), request, GHAppInstallationRepositoryResult.class); } @@ -342,13 +338,8 @@ public GHUser getSuspendedBy() { * on error * @see Delete an installation */ - @Preview(GAMBIT) public void deleteInstallation() throws IOException { - root().createRequest() - .method("DELETE") - .withPreview(GAMBIT) - .withUrlPath(String.format("/app/installations/%d", getId())) - .send(); + root().createRequest().method("DELETE").withUrlPath(String.format("/app/installations/%d", getId())).send(); } /** diff --git a/src/main/java/org/kohsuke/github/GHAuthenticatedAppInstallation.java b/src/main/java/org/kohsuke/github/GHAuthenticatedAppInstallation.java index 7d90645a7e..7c3fc8257b 100644 --- a/src/main/java/org/kohsuke/github/GHAuthenticatedAppInstallation.java +++ b/src/main/java/org/kohsuke/github/GHAuthenticatedAppInstallation.java @@ -2,8 +2,6 @@ import javax.annotation.Nonnull; -import static org.kohsuke.github.internal.Previews.MACHINE_MAN; - // TODO: Auto-generated Javadoc /** * The Github App Installation corresponding to the installation token used in a client. @@ -27,11 +25,10 @@ protected GHAuthenticatedAppInstallation(@Nonnull GitHub root) { * * @return the paged iterable */ - @Preview(MACHINE_MAN) public PagedSearchIterable listRepositories() { GitHubRequest request; - request = root().createRequest().withPreview(MACHINE_MAN).withUrlPath("/installation/repositories").build(); + request = root().createRequest().withUrlPath("/installation/repositories").build(); return new PagedSearchIterable<>(root(), request, GHAuthenticatedAppInstallationRepositoryResult.class); } diff --git a/src/main/java/org/kohsuke/github/GHBranch.java b/src/main/java/org/kohsuke/github/GHBranch.java index 3a88231394..21dc55717d 100644 --- a/src/main/java/org/kohsuke/github/GHBranch.java +++ b/src/main/java/org/kohsuke/github/GHBranch.java @@ -3,7 +3,6 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; -import org.kohsuke.github.internal.Previews; import java.io.IOException; import java.net.URL; @@ -82,7 +81,6 @@ public String getName() { * * @return true if the push to this branch is restricted via branch protection. */ - @Preview(Previews.LUKE_CAGE) public boolean isProtected() { return protection; } @@ -92,7 +90,6 @@ public boolean isProtected() { * * @return API URL that deals with the protection of this branch. */ - @Preview(Previews.LUKE_CAGE) public URL getProtectionUrl() { return GitHubClient.parseURL(protection_url); } @@ -104,12 +101,8 @@ public URL getProtectionUrl() { * @throws IOException * the io exception */ - @Preview(Previews.LUKE_CAGE) public GHBranchProtection getProtection() throws IOException { - return root().createRequest() - .withPreview(Previews.LUKE_CAGE) - .setRawUrlPath(protection_url) - .fetch(GHBranchProtection.class); + return root().createRequest().setRawUrlPath(protection_url).fetch(GHBranchProtection.class); } /** @@ -137,7 +130,6 @@ public void disableProtection() throws IOException { * @return GHBranchProtectionBuilder for enabling protection * @see GHCommitStatus#getContext() GHCommitStatus#getContext() */ - @Preview(Previews.LUKE_CAGE) 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 bdffc62f5b..1b0ee3f3e2 100644 --- a/src/main/java/org/kohsuke/github/GHBranchProtection.java +++ b/src/main/java/org/kohsuke/github/GHBranchProtection.java @@ -8,8 +8,6 @@ import java.util.Collection; import java.util.Collections; -import static org.kohsuke.github.internal.Previews.ZZZAX; - // TODO: Auto-generated Javadoc /** * The type GHBranchProtection. @@ -65,7 +63,6 @@ public class GHBranchProtection extends GitHubInteractiveObject { * @throws IOException * the io exception */ - @Preview(ZZZAX) public void enabledSignedCommits() throws IOException { requester().method("POST").withUrlPath(url + REQUIRE_SIGNATURES_URI).fetch(RequiredSignatures.class); } @@ -76,7 +73,6 @@ public void enabledSignedCommits() throws IOException { * @throws IOException * the io exception */ - @Preview(ZZZAX) public void disableSignedCommits() throws IOException { requester().method("DELETE").withUrlPath(url + REQUIRE_SIGNATURES_URI).send(); } @@ -169,7 +165,6 @@ public RequiredReviews getRequiredReviews() { * @throws IOException * the io exception */ - @Preview(ZZZAX) public boolean getRequiredSignatures() throws IOException { return requester().withUrlPath(url + REQUIRE_SIGNATURES_URI).fetch(RequiredSignatures.class).enabled; } @@ -202,7 +197,7 @@ public String getUrl() { } private Requester requester() { - return root().createRequest().withPreview(ZZZAX); + return root().createRequest(); } /** diff --git a/src/main/java/org/kohsuke/github/GHBranchProtectionBuilder.java b/src/main/java/org/kohsuke/github/GHBranchProtectionBuilder.java index a496cbb0c3..640818af17 100644 --- a/src/main/java/org/kohsuke/github/GHBranchProtectionBuilder.java +++ b/src/main/java/org/kohsuke/github/GHBranchProtectionBuilder.java @@ -13,8 +13,6 @@ import java.util.Set; import java.util.stream.Collectors; -import static org.kohsuke.github.internal.Previews.LUKE_CAGE; - // TODO: Auto-generated Javadoc /** * Builder to configure the branch protection settings. @@ -567,7 +565,7 @@ private StatusChecks getStatusChecks() { } private Requester requester() { - return branch.root().createRequest().withPreview(LUKE_CAGE); + return branch.root().createRequest(); } private static class Restrictions { diff --git a/src/main/java/org/kohsuke/github/GHCheckRun.java b/src/main/java/org/kohsuke/github/GHCheckRun.java index 0203bc8a85..0593656cfe 100644 --- a/src/main/java/org/kohsuke/github/GHCheckRun.java +++ b/src/main/java/org/kohsuke/github/GHCheckRun.java @@ -5,7 +5,6 @@ import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.kohsuke.github.internal.EnumUtils; -import org.kohsuke.github.internal.Previews; import java.io.IOException; import java.net.URL; @@ -397,7 +396,6 @@ public static enum AnnotationLevel { * * @return a builder which you should customize, then call {@link GHCheckRunBuilder#create} */ - @Preview(Previews.ANTIOPE) 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 b1ddcaf284..eefe6d0235 100644 --- a/src/main/java/org/kohsuke/github/GHCheckRunBuilder.java +++ b/src/main/java/org/kohsuke/github/GHCheckRunBuilder.java @@ -28,7 +28,6 @@ import edu.umd.cs.findbugs.annotations.CheckForNull; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; -import org.kohsuke.github.internal.Previews; import java.io.IOException; import java.util.Collections; @@ -48,7 +47,6 @@ * @see documentation */ @SuppressFBWarnings(value = "URF_UNREAD_FIELD", justification = "Jackson serializes these even without a getter") -@Preview(Previews.ANTIOPE) public final class GHCheckRunBuilder { /** The repo. */ @@ -78,7 +76,6 @@ private GHCheckRunBuilder(GHRepository repo, Requester requester) { this(repo, repo.root() .createRequest() - .withPreview(Previews.ANTIOPE) .method("POST") .with("name", name) .with("head_sha", headSHA) @@ -95,11 +92,7 @@ private GHCheckRunBuilder(GHRepository repo, Requester requester) { */ GHCheckRunBuilder(GHRepository repo, long checkId) { this(repo, - repo.root() - .createRequest() - .withPreview(Previews.ANTIOPE) - .method("PATCH") - .withUrlPath(repo.getApiTailUrl("check-runs/" + checkId))); + repo.root().createRequest().method("PATCH").withUrlPath(repo.getApiTailUrl("check-runs/" + checkId))); } /** @@ -254,7 +247,6 @@ private GHCheckRunBuilder(GHRepository repo, Requester requester) { extraAnnotations = extraAnnotations.subList(i, extraAnnotations.size()); run = repo.root() .createRequest() - .withPreview(Previews.ANTIOPE) .method("PATCH") .with("output", output2) .withUrlPath(repo.getApiTailUrl("check-runs/" + run.getId())) diff --git a/src/main/java/org/kohsuke/github/GHCommit.java b/src/main/java/org/kohsuke/github/GHCommit.java index 250dbe7755..acdf943991 100644 --- a/src/main/java/org/kohsuke/github/GHCommit.java +++ b/src/main/java/org/kohsuke/github/GHCommit.java @@ -10,9 +10,6 @@ import java.util.Date; import java.util.List; -import static org.kohsuke.github.internal.Previews.ANTIOPE; -import static org.kohsuke.github.internal.Previews.GROOT; - // TODO: Auto-generated Javadoc /** * A commit in a repository. @@ -533,11 +530,9 @@ private GHUser resolveUser(User author) throws IOException { * * @return {@link PagedIterable} with the pull requests which contain this commit */ - @Preview(GROOT) public PagedIterable listPullRequests() { return owner.root() .createRequest() - .withPreview(GROOT) .withUrlPath(String.format("/repos/%s/%s/commits/%s/pulls", owner.getOwnerName(), owner.getName(), sha)) .toIterable(GHPullRequest[].class, item -> item.wrapUp(owner)); } @@ -549,11 +544,9 @@ public PagedIterable listPullRequests() { * @throws IOException * the io exception */ - @Preview(GROOT) public PagedIterable listBranchesWhereHead() throws IOException { return owner.root() .createRequest() - .withPreview(GROOT) .withUrlPath(String.format("/repos/%s/%s/commits/%s/branches-where-head", owner.getOwnerName(), owner.getName(), @@ -643,7 +636,6 @@ public GHCommitStatus getLastStatus() throws IOException { * @throws IOException * on error */ - @Preview(ANTIOPE) 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 bf040d36c8..1ce023e313 100644 --- a/src/main/java/org/kohsuke/github/GHCommitComment.java +++ b/src/main/java/org/kohsuke/github/GHCommitComment.java @@ -5,8 +5,6 @@ import java.io.IOException; import java.net.URL; -import static org.kohsuke.github.internal.Previews.SQUIRREL_GIRL; - // TODO: Auto-generated Javadoc /** * A comment attached to a commit (or a specific line in a specific file of a commit.) @@ -142,12 +140,10 @@ public void update(String body) throws IOException { * @throws IOException * Signals that an I/O exception has occurred. */ - @Preview(SQUIRREL_GIRL) public GHReaction createReaction(ReactionContent content) throws IOException { return owner.root() .createRequest() .method("POST") - .withPreview(SQUIRREL_GIRL) .with("content", content.getContent()) .withUrlPath(getApiTail() + "/reactions") .fetch(GHReaction.class); @@ -174,11 +170,9 @@ public void deleteReaction(GHReaction reaction) throws IOException { * * @return the paged iterable */ - @Preview(SQUIRREL_GIRL) public PagedIterable listReactions() { return owner.root() .createRequest() - .withPreview(SQUIRREL_GIRL) .withUrlPath(getApiTail() + "/reactions") .toIterable(GHReaction[].class, item -> owner.root()); } diff --git a/src/main/java/org/kohsuke/github/GHCommitSearchBuilder.java b/src/main/java/org/kohsuke/github/GHCommitSearchBuilder.java index 8ce7ce7ef9..28e34d66b8 100644 --- a/src/main/java/org/kohsuke/github/GHCommitSearchBuilder.java +++ b/src/main/java/org/kohsuke/github/GHCommitSearchBuilder.java @@ -2,7 +2,6 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.apache.commons.lang3.StringUtils; -import org.kohsuke.github.internal.Previews; import java.io.IOException; @@ -13,7 +12,6 @@ * @author Marc de Verdelhan * @see GitHub#searchCommits() GitHub#searchCommits() */ -@Preview(Previews.CLOAK) public class GHCommitSearchBuilder extends GHSearchBuilder { /** @@ -24,7 +22,6 @@ public class GHCommitSearchBuilder extends GHSearchBuilder { */ GHCommitSearchBuilder(GitHub root) { super(root, CommitSearchResult.class); - req.withPreview(Previews.CLOAK); } /** diff --git a/src/main/java/org/kohsuke/github/GHCreateRepositoryBuilder.java b/src/main/java/org/kohsuke/github/GHCreateRepositoryBuilder.java index 1303143fc5..e50ff7aa88 100644 --- a/src/main/java/org/kohsuke/github/GHCreateRepositoryBuilder.java +++ b/src/main/java/org/kohsuke/github/GHCreateRepositoryBuilder.java @@ -3,8 +3,6 @@ import java.io.IOException; import java.util.Objects; -import static org.kohsuke.github.internal.Previews.BAPTISTE; - // TODO: Auto-generated Javadoc /** * Creates a repository. @@ -126,9 +124,8 @@ public GHCreateRepositoryBuilder owner(String owner) throws IOException { * @return a builder to continue with building * @see GitHub API Previews */ - @Preview(BAPTISTE) public GHCreateRepositoryBuilder fromTemplateRepository(String templateOwner, String templateRepo) { - requester.withPreview(BAPTISTE).withUrlPath("/repos/" + templateOwner + "/" + templateRepo + "/generate"); + requester.withUrlPath("/repos/" + templateOwner + "/" + templateRepo + "/generate"); return this; } @@ -140,7 +137,6 @@ public GHCreateRepositoryBuilder fromTemplateRepository(String templateOwner, St * @return a builder to continue with building * @see GitHub API Previews */ - @Preview(BAPTISTE) public GHCreateRepositoryBuilder fromTemplateRepository(GHRepository templateRepository) { Objects.requireNonNull(templateRepository, "templateRepository cannot be null"); if (!templateRepository.isTemplate()) { diff --git a/src/main/java/org/kohsuke/github/GHDeployment.java b/src/main/java/org/kohsuke/github/GHDeployment.java index 6e994d7a1b..62152485fc 100644 --- a/src/main/java/org/kohsuke/github/GHDeployment.java +++ b/src/main/java/org/kohsuke/github/GHDeployment.java @@ -1,7 +1,5 @@ package org.kohsuke.github; -import org.kohsuke.github.internal.Previews; - import java.io.IOException; import java.net.URL; import java.util.Collections; @@ -129,7 +127,6 @@ public Object getPayloadObject() { * @return the original deployment environment * @deprecated until preview feature has graduated to stable */ - @Preview(Previews.FLASH) public String getOriginalEnvironment() { return original_environment; } @@ -150,7 +147,6 @@ public String getEnvironment() { * @return the environment is transient * @deprecated until preview feature has graduated to stable */ - @Preview(Previews.ANT_MAN) public boolean isTransientEnvironment() { return transient_environment; } @@ -161,7 +157,6 @@ public boolean isTransientEnvironment() { * @return the environment is used by end-users directly * @deprecated until preview feature has graduated to stable */ - @Preview(Previews.ANT_MAN) public boolean isProductionEnvironment() { return production_environment; } @@ -225,8 +220,6 @@ public GHDeploymentStatusBuilder createStatus(GHDeploymentState state) { public PagedIterable listStatuses() { return root().createRequest() .withUrlPath(statuses_url) - .withPreview(Previews.ANT_MAN) - .withPreview(Previews.FLASH) .toIterable(GHDeploymentStatus[].class, item -> item.lateBind(owner)); } diff --git a/src/main/java/org/kohsuke/github/GHDeploymentBuilder.java b/src/main/java/org/kohsuke/github/GHDeploymentBuilder.java index 84b333d65e..2f7b0ae7d5 100644 --- a/src/main/java/org/kohsuke/github/GHDeploymentBuilder.java +++ b/src/main/java/org/kohsuke/github/GHDeploymentBuilder.java @@ -1,7 +1,6 @@ package org.kohsuke.github; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; -import org.kohsuke.github.internal.Previews; import java.io.IOException; import java.util.List; @@ -24,11 +23,7 @@ public class GHDeploymentBuilder { @SuppressFBWarnings(value = { "EI_EXPOSE_REP2" }, justification = "Acceptable") public GHDeploymentBuilder(GHRepository repo) { this.repo = repo; - this.builder = repo.root() - .createRequest() - .withPreview(Previews.ANT_MAN) - .withPreview(Previews.FLASH) - .method("POST"); + this.builder = repo.root().createRequest().method("POST"); } /** @@ -131,7 +126,6 @@ public GHDeploymentBuilder environment(String environment) { * @return the gh deployment builder * @deprecated until preview feature has graduated to stable */ - @Preview(Previews.ANT_MAN) public GHDeploymentBuilder transientEnvironment(boolean transientEnvironment) { builder.with("transient_environment", transientEnvironment); return this; @@ -145,7 +139,6 @@ public GHDeploymentBuilder transientEnvironment(boolean transientEnvironment) { * @return the gh deployment builder * @deprecated until preview feature has graduated to stable */ - @Preview(Previews.ANT_MAN) public GHDeploymentBuilder productionEnvironment(boolean productionEnvironment) { builder.with("production_environment", productionEnvironment); return this; diff --git a/src/main/java/org/kohsuke/github/GHDeploymentState.java b/src/main/java/org/kohsuke/github/GHDeploymentState.java index 628979aa7d..718e57c478 100644 --- a/src/main/java/org/kohsuke/github/GHDeploymentState.java +++ b/src/main/java/org/kohsuke/github/GHDeploymentState.java @@ -1,7 +1,5 @@ package org.kohsuke.github; -import org.kohsuke.github.internal.Previews; - // TODO: Auto-generated Javadoc /** * Represents the state of deployment. @@ -23,18 +21,15 @@ public enum GHDeploymentState { /** * The state of the deployment currently reflects it's in progress. */ - @Preview(Previews.FLASH) IN_PROGRESS, /** * The state of the deployment currently reflects it's queued up for processing. */ - @Preview(Previews.FLASH) QUEUED, /** * The state of the deployment currently reflects it's no longer active. */ - @Preview(Previews.ANT_MAN) INACTIVE } diff --git a/src/main/java/org/kohsuke/github/GHDeploymentStatus.java b/src/main/java/org/kohsuke/github/GHDeploymentStatus.java index 208b5e92cf..80a2221731 100644 --- a/src/main/java/org/kohsuke/github/GHDeploymentStatus.java +++ b/src/main/java/org/kohsuke/github/GHDeploymentStatus.java @@ -1,7 +1,5 @@ package org.kohsuke.github; -import org.kohsuke.github.internal.Previews; - import java.net.URL; import java.util.Locale; @@ -81,7 +79,6 @@ public URL getTargetUrl() { * @return the target url * @deprecated until preview feature has graduated to stable */ - @Preview(Previews.ANT_MAN) public URL getLogUrl() { return GitHubClient.parseURL(log_url); } @@ -101,7 +98,6 @@ public URL getDeploymentUrl() { * @return the deployment environment url * @deprecated until preview feature has graduated to stable */ - @Preview(Previews.ANT_MAN) public URL getEnvironmentUrl() { return GitHubClient.parseURL(environment_url); } diff --git a/src/main/java/org/kohsuke/github/GHDeploymentStatusBuilder.java b/src/main/java/org/kohsuke/github/GHDeploymentStatusBuilder.java index 8cfc9ad5eb..2cac135cc7 100644 --- a/src/main/java/org/kohsuke/github/GHDeploymentStatusBuilder.java +++ b/src/main/java/org/kohsuke/github/GHDeploymentStatusBuilder.java @@ -1,7 +1,5 @@ package org.kohsuke.github; -import org.kohsuke.github.internal.Previews; - import java.io.IOException; // TODO: Auto-generated Javadoc @@ -45,11 +43,7 @@ public GHDeploymentStatusBuilder(GHRepository repo, int deploymentId, GHDeployme GHDeploymentStatusBuilder(GHRepository repo, long deploymentId, GHDeploymentState state) { this.repo = repo; this.deploymentId = deploymentId; - this.builder = repo.root() - .createRequest() - .withPreview(Previews.ANT_MAN) - .withPreview(Previews.FLASH) - .method("POST"); + this.builder = repo.root().createRequest().method("POST"); this.builder.with("state", state); } @@ -63,7 +57,6 @@ public GHDeploymentStatusBuilder(GHRepository repo, int deploymentId, GHDeployme * @return the gh deployment status builder * @deprecated until preview feature has graduated to stable */ - @Preview({ Previews.ANT_MAN, Previews.FLASH }) public GHDeploymentStatusBuilder autoInactive(boolean autoInactive) { this.builder.with("auto_inactive", autoInactive); return this; @@ -90,7 +83,6 @@ public GHDeploymentStatusBuilder description(String description) { * @return the gh deployment status builder * @deprecated until preview feature has graduated to stable */ - @Preview(Previews.FLASH) public GHDeploymentStatusBuilder environment(String environment) { this.builder.with("environment", environment); return this; @@ -104,7 +96,6 @@ public GHDeploymentStatusBuilder environment(String environment) { * @return the gh deployment status builder * @deprecated until preview feature has graduated to stable */ - @Preview(Previews.ANT_MAN) public GHDeploymentStatusBuilder environmentUrl(String environmentUrl) { this.builder.with("environment_url", environmentUrl); return this; @@ -120,7 +111,6 @@ public GHDeploymentStatusBuilder environmentUrl(String environmentUrl) { * @return the gh deployment status builder * @deprecated until preview feature has graduated to stable */ - @Preview(Previews.ANT_MAN) public GHDeploymentStatusBuilder logUrl(String logUrl) { this.builder.with("log_url", logUrl); return this; diff --git a/src/main/java/org/kohsuke/github/GHDiscussion.java b/src/main/java/org/kohsuke/github/GHDiscussion.java index 3308736166..88f851b282 100644 --- a/src/main/java/org/kohsuke/github/GHDiscussion.java +++ b/src/main/java/org/kohsuke/github/GHDiscussion.java @@ -2,7 +2,6 @@ import com.fasterxml.jackson.annotation.JsonProperty; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; -import org.kohsuke.github.internal.Previews; import java.io.IOException; import java.net.URL; @@ -167,7 +166,6 @@ static PagedIterable readAll(GHTeam team) throws IOException { * * @return a {@link GHDiscussion.Updater} */ - @Preview(Previews.SQUIRREL_GIRL) public GHDiscussion.Updater update() { return new GHDiscussion.Updater(this); } @@ -177,7 +175,6 @@ public GHDiscussion.Updater update() { * * @return a {@link GHDiscussion.Setter} */ - @Preview(Previews.SQUIRREL_GIRL) 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 3bed850ae3..2adeb20b11 100644 --- a/src/main/java/org/kohsuke/github/GHIssue.java +++ b/src/main/java/org/kohsuke/github/GHIssue.java @@ -42,8 +42,6 @@ import java.util.Map; import java.util.Objects; -import static org.kohsuke.github.internal.Previews.SQUIRREL_GIRL; - // TODO: Auto-generated Javadoc /** * Represents an issue on GitHub. @@ -584,11 +582,9 @@ public GHIssueCommentQueryBuilder queryComments() { * @throws IOException * Signals that an I/O exception has occurred. */ - @Preview(SQUIRREL_GIRL) public GHReaction createReaction(ReactionContent content) throws IOException { return root().createRequest() .method("POST") - .withPreview(SQUIRREL_GIRL) .with("content", content.getContent()) .withUrlPath(getIssuesApiRoute() + "/reactions") .fetch(GHReaction.class); @@ -615,10 +611,8 @@ public void deleteReaction(GHReaction reaction) throws IOException { * * @return the paged iterable */ - @Preview(SQUIRREL_GIRL) public PagedIterable listReactions() { return root().createRequest() - .withPreview(SQUIRREL_GIRL) .withUrlPath(getIssuesApiRoute() + "/reactions") .toIterable(GHReaction[].class, null); } diff --git a/src/main/java/org/kohsuke/github/GHIssueComment.java b/src/main/java/org/kohsuke/github/GHIssueComment.java index 37be280ce3..013cd5f85a 100644 --- a/src/main/java/org/kohsuke/github/GHIssueComment.java +++ b/src/main/java/org/kohsuke/github/GHIssueComment.java @@ -28,8 +28,6 @@ import java.io.IOException; import java.net.URL; -import static org.kohsuke.github.internal.Previews.SQUIRREL_GIRL; - // TODO: Auto-generated Javadoc /** * Comment to the issue. @@ -154,12 +152,10 @@ public void delete() throws IOException { * @throws IOException * Signals that an I/O exception has occurred. */ - @Preview(SQUIRREL_GIRL) public GHReaction createReaction(ReactionContent content) throws IOException { return owner.root() .createRequest() .method("POST") - .withPreview(SQUIRREL_GIRL) .with("content", content.getContent()) .withUrlPath(getApiRoute() + "/reactions") .fetch(GHReaction.class); @@ -186,11 +182,9 @@ public void deleteReaction(GHReaction reaction) throws IOException { * * @return the paged iterable */ - @Preview(SQUIRREL_GIRL) public PagedIterable listReactions() { return owner.root() .createRequest() - .withPreview(SQUIRREL_GIRL) .withUrlPath(getApiRoute() + "/reactions") .toIterable(GHReaction[].class, item -> owner.root()); } diff --git a/src/main/java/org/kohsuke/github/GHOrganization.java b/src/main/java/org/kohsuke/github/GHOrganization.java index 45711792ed..ee5f843348 100644 --- a/src/main/java/org/kohsuke/github/GHOrganization.java +++ b/src/main/java/org/kohsuke/github/GHOrganization.java @@ -4,8 +4,6 @@ import java.net.URL; import java.util.*; -import static org.kohsuke.github.internal.Previews.INERTIA; - // TODO: Auto-generated Javadoc /** @@ -518,7 +516,6 @@ private void edit(String key, Object value) throws IOException { */ public PagedIterable listProjects(final GHProject.ProjectStateFilter status) throws IOException { return root().createRequest() - .withPreview(INERTIA) .with("state", status) .withUrlPath(String.format("/orgs/%s/projects", login)) .toIterable(GHProject[].class, null); @@ -549,7 +546,6 @@ public PagedIterable listProjects() throws IOException { public GHProject createProject(String name, String body) throws IOException { return root().createRequest() .method("POST") - .withPreview(INERTIA) .with("name", name) .with("body", body) .withUrlPath(String.format("/orgs/%s/projects", login)) diff --git a/src/main/java/org/kohsuke/github/GHProject.java b/src/main/java/org/kohsuke/github/GHProject.java index 8e89001298..e86115add1 100644 --- a/src/main/java/org/kohsuke/github/GHProject.java +++ b/src/main/java/org/kohsuke/github/GHProject.java @@ -30,8 +30,6 @@ import java.net.URL; import java.util.Locale; -import static org.kohsuke.github.internal.Previews.INERTIA; - // TODO: Auto-generated Javadoc /** * A GitHub project. @@ -193,7 +191,7 @@ GHProject lateBind(GHRepository repo) { } private void edit(String key, Object value) throws IOException { - root().createRequest().method("PATCH").withPreview(INERTIA).with(key, value).withUrlPath(getApiRoute()).send(); + root().createRequest().method("PATCH").with(key, value).withUrlPath(getApiRoute()).send(); } /** @@ -297,7 +295,7 @@ public void setPublic(boolean isPublic) throws IOException { * the io exception */ public void delete() throws IOException { - root().createRequest().withPreview(INERTIA).method("DELETE").withUrlPath(getApiRoute()).send(); + root().createRequest().method("DELETE").withUrlPath(getApiRoute()).send(); } /** @@ -310,7 +308,6 @@ public void delete() throws IOException { public PagedIterable listColumns() throws IOException { final GHProject project = this; return root().createRequest() - .withPreview(INERTIA) .withUrlPath(String.format("/projects/%d/columns", getId())) .toIterable(GHProjectColumn[].class, item -> item.lateBind(project)); } @@ -327,7 +324,6 @@ public PagedIterable listColumns() throws IOException { public GHProjectColumn createColumn(String name) throws IOException { return root().createRequest() .method("POST") - .withPreview(INERTIA) .with("name", name) .withUrlPath(String.format("/projects/%d/columns", getId())) .fetch(GHProjectColumn.class) diff --git a/src/main/java/org/kohsuke/github/GHProjectCard.java b/src/main/java/org/kohsuke/github/GHProjectCard.java index 9cb0f92f2f..45da83d709 100644 --- a/src/main/java/org/kohsuke/github/GHProjectCard.java +++ b/src/main/java/org/kohsuke/github/GHProjectCard.java @@ -7,8 +7,6 @@ import java.io.IOException; import java.net.URL; -import static org.kohsuke.github.internal.Previews.INERTIA; - // TODO: Auto-generated Javadoc /** * The type GHProjectCard. @@ -223,7 +221,7 @@ public void setArchived(boolean archived) throws IOException { } private void edit(String key, Object value) throws IOException { - root().createRequest().method("PATCH").withPreview(INERTIA).with(key, value).withUrlPath(getApiRoute()).send(); + root().createRequest().method("PATCH").with(key, value).withUrlPath(getApiRoute()).send(); } /** @@ -242,6 +240,6 @@ protected String getApiRoute() { * the io exception */ public void delete() throws IOException { - root().createRequest().withPreview(INERTIA).method("DELETE").withUrlPath(getApiRoute()).send(); + root().createRequest().method("DELETE").withUrlPath(getApiRoute()).send(); } } diff --git a/src/main/java/org/kohsuke/github/GHProjectColumn.java b/src/main/java/org/kohsuke/github/GHProjectColumn.java index 024e9a876f..f05cc4f75d 100644 --- a/src/main/java/org/kohsuke/github/GHProjectColumn.java +++ b/src/main/java/org/kohsuke/github/GHProjectColumn.java @@ -6,8 +6,6 @@ import java.io.IOException; import java.net.URL; -import static org.kohsuke.github.internal.Previews.INERTIA; - // TODO: Auto-generated Javadoc /** * The type GHProjectColumn. @@ -130,7 +128,7 @@ public void setName(String name) throws IOException { } private void edit(String key, Object value) throws IOException { - root().createRequest().method("PATCH").withPreview(INERTIA).with(key, value).withUrlPath(getApiRoute()).send(); + root().createRequest().method("PATCH").with(key, value).withUrlPath(getApiRoute()).send(); } /** @@ -149,7 +147,7 @@ protected String getApiRoute() { * the io exception */ public void delete() throws IOException { - root().createRequest().withPreview(INERTIA).method("DELETE").withUrlPath(getApiRoute()).send(); + root().createRequest().method("DELETE").withUrlPath(getApiRoute()).send(); } /** @@ -162,7 +160,6 @@ public void delete() throws IOException { public PagedIterable listCards() throws IOException { final GHProjectColumn column = this; return root().createRequest() - .withPreview(INERTIA) .withUrlPath(String.format("/projects/columns/%d/cards", getId())) .toIterable(GHProjectCard[].class, item -> item.lateBind(column)); } @@ -179,7 +176,6 @@ public PagedIterable listCards() throws IOException { public GHProjectCard createCard(String note) throws IOException { return root().createRequest() .method("POST") - .withPreview(INERTIA) .with("note", note) .withUrlPath(String.format("/projects/columns/%d/cards", getId())) .fetch(GHProjectCard.class) @@ -199,7 +195,6 @@ public GHProjectCard createCard(GHIssue issue) throws IOException { String contentType = issue instanceof GHPullRequest ? "PullRequest" : "Issue"; return root().createRequest() .method("POST") - .withPreview(INERTIA) .with("content_type", contentType) .with("content_id", issue.getId()) .withUrlPath(String.format("/projects/columns/%d/cards", getId())) diff --git a/src/main/java/org/kohsuke/github/GHPullRequest.java b/src/main/java/org/kohsuke/github/GHPullRequest.java index 5f8f21f627..ba2a75e61f 100644 --- a/src/main/java/org/kohsuke/github/GHPullRequest.java +++ b/src/main/java/org/kohsuke/github/GHPullRequest.java @@ -37,9 +37,6 @@ import javax.annotation.CheckForNull; -import static org.kohsuke.github.internal.Previews.LYDIAN; -import static org.kohsuke.github.internal.Previews.SHADOW_CAT; - // TODO: Auto-generated Javadoc /** * A pull request. @@ -418,11 +415,7 @@ public void refresh() throws IOException { // we do not want to use getUrl() here as it points to the issues API // and not the pull request one URL absoluteUrl = GitHubRequest.getApiURL(root().getApiUrl(), getApiRoute()); - root().createRequest() - .withPreview(SHADOW_CAT) - .setRawUrlPath(absoluteUrl.toString()) - .fetchInto(this) - .wrapUp(owner); + root().createRequest().setRawUrlPath(absoluteUrl.toString()).fetchInto(this).wrapUp(owner); } /** @@ -616,10 +609,8 @@ public GHPullRequest setBaseBranch(String newBaseBranch) throws IOException { * @throws IOException * the io exception */ - @Preview(LYDIAN) public void updateBranch() throws IOException { root().createRequest() - .withPreview(LYDIAN) .method("PUT") .with("expected_head_sha", head.getSha()) .withUrlPath(getApiRoute() + "/update-branch") diff --git a/src/main/java/org/kohsuke/github/GHPullRequestQueryBuilder.java b/src/main/java/org/kohsuke/github/GHPullRequestQueryBuilder.java index eb93f200b0..05f905e389 100644 --- a/src/main/java/org/kohsuke/github/GHPullRequestQueryBuilder.java +++ b/src/main/java/org/kohsuke/github/GHPullRequestQueryBuilder.java @@ -1,7 +1,5 @@ package org.kohsuke.github; -import static org.kohsuke.github.internal.Previews.SHADOW_CAT; - // TODO: Auto-generated Javadoc /** * Lists up pull requests with some filtering and sorting. @@ -108,8 +106,7 @@ public GHPullRequestQueryBuilder direction(GHDirection d) { */ @Override public PagedIterable list() { - return req.withPreview(SHADOW_CAT) - .withUrlPath(repo.getApiTailUrl("pulls")) + return req.withUrlPath(repo.getApiTailUrl("pulls")) .toIterable(GHPullRequest[].class, item -> item.wrapUp(repo)); } } diff --git a/src/main/java/org/kohsuke/github/GHPullRequestReviewComment.java b/src/main/java/org/kohsuke/github/GHPullRequestReviewComment.java index 674adb6516..c59d7acf81 100644 --- a/src/main/java/org/kohsuke/github/GHPullRequestReviewComment.java +++ b/src/main/java/org/kohsuke/github/GHPullRequestReviewComment.java @@ -31,8 +31,6 @@ import javax.annotation.CheckForNull; -import static org.kohsuke.github.internal.Previews.SQUIRREL_GIRL; - // TODO: Auto-generated Javadoc /** * Review comment to the pull request. @@ -414,12 +412,10 @@ public GHPullRequestReviewComment reply(String body) throws IOException { * @throws IOException * Signals that an I/O exception has occurred. */ - @Preview(SQUIRREL_GIRL) public GHReaction createReaction(ReactionContent content) throws IOException { return owner.root() .createRequest() .method("POST") - .withPreview(SQUIRREL_GIRL) .with("content", content.getContent()) .withUrlPath(getApiRoute() + "/reactions") .fetch(GHReaction.class); @@ -446,11 +442,9 @@ public void deleteReaction(GHReaction reaction) throws IOException { * * @return the paged iterable */ - @Preview(SQUIRREL_GIRL) public PagedIterable listReactions() { return owner.root() .createRequest() - .withPreview(SQUIRREL_GIRL) .withUrlPath(getApiRoute() + "/reactions") .toIterable(GHReaction[].class, item -> owner.root()); } diff --git a/src/main/java/org/kohsuke/github/GHReaction.java b/src/main/java/org/kohsuke/github/GHReaction.java index 11cdfc7817..6a0cadcbcb 100644 --- a/src/main/java/org/kohsuke/github/GHReaction.java +++ b/src/main/java/org/kohsuke/github/GHReaction.java @@ -5,8 +5,6 @@ import java.io.IOException; import java.net.URL; -import static org.kohsuke.github.internal.Previews.SQUIRREL_GIRL; - // TODO: Auto-generated Javadoc /** * Reaction to issue, comment, PR, and so on. @@ -14,7 +12,6 @@ * @author Kohsuke Kawaguchi * @see Reactable */ -@Preview(SQUIRREL_GIRL) public class GHReaction extends GHObject { private GHUser user; diff --git a/src/main/java/org/kohsuke/github/GHRepository.java b/src/main/java/org/kohsuke/github/GHRepository.java index c53a3624a9..cdec753ffd 100644 --- a/src/main/java/org/kohsuke/github/GHRepository.java +++ b/src/main/java/org/kohsuke/github/GHRepository.java @@ -60,14 +60,6 @@ import static java.util.Arrays.asList; import static java.util.Objects.requireNonNull; -import static org.kohsuke.github.internal.Previews.ANTIOPE; -import static org.kohsuke.github.internal.Previews.ANT_MAN; -import static org.kohsuke.github.internal.Previews.BAPTISTE; -import static org.kohsuke.github.internal.Previews.FLASH; -import static org.kohsuke.github.internal.Previews.INERTIA; -import static org.kohsuke.github.internal.Previews.MERCY; -import static org.kohsuke.github.internal.Previews.NEBULA; -import static org.kohsuke.github.internal.Previews.SHADOW_CAT; // TODO: Auto-generated Javadoc /** @@ -195,8 +187,6 @@ public PagedIterable listDeployments(String sha, String ref, Strin .with("task", task) .with("environment", environment) .withUrlPath(getApiTailUrl("deployments")) - .withPreview(ANT_MAN) - .withPreview(FLASH) .toIterable(GHDeployment[].class, item -> item.wrap(this)); } @@ -212,8 +202,6 @@ public PagedIterable listDeployments(String sha, String ref, Strin public GHDeployment getDeployment(long id) throws IOException { return root().createRequest() .withUrlPath(getApiTailUrl("deployments/" + id)) - .withPreview(ANT_MAN) - .withPreview(FLASH) .fetch(GHDeployment.class) .wrap(this); } @@ -829,7 +817,6 @@ public String toString() { * * @return the visibility */ - @Preview(NEBULA) public Visibility getVisibility() { if (visibility == null) { try { @@ -847,7 +834,6 @@ public Visibility getVisibility() { * * @return the boolean */ - @Preview(BAPTISTE) public boolean isTemplate() { // isTemplate is still in preview, we do not want to retrieve it unless needed. if (isTemplate == null) { @@ -1437,11 +1423,9 @@ public void setPrivate(boolean value) throws IOException { * @throws IOException * the io exception */ - @Preview(NEBULA) public void setVisibility(final Visibility value) throws IOException { root().createRequest() .method("PATCH") - .withPreview(NEBULA) .with("name", name) .with("visibility", value) .withUrlPath(getApiTailUrl("")) @@ -1670,11 +1654,7 @@ public GHRepository forkTo(GHOrganization org) throws IOException { * the io exception */ public GHPullRequest getPullRequest(int i) throws IOException { - return root().createRequest() - .withPreview(SHADOW_CAT) - .withUrlPath(getApiTailUrl("pulls/" + i)) - .fetch(GHPullRequest.class) - .wrapUp(this); + return root().createRequest().withUrlPath(getApiTailUrl("pulls/" + i)).fetch(GHPullRequest.class).wrapUp(this); } /** @@ -1799,7 +1779,6 @@ public GHPullRequest createPullRequest(String title, boolean draft) throws IOException { return root().createRequest() .method("POST") - .withPreview(SHADOW_CAT) .with("title", title) .with("head", head) .with("base", base) @@ -2091,7 +2070,7 @@ public InputStream readBlob(String blobSha) throws IOException { // https://developer.github.com/v3/media/ describes this media type return root().createRequest() - .withHeader("Accept", "application/vnd.github.v3.raw") + .withHeader("Accept", "application/vnd.github.raw") .withUrlPath(target) .fetchStream(Requester::copyInputStream); } @@ -2245,11 +2224,9 @@ public GHCommitStatus getLastCommitStatus(String sha1) throws IOException { * @see List check runs * for a specific ref */ - @Preview(ANTIOPE) public PagedIterable getCheckRuns(String ref) throws IOException { GitHubRequest request = root().createRequest() .withUrlPath(String.format("/repos/%s/%s/commits/%s/check-runs", getOwnerName(), name, ref)) - .withPreview(ANTIOPE) .build(); return new GHCheckRunsIterable(this, request); } @@ -2267,12 +2244,10 @@ public PagedIterable getCheckRuns(String ref) throws IOException { * @see List check runs * for a specific ref */ - @Preview(ANTIOPE) public PagedIterable getCheckRuns(String ref, Map params) throws IOException { GitHubRequest request = root().createRequest() .withUrlPath(String.format("/repos/%s/%s/commits/%s/check-runs", getOwnerName(), name, ref)) .with(params) - .withPreview(ANTIOPE) .build(); return new GHCheckRunsIterable(this, request); } @@ -2340,7 +2315,6 @@ public GHCommitStatus createCommitStatus(String sha1, GHCommitState state, Strin * the commit hash * @return a builder which you should customize, then call {@link GHCheckRunBuilder#create} */ - @Preview(ANTIOPE) public @NonNull GHCheckRunBuilder createCheckRun(@NonNull String name, @NonNull String headSHA) { return new GHCheckRunBuilder(this, name, headSHA); } @@ -2352,7 +2326,6 @@ public GHCommitStatus createCommitStatus(String sha1, GHCommitState state, Strin * the existing checkId * @return a builder which you should customize, then call {@link GHCheckRunBuilder#create} */ - @Preview(BAPTISTE) public @NonNull GHCheckRunBuilder updateCheckRun(long checkId) { return new GHCheckRunBuilder(this, checkId); } @@ -3153,7 +3126,6 @@ public GHRepositoryStatistics getStatistics() { public GHProject createProject(String name, String body) throws IOException { return root().createRequest() .method("POST") - .withPreview(INERTIA) .with("name", name) .with("body", body) .withUrlPath(getApiTailUrl("projects")) @@ -3172,7 +3144,6 @@ public GHProject createProject(String name, String body) throws IOException { */ public PagedIterable listProjects(final GHProject.ProjectStateFilter status) throws IOException { return root().createRequest() - .withPreview(INERTIA) .with("state", status) .withUrlPath(getApiTailUrl("projects")) .toIterable(GHProject[].class, item -> item.lateBind(this)); @@ -3449,10 +3420,7 @@ private static class Topics { * the io exception */ public List listTopics() throws IOException { - Topics topics = root().createRequest() - .withPreview(MERCY) - .withUrlPath(getApiTailUrl("topics")) - .fetch(Topics.class); + Topics topics = root().createRequest().withUrlPath(getApiTailUrl("topics")).fetch(Topics.class); return topics.names; } @@ -3466,12 +3434,7 @@ public List listTopics() throws IOException { * the io exception */ public void setTopics(List topics) throws IOException { - root().createRequest() - .method("PUT") - .with("names", topics) - .withPreview(MERCY) - .withUrlPath(getApiTailUrl("topics")) - .send(); + root().createRequest().method("PUT").with("names", topics).withUrlPath(getApiTailUrl("topics")).send(); } /** @@ -3608,7 +3571,7 @@ void populate() throws IOException { // All other occurrences of "url" take the form "https://api.github.com/...". // 2. For Installation event payloads, the URL is not provided at all. - root().createRequest().withPreview(BAPTISTE).withPreview(NEBULA).withUrlPath(getApiTailUrl("")).fetchInto(this); + root().createRequest().withUrlPath(getApiTailUrl("")).fetchInto(this); } /** diff --git a/src/main/java/org/kohsuke/github/GHRepositoryBuilder.java b/src/main/java/org/kohsuke/github/GHRepositoryBuilder.java index a7b5b11a72..d32dbd2563 100644 --- a/src/main/java/org/kohsuke/github/GHRepositoryBuilder.java +++ b/src/main/java/org/kohsuke/github/GHRepositoryBuilder.java @@ -5,9 +5,6 @@ import java.io.IOException; import java.net.URL; -import static org.kohsuke.github.internal.Previews.BAPTISTE; -import static org.kohsuke.github.internal.Previews.NEBULA; - // TODO: Auto-generated Javadoc /** * The Class GHRepositoryBuilder. @@ -179,7 +176,6 @@ public S private_(boolean enabled) throws IOException { * In case of any networking error or error from the server. */ public S visibility(final Visibility visibility) throws IOException { - requester.withPreview(NEBULA); return with("visibility", visibility.toString()); } @@ -244,9 +240,7 @@ public S downloads(boolean enabled) throws IOException { * @throws IOException * In case of any networking error or error from the server. */ - @Preview(BAPTISTE) public S isTemplate(boolean enabled) throws IOException { - requester.withPreview(BAPTISTE); return with("is_template", enabled); } diff --git a/src/main/java/org/kohsuke/github/GHUser.java b/src/main/java/org/kohsuke/github/GHUser.java index 9d1fb057b8..d28ab697da 100644 --- a/src/main/java/org/kohsuke/github/GHUser.java +++ b/src/main/java/org/kohsuke/github/GHUser.java @@ -28,8 +28,6 @@ import java.io.IOException; import java.util.*; -import static org.kohsuke.github.internal.Previews.INERTIA; - // TODO: Auto-generated Javadoc /** * Represents an user of GitHub. @@ -145,12 +143,8 @@ public PagedIterable listStarredRepositories() { * * @return the paged iterable */ - @Preview(INERTIA) public PagedIterable listProjects() { - return root().createRequest() - .withPreview(INERTIA) - .withUrlPath(getApiTailUrl("projects")) - .toIterable(GHProject[].class, null); + return root().createRequest().withUrlPath(getApiTailUrl("projects")).toIterable(GHProject[].class, null); } private PagedIterable listRepositories(final String suffix) { diff --git a/src/main/java/org/kohsuke/github/GitHub.java b/src/main/java/org/kohsuke/github/GitHub.java index d25033af18..de7d95fb7e 100644 --- a/src/main/java/org/kohsuke/github/GitHub.java +++ b/src/main/java/org/kohsuke/github/GitHub.java @@ -32,7 +32,6 @@ import org.kohsuke.github.authorization.UserAuthorizationProvider; import org.kohsuke.github.connector.GitHubConnector; import org.kohsuke.github.internal.GitHubConnectorHttpConnectorAdapter; -import org.kohsuke.github.internal.Previews; import java.io.*; import java.util.*; @@ -44,9 +43,6 @@ import javax.annotation.CheckForNull; import javax.annotation.Nonnull; -import static org.kohsuke.github.internal.Previews.INERTIA; -import static org.kohsuke.github.internal.Previews.MACHINE_MAN; - // TODO: Auto-generated Javadoc /** * Root of the GitHub API. @@ -1185,9 +1181,8 @@ public PagedIterable listMyAuthorizations() throws IOException * @see Get the authenticated * GitHub App */ - @Preview(MACHINE_MAN) public GHApp getApp() throws IOException { - return createRequest().withPreview(MACHINE_MAN).withUrlPath("/app").fetch(GHApp.class); + return createRequest().withUrlPath("/app").fetch(GHApp.class); } /** @@ -1233,7 +1228,6 @@ public GHAppFromManifest createAppFromManifest(@Nonnull String code) throws IOEx * the io exception * @see GitHub App installations */ - @Preview(MACHINE_MAN) public GHAuthenticatedAppInstallation getInstallation() throws IOException { return new GHAuthenticatedAppInstallation(this); } @@ -1270,7 +1264,7 @@ public GHMeta getMeta() throws IOException { * the io exception */ public GHProject getProject(long id) throws IOException { - return createRequest().withPreview(INERTIA).withUrlPath("/projects/" + id).fetch(GHProject.class); + return createRequest().withUrlPath("/projects/" + id).fetch(GHProject.class); } /** @@ -1283,10 +1277,7 @@ public GHProject getProject(long id) throws IOException { * the io exception */ public GHProjectColumn getProjectColumn(long id) throws IOException { - return createRequest().withPreview(INERTIA) - .withUrlPath("/projects/columns/" + id) - .fetch(GHProjectColumn.class) - .lateBind(this); + return createRequest().withUrlPath("/projects/columns/" + id).fetch(GHProjectColumn.class).lateBind(this); } /** @@ -1299,10 +1290,7 @@ public GHProjectColumn getProjectColumn(long id) throws IOException { * the io exception */ public GHProjectCard getProjectCard(long id) throws IOException { - return createRequest().withPreview(INERTIA) - .withUrlPath("/projects/columns/cards/" + id) - .fetch(GHProjectCard.class) - .lateBind(this); + return createRequest().withUrlPath("/projects/columns/cards/" + id).fetch(GHProjectCard.class).lateBind(this); } /** @@ -1327,7 +1315,6 @@ public void checkApiUrlValidity() throws IOException { * * @return the gh commit search builder */ - @Preview(Previews.CLOAK) public GHCommitSearchBuilder searchCommits() { return new GHCommitSearchBuilder(this); } diff --git a/src/main/java/org/kohsuke/github/Reactable.java b/src/main/java/org/kohsuke/github/Reactable.java index a6117cd54b..309f7d29b2 100644 --- a/src/main/java/org/kohsuke/github/Reactable.java +++ b/src/main/java/org/kohsuke/github/Reactable.java @@ -2,22 +2,18 @@ import java.io.IOException; -import static org.kohsuke.github.internal.Previews.SQUIRREL_GIRL; - // TODO: Auto-generated Javadoc /** * Those {@link GHObject}s that can have {@linkplain GHReaction reactions}. * * @author Kohsuke Kawaguchi */ -@Preview(SQUIRREL_GIRL) public interface Reactable { /** * List all the reactions left to this object. * * @return the paged iterable */ - @Preview(SQUIRREL_GIRL) PagedIterable listReactions(); /** @@ -29,7 +25,6 @@ public interface Reactable { * @throws IOException * the io exception */ - @Preview(SQUIRREL_GIRL) GHReaction createReaction(ReactionContent content) throws IOException; /** diff --git a/src/main/java/org/kohsuke/github/internal/Previews.java b/src/main/java/org/kohsuke/github/internal/Previews.java index abf81c400d..77beb5a42d 100644 --- a/src/main/java/org/kohsuke/github/internal/Previews.java +++ b/src/main/java/org/kohsuke/github/internal/Previews.java @@ -1,7 +1,5 @@ package org.kohsuke.github.internal; -import java.lang.Deprecated; - /** * Provides the media type strings for GitHub API previews * diff --git a/src/test/java/org/kohsuke/github/AbuseLimitHandlerTest.java b/src/test/java/org/kohsuke/github/AbuseLimitHandlerTest.java index 2ffe762f70..004ba305e9 100644 --- a/src/test/java/org/kohsuke/github/AbuseLimitHandlerTest.java +++ b/src/test/java/org/kohsuke/github/AbuseLimitHandlerTest.java @@ -134,7 +134,7 @@ public void onError(IOException e, HttpURLConnection uc) throws IOException { assertThat(uc.getHeaderField(1), notNullValue()); assertThat(uc.getHeaderField(1), equalTo(uc.getHeaderField(key))); - assertThat(uc.getRequestProperty("Accept"), equalTo("application/vnd.github.v3+json")); + assertThat(uc.getRequestProperty("Accept"), equalTo("application/vnd.github+json")); Assert.assertThrows(IllegalStateException.class, () -> uc.getRequestProperties()); diff --git a/src/test/java/org/kohsuke/github/GHOrganizationTest.java b/src/test/java/org/kohsuke/github/GHOrganizationTest.java index 668c42f886..fcafc97aa9 100644 --- a/src/test/java/org/kohsuke/github/GHOrganizationTest.java +++ b/src/test/java/org/kohsuke/github/GHOrganizationTest.java @@ -140,11 +140,11 @@ public void testCreateRepositoryWithParameterIsTemplate() throws IOException { // first isTemplate() calls populate() assertThat(repository.isTemplate(), equalTo(true)); - assertThat(mockGitHub.getRequestCount(), equalTo(requestCount + 4)); + assertThat(mockGitHub.getRequestCount(), equalTo(requestCount + 3)); // second isTemplate() does not call populate() assertThat(repository.isTemplate(), equalTo(true)); - assertThat(mockGitHub.getRequestCount(), equalTo(requestCount + 4)); + assertThat(mockGitHub.getRequestCount(), equalTo(requestCount + 3)); } diff --git a/src/test/java/org/kohsuke/github/GHRepositoryTest.java b/src/test/java/org/kohsuke/github/GHRepositoryTest.java index 3ad8545c3c..30b0960346 100644 --- a/src/test/java/org/kohsuke/github/GHRepositoryTest.java +++ b/src/test/java/org/kohsuke/github/GHRepositoryTest.java @@ -1628,11 +1628,11 @@ public void starTest() throws Exception { String owner = "hub4j-test-org"; GHRepository repository = getRepository(); assertThat(repository.getOwner().getLogin(), equalTo(owner)); - assertThat(repository.getStargazersCount(), is(0)); + assertThat(repository.getStargazersCount(), is(1)); repository.star(); - assertThat(repository.listStargazers2().toList().size(), is(1)); + assertThat(repository.listStargazers2().toList().size(), is(2)); repository.unstar(); - assertThat(repository.listStargazers().toList().size(), is(0)); + assertThat(repository.listStargazers().toList().size(), is(1)); } /** diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testGetDeploymentStatuses/mappings/4-r_h_g_deployments_315601644_statuses.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testGetDeploymentStatuses/mappings/4-r_h_g_deployments_315601644_statuses.json index 35e9858880..f58e353c6f 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testGetDeploymentStatuses/mappings/4-r_h_g_deployments_315601644_statuses.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testGetDeploymentStatuses/mappings/4-r_h_g_deployments_315601644_statuses.json @@ -11,7 +11,7 @@ }, "bodyPatterns": [ { - "equalToJson": "{\"environment\":\"new-ci-env\",\"environment_url\":\"http://www.github.com/envurl\",\"log_url\":\"http://www.github.com/logurl\",\"description\":\"success\",\"state\":\"queued\"}", + "equalToJson": "{\"environment\":\"new-ci-env\",\"environment_url\":\"http://www.github.com/envurl\",\"target_url\":\"http://www.github.com\",\"log_url\":\"http://www.github.com/logurl\",\"description\":\"success\",\"state\":\"queued\"}", "ignoreArrayOrder": true, "ignoreExtraElements": false } diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/starTest/mappings/8-r_h_g_stargazers.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/starTest/mappings/8-r_h_g_stargazers.json index a0b09b2ecf..93a2fd7ea7 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/starTest/mappings/8-r_h_g_stargazers.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/starTest/mappings/8-r_h_g_stargazers.json @@ -6,7 +6,7 @@ "method": "GET", "headers": { "Accept": { - "equalTo": "application/vnd.github.star+json" + "equalTo": "application/vnd.github+json" } } }, diff --git a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/1-r_h_ghworkflowruntest.json b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/1-r_h_ghworkflowruntest.json index 5c2abb7868..905dcd086d 100644 --- a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/1-r_h_ghworkflowruntest.json +++ b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/1-r_h_ghworkflowruntest.json @@ -9,7 +9,7 @@ "equalTo": "application/vnd.github+json" }, "Authorization": { - "equalTo": "token placeholder-password" + "equalTo": "Basic cGxhY2Vob2xkZXItdXNlcjpwbGFjZWhvbGRlci1wYXNzd29yZA==" } } }, diff --git a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/10-r_h_g_actions_artifacts_1242831517.json b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/10-r_h_g_actions_artifacts_1242831517.json index f6d33e5aaf..f0ed7a4ce8 100644 --- a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/10-r_h_g_actions_artifacts_1242831517.json +++ b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/10-r_h_g_actions_artifacts_1242831517.json @@ -9,7 +9,7 @@ "equalTo": "application/vnd.github+json" }, "Authorization": { - "equalTo": "token placeholder-password" + "equalTo": "Basic cGxhY2Vob2xkZXItdXNlcjpwbGFjZWhvbGRlci1wYXNzd29yZA==" } } }, diff --git a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/11-r_h_g_actions_artifacts.json b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/11-r_h_g_actions_artifacts.json index ba6d4554d0..971c27aa00 100644 --- a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/11-r_h_g_actions_artifacts.json +++ b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/11-r_h_g_actions_artifacts.json @@ -9,7 +9,7 @@ "equalTo": "application/vnd.github+json" }, "Authorization": { - "equalTo": "token placeholder-password" + "equalTo": "Basic cGxhY2Vob2xkZXItdXNlcjpwbGFjZWhvbGRlci1wYXNzd29yZA==" } } }, diff --git a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/12-r_h_g_actions_artifacts_1242831742.json b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/12-r_h_g_actions_artifacts_1242831742.json index 108829cb80..5aa78678ea 100644 --- a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/12-r_h_g_actions_artifacts_1242831742.json +++ b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/12-r_h_g_actions_artifacts_1242831742.json @@ -9,7 +9,7 @@ "equalTo": "application/vnd.github+json" }, "Authorization": { - "equalTo": "token placeholder-password" + "equalTo": "Basic cGxhY2Vob2xkZXItdXNlcjpwbGFjZWhvbGRlci1wYXNzd29yZA==" } } }, diff --git a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/13-r_h_g_actions_artifacts_1242831742.json b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/13-r_h_g_actions_artifacts_1242831742.json index d6688b4202..bc6bb62ec0 100644 --- a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/13-r_h_g_actions_artifacts_1242831742.json +++ b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/13-r_h_g_actions_artifacts_1242831742.json @@ -9,7 +9,7 @@ "equalTo": "application/vnd.github+json" }, "Authorization": { - "equalTo": "token placeholder-password" + "equalTo": "Basic cGxhY2Vob2xkZXItdXNlcjpwbGFjZWhvbGRlci1wYXNzd29yZA==" } } }, diff --git a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/2-r_h_g_actions_workflows_artifacts-workflowyml.json b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/2-r_h_g_actions_workflows_artifacts-workflowyml.json index cac9a5baab..a827d744b2 100644 --- a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/2-r_h_g_actions_workflows_artifacts-workflowyml.json +++ b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/2-r_h_g_actions_workflows_artifacts-workflowyml.json @@ -9,7 +9,7 @@ "equalTo": "application/vnd.github+json" }, "Authorization": { - "equalTo": "token placeholder-password" + "equalTo": "Basic cGxhY2Vob2xkZXItdXNlcjpwbGFjZWhvbGRlci1wYXNzd29yZA==" } } }, diff --git a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/3-r_h_g_actions_runs.json b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/3-r_h_g_actions_runs.json index 977136037c..c253c2f2cf 100644 --- a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/3-r_h_g_actions_runs.json +++ b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/3-r_h_g_actions_runs.json @@ -9,7 +9,7 @@ "equalTo": "application/vnd.github+json" }, "Authorization": { - "equalTo": "token placeholder-password" + "equalTo": "Basic cGxhY2Vob2xkZXItdXNlcjpwbGFjZWhvbGRlci1wYXNzd29yZA==" } } }, diff --git a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/4-r_h_g_actions_workflows_7433027_dispatches.json b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/4-r_h_g_actions_workflows_7433027_dispatches.json index d0d8d8c001..6eb55e1d10 100644 --- a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/4-r_h_g_actions_workflows_7433027_dispatches.json +++ b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/4-r_h_g_actions_workflows_7433027_dispatches.json @@ -9,7 +9,7 @@ "equalTo": "application/vnd.github+json" }, "Authorization": { - "equalTo": "token placeholder-password" + "equalTo": "Basic cGxhY2Vob2xkZXItdXNlcjpwbGFjZWhvbGRlci1wYXNzd29yZA==" } }, "bodyPatterns": [ diff --git a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/5-r_h_g_actions_runs.json b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/5-r_h_g_actions_runs.json index 122bbdf46a..18e50b8a8c 100644 --- a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/5-r_h_g_actions_runs.json +++ b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/5-r_h_g_actions_runs.json @@ -9,7 +9,7 @@ "equalTo": "application/vnd.github+json" }, "Authorization": { - "equalTo": "token placeholder-password" + "equalTo": "Basic cGxhY2Vob2xkZXItdXNlcjpwbGFjZWhvbGRlci1wYXNzd29yZA==" } } }, diff --git a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/6-r_h_g_actions_runs_7892624040_artifacts.json b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/6-r_h_g_actions_runs_7892624040_artifacts.json index 58efa589dd..c45c036590 100644 --- a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/6-r_h_g_actions_runs_7892624040_artifacts.json +++ b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/6-r_h_g_actions_runs_7892624040_artifacts.json @@ -9,7 +9,7 @@ "equalTo": "application/vnd.github+json" }, "Authorization": { - "equalTo": "token placeholder-password" + "equalTo": "Basic cGxhY2Vob2xkZXItdXNlcjpwbGFjZWhvbGRlci1wYXNzd29yZA==" } } }, diff --git a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/7-r_h_g_actions_artifacts_1242831742_zip.json b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/7-r_h_g_actions_artifacts_1242831742_zip.json index 0a785c1319..bfb65b221f 100644 --- a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/7-r_h_g_actions_artifacts_1242831742_zip.json +++ b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/7-r_h_g_actions_artifacts_1242831742_zip.json @@ -9,7 +9,7 @@ "equalTo": "application/vnd.github+json" }, "Authorization": { - "equalTo": "token placeholder-password" + "equalTo": "Basic cGxhY2Vob2xkZXItdXNlcjpwbGFjZWhvbGRlci1wYXNzd29yZA==" } } }, diff --git a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/8-r_h_g_actions_artifacts_1242831517_zip.json b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/8-r_h_g_actions_artifacts_1242831517_zip.json index 6fc19ededb..d8eb518e39 100644 --- a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/8-r_h_g_actions_artifacts_1242831517_zip.json +++ b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/8-r_h_g_actions_artifacts_1242831517_zip.json @@ -9,7 +9,7 @@ "equalTo": "application/vnd.github+json" }, "Authorization": { - "equalTo": "token placeholder-password" + "equalTo": "Basic cGxhY2Vob2xkZXItdXNlcjpwbGFjZWhvbGRlci1wYXNzd29yZA==" } } }, diff --git a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/9-r_h_g_actions_artifacts_1242831742.json b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/9-r_h_g_actions_artifacts_1242831742.json index 593cdcc065..478d1773e5 100644 --- a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/9-r_h_g_actions_artifacts_1242831742.json +++ b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testArtifacts/mappings/9-r_h_g_actions_artifacts_1242831742.json @@ -9,7 +9,7 @@ "equalTo": "application/vnd.github+json" }, "Authorization": { - "equalTo": "token placeholder-password" + "equalTo": "Basic cGxhY2Vob2xkZXItdXNlcjpwbGFjZWhvbGRlci1wYXNzd29yZA==" } } },