diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 22efc82ce8..ebb0d6b9c8 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -42,7 +42,7 @@ jobs: steps: - name: Set up JDK - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: 17 diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index acbcaba2f7..019b655490 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -107,7 +107,7 @@ jobs: name: maven-test-target-directory path: target - name: Codecov Report - uses: codecov/codecov-action@v4.5.0 + uses: codecov/codecov-action@v5.1.2 with: # Codecov token from https://app.codecov.io/gh/hub4j/github-api/settings token: ${{ secrets.CODECOV_TOKEN }} diff --git a/pom.xml b/pom.xml index 2a04ff1679..5987d54862 100644 --- a/pom.xml +++ b/pom.xml @@ -32,14 +32,14 @@ - 3.3.3 + 3.3.5 UTF-8 - 4.8.6.3 + 4.8.6.4 4.8.6 true 3.0 4.12.0 - 3.9.0 + 3.9.1 0.70 0.50 @@ -85,16 +85,16 @@ org.codehaus.mojo versions-maven-plugin - 2.17.1 + 2.18.0 org.apache.maven.plugins maven-help-plugin - 3.5.0 + 3.5.1 maven-surefire-plugin - 3.5.0 + 3.5.2 false @@ -108,7 +108,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.2.6 + 3.2.7 org.jacoco @@ -223,7 +223,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.10.0 + 3.11.1 8 true @@ -265,7 +265,7 @@ org.apache.maven.plugins maven-site-plugin - 3.12.1 + 3.21.0 org.apache.maven.plugins @@ -285,7 +285,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.7.0 + 3.8.0 org.apache.bcel @@ -475,7 +475,7 @@ com.fasterxml.jackson jackson-bom - 2.17.2 + 2.18.2 import pom @@ -560,7 +560,7 @@ com.infradna.tool bridge-method-annotation - 1.29 + 1.30 true @@ -649,7 +649,7 @@ org.mockito mockito-core - 5.13.0 + 5.14.2 test diff --git a/src/main/java/org/kohsuke/github/AbuseLimitHandler.java b/src/main/java/org/kohsuke/github/AbuseLimitHandler.java index 288a1542bd..dff1d992d3 100644 --- a/src/main/java/org/kohsuke/github/AbuseLimitHandler.java +++ b/src/main/java/org/kohsuke/github/AbuseLimitHandler.java @@ -3,11 +3,7 @@ import org.kohsuke.github.connector.GitHubConnectorResponse; import java.io.IOException; -import java.io.InterruptedIOException; import java.net.HttpURLConnection; -import java.time.ZonedDateTime; -import java.time.format.DateTimeFormatter; -import java.time.temporal.ChronoUnit; import javax.annotation.Nonnull; @@ -88,13 +84,8 @@ public void onError(@Nonnull GitHubConnectorResponse connectorResponse) throws I public static final AbuseLimitHandler WAIT = new AbuseLimitHandler() { @Override public void onError(IOException e, HttpURLConnection uc) throws IOException { - try { - Thread.sleep(parseWaitTime(uc)); - } catch (InterruptedException ex) { - throw (InterruptedIOException) new InterruptedIOException().initCause(e); - } + sleep(parseWaitTime(uc)); } - }; /** @@ -116,19 +107,6 @@ public void onError(IOException e, HttpURLConnection uc) throws IOException { * number or a date (the spec allows both). If no header is found, wait for a reasonably amount of time. */ long parseWaitTime(HttpURLConnection uc) { - String v = uc.getHeaderField("Retry-After"); - if (v == null) { - // can't tell, wait for unambiguously over one minute per GitHub guidance - return DEFAULT_WAIT_MILLIS; - } - - try { - return Math.max(1000, Long.parseLong(v) * 1000); - } catch (NumberFormatException nfe) { - // The retry-after header could be a number in seconds, or an http-date - ZonedDateTime zdt = ZonedDateTime.parse(v, DateTimeFormatter.RFC_1123_DATE_TIME); - return ChronoUnit.MILLIS.between(ZonedDateTime.now(), zdt); - } + return parseWaitTime(uc.getHeaderField("Retry-After"), null, DEFAULT_WAIT_MILLIS, 1000); } - } diff --git a/src/main/java/org/kohsuke/github/GHApp.java b/src/main/java/org/kohsuke/github/GHApp.java index 49f1bb5b3b..d2fb5f76e6 100644 --- a/src/main/java/org/kohsuke/github/GHApp.java +++ b/src/main/java/org/kohsuke/github/GHApp.java @@ -204,6 +204,22 @@ public void setPermissions(Map permissions) { throw new RuntimeException("Do not use this method."); } + /** + * Obtains all the installation requests associated with this app. + *

+ * You must use a JWT to access this endpoint. + * + * @return a list of App installation requests + * @see List + * installation requests + */ + public PagedIterable listInstallationRequests() { + return root().createRequest() + .withUrlPath("/app/installation-requests") + .toIterable(GHAppInstallationRequest[].class, null); + } + /** * Obtains all the installations associated with this app. *

diff --git a/src/main/java/org/kohsuke/github/GHAppInstallationRequest.java b/src/main/java/org/kohsuke/github/GHAppInstallationRequest.java new file mode 100644 index 0000000000..e61dc7187c --- /dev/null +++ b/src/main/java/org/kohsuke/github/GHAppInstallationRequest.java @@ -0,0 +1,52 @@ +package org.kohsuke.github; + +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + +import java.io.IOException; +import java.net.URL; + +/** + * A Github App Installation Request. + * + * @author Anuj Hydrabadi + * @see GHApp#listInstallationRequests() GHApp#listInstallationRequests() + */ +public class GHAppInstallationRequest extends GHObject { + /** + * Create default GHAppInstallationRequest instance + */ + public GHAppInstallationRequest() { + } + + private GHOrganization account; + + private GHUser requester; + + private String htmlUrl; + + /** + * Gets the organization where the app was requested to be installed. + * + * @return the organization where the app was requested to be installed. + */ + @SuppressFBWarnings(value = { "EI_EXPOSE_REP", "UWF_UNWRITTEN_FIELD" }, justification = "Expected behavior") + public GHOrganization getAccount() { + return account; + } + + /** + * Gets the user who requested the installation. + * + * @return the user who requested the installation. + */ + @SuppressFBWarnings(value = { "EI_EXPOSE_REP", "UWF_UNWRITTEN_FIELD" }, justification = "Expected behavior") + public GHUser getRequester() { + return requester; + } + + @Override + public URL getHtmlUrl() throws IOException { + return GitHubClient.parseURL(htmlUrl); + } + +} diff --git a/src/main/java/org/kohsuke/github/GHAutolink.java b/src/main/java/org/kohsuke/github/GHAutolink.java new file mode 100644 index 0000000000..841f1d0f65 --- /dev/null +++ b/src/main/java/org/kohsuke/github/GHAutolink.java @@ -0,0 +1,100 @@ +package org.kohsuke.github; + +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + +import java.io.IOException; + +/** + * Represents a GitHub repository autolink reference. + * + * @author Alaurant + * @see GHAutolinkBuilder + * @see GHRepository#listAutolinks() GHRepository#listAutolinks() + * @see Repository autolinks API + */ +public class GHAutolink { + + private int id; + private String key_prefix; + private String url_template; + private boolean is_alphanumeric; + private GHRepository owner; + + /** + * Instantiates a new Gh autolink. + */ + public GHAutolink() { + } + + /** + * Gets the autolink ID + * + * @return the id + */ + public int getId() { + return id; + } + + /** + * Gets the key prefix used to identify issues/PR references + * + * @return the key prefix string + */ + public String getKeyPrefix() { + return key_prefix; + } + + /** + * Gets the URL template that will be used for matching + * + * @return the URL template string + */ + public String getUrlTemplate() { + return url_template; + } + + /** + * Checks if the autolink uses alphanumeric values + * + * @return true if alphanumeric, false otherwise + */ + public boolean isAlphanumeric() { + return is_alphanumeric; + } + + /** + * Gets the repository that owns this autolink + * + * @return the repository instance + */ + @SuppressFBWarnings(value = { "EI_EXPOSE_REP" }, justification = "Expected behavior") + public GHRepository getOwner() { + return owner; + } + + /** + * Deletes this autolink + * + * @throws IOException + * if the deletion fails + */ + public void delete() throws IOException { + owner.root() + .createRequest() + .method("DELETE") + .withUrlPath(String.format("/repos/%s/%s/autolinks/%d", owner.getOwnerName(), owner.getName(), getId())) + .send(); + } + + /** + * Wraps this autolink with its owner repository. + * + * @param owner + * the repository that owns this autolink + * @return this instance + */ + GHAutolink lateBind(GHRepository owner) { + this.owner = owner; + return this; + } +} diff --git a/src/main/java/org/kohsuke/github/GHAutolinkBuilder.java b/src/main/java/org/kohsuke/github/GHAutolinkBuilder.java new file mode 100644 index 0000000000..3082d9487d --- /dev/null +++ b/src/main/java/org/kohsuke/github/GHAutolinkBuilder.java @@ -0,0 +1,90 @@ +package org.kohsuke.github; + +import java.io.IOException; + +// TODO: Auto-generated Javadoc +/** + * The type Gh autolink builder. + * + * @see GHRepository#createAutolink() + * @see GHAutolink + */ +public class GHAutolinkBuilder { + + private final GHRepository repo; + private final Requester req; + private String keyPrefix; + private String urlTemplate; + private Boolean isAlphanumeric; + + /** + * Instantiates a new Gh autolink builder. + * + * @param repo + * the repo + */ + GHAutolinkBuilder(GHRepository repo) { + this.repo = repo; + req = repo.root().createRequest(); + } + + /** + * With key prefix gh autolink builder. + * + * @param keyPrefix + * the key prefix + * @return the gh autolink builder + */ + public GHAutolinkBuilder withKeyPrefix(String keyPrefix) { + this.keyPrefix = keyPrefix; + return this; + } + + /** + * With url template gh autolink builder. + * + * @param urlTemplate + * the url template + * @return the gh autolink builder + */ + public GHAutolinkBuilder withUrlTemplate(String urlTemplate) { + this.urlTemplate = urlTemplate; + return this; + } + + /** + * With is alphanumeric gh autolink builder. + * + * @param isAlphanumeric + * the is alphanumeric + * @return the gh autolink builder + */ + public GHAutolinkBuilder withIsAlphanumeric(boolean isAlphanumeric) { + this.isAlphanumeric = isAlphanumeric; + return this; + } + + private String getApiTail() { + return String.format("/repos/%s/%s/autolinks", repo.getOwnerName(), repo.getName()); + } + + /** + * Create gh autolink. + * + * @return the gh autolink + * @throws IOException + * the io exception + */ + public GHAutolink create() throws IOException { + GHAutolink autolink = req.method("POST") + .with("key_prefix", keyPrefix) + .with("url_template", urlTemplate) + .with("is_alphanumeric", isAlphanumeric) + .withHeader("Accept", "application/vnd.github+json") + .withUrlPath(getApiTail()) + .fetch(GHAutolink.class); + + return autolink.lateBind(repo); + } + +} diff --git a/src/main/java/org/kohsuke/github/GHMeta.java b/src/main/java/org/kohsuke/github/GHMeta.java index bfa900f7eb..25cbcb0c3c 100644 --- a/src/main/java/org/kohsuke/github/GHMeta.java +++ b/src/main/java/org/kohsuke/github/GHMeta.java @@ -5,6 +5,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.Map; // TODO: Auto-generated Javadoc /** @@ -12,7 +13,8 @@ * * @author Paulo Miguel Almeida * @see GitHub#getMeta() GitHub#getMeta() - * @see Get Meta + * @see Get + * Meta */ public class GHMeta { @@ -24,6 +26,10 @@ public GHMeta() { @JsonProperty("verifiable_password_authentication") private boolean verifiablePasswordAuthentication; + @JsonProperty("ssh_key_fingerprints") + private Map sshKeyFingerprints; + @JsonProperty("ssh_keys") + private List sshKeys; private List hooks; private List git; private List web; @@ -43,6 +49,24 @@ public boolean isVerifiablePasswordAuthentication() { return verifiablePasswordAuthentication; } + /** + * Gets ssh key fingerprints. + * + * @return the ssh key fingerprints + */ + public Map getSshKeyFingerprints() { + return Collections.unmodifiableMap(sshKeyFingerprints); + } + + /** + * Gets ssh keys. + * + * @return the ssh keys + */ + public List getSshKeys() { + return Collections.unmodifiableList(sshKeys); + } + /** * Gets hooks. * diff --git a/src/main/java/org/kohsuke/github/GHNotificationStream.java b/src/main/java/org/kohsuke/github/GHNotificationStream.java index 7e62d7b6c6..f769907125 100644 --- a/src/main/java/org/kohsuke/github/GHNotificationStream.java +++ b/src/main/java/org/kohsuke/github/GHNotificationStream.java @@ -187,7 +187,9 @@ GHThread fetch() { Thread.sleep(waitTime); } - req.setHeader("If-Modified-Since", lastModified); + if (lastModified != null) { + req.setHeader("If-Modified-Since", lastModified); + } Requester requester = req.withUrlPath(apiUrl); GitHubResponse response = ((GitHubPageContentsIterable) requester diff --git a/src/main/java/org/kohsuke/github/GHRateLimit.java b/src/main/java/org/kohsuke/github/GHRateLimit.java index 84c9345e77..8a1dbb5968 100644 --- a/src/main/java/org/kohsuke/github/GHRateLimit.java +++ b/src/main/java/org/kohsuke/github/GHRateLimit.java @@ -527,7 +527,7 @@ && getRemaining() <= other.getRemaining())) { return this; } else if (!(other instanceof UnknownLimitRecord)) { // If the above is not the case that means other has a later reset - // or the same resent and fewer requests remaining. + // or the same reset and fewer requests remaining. // If the other record is not an unknown record, the other is more recent return other; } else if (this.isExpired() && !other.isExpired()) { diff --git a/src/main/java/org/kohsuke/github/GHRepository.java b/src/main/java/org/kohsuke/github/GHRepository.java index aeb4db5b19..b7229f2a20 100644 --- a/src/main/java/org/kohsuke/github/GHRepository.java +++ b/src/main/java/org/kohsuke/github/GHRepository.java @@ -36,7 +36,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; -import java.io.InterruptedIOException; import java.io.Reader; import java.net.URL; import java.util.AbstractSet; @@ -1601,23 +1600,11 @@ public PagedIterable listForks(final ForkSort sort) { * @return Newly forked repository that belong to you. * @throws IOException * the io exception + * @deprecated Use {@link #createFork()} */ + @Deprecated public GHRepository fork() throws IOException { - root().createRequest().method("POST").withUrlPath(getApiTailUrl("forks")).send(); - - // this API is asynchronous. we need to wait for a bit - for (int i = 0; i < 10; i++) { - GHRepository r = root().getMyself().getRepository(name); - if (r != null) { - return r; - } - try { - Thread.sleep(3000); - } catch (InterruptedException e) { - throw (IOException) new InterruptedIOException().initCause(e); - } - } - throw new IOException(this + " was forked but can't find the new repository"); + return this.createFork().create(); } /** @@ -1646,27 +1633,11 @@ public GHBranchSync sync(String branch) throws IOException { * @return Newly forked repository that belong to you. * @throws IOException * the io exception + * @deprecated Use {@link #createFork()} */ + @Deprecated public GHRepository forkTo(GHOrganization org) throws IOException { - root().createRequest() - .method("POST") - .with("organization", org.getLogin()) - .withUrlPath(getApiTailUrl("forks")) - .send(); - - // this API is asynchronous. we need to wait for a bit - for (int i = 0; i < 10; i++) { - GHRepository r = org.getRepository(name); - if (r != null) { - return r; - } - try { - Thread.sleep(3000); - } catch (InterruptedException e) { - throw (IOException) new InterruptedIOException().initCause(e); - } - } - throw new IOException(this + " was forked into " + org.getLogin() + " but can't find the new repository"); + return this.createFork().organization(org).create(); } /** @@ -3083,7 +3054,25 @@ public List listCodeownersErrors() throws IOException { * the io exception */ public PagedIterable listContributors() throws IOException { - return root().createRequest().withUrlPath(getApiTailUrl("contributors")).toIterable(Contributor[].class, null); + return listContributors(null); + } + + /** + * List contributors paged iterable. + * + * @param includeAnonymous + * whether to include anonymous contributors + * @return the paged iterable + * @throws IOException + * the io exception + * @see + * GitHub API - List Repository Contributors + */ + public PagedIterable listContributors(Boolean includeAnonymous) throws IOException { + return root().createRequest() + .withUrlPath(getApiTailUrl("contributors")) + .with("anon", includeAnonymous) + .toIterable(Contributor[].class, null); } /** @@ -3736,4 +3725,74 @@ protected Setter(@Nonnull GHRepository repository) { requester.method("PATCH").withUrlPath(repository.getApiTailUrl("")); } } + + /** + * Create an autolink gh autolink builder. + * + * @return the gh autolink builder + */ + public GHAutolinkBuilder createAutolink() { + return new GHAutolinkBuilder(this); + } + + /** + * List all autolinks of a repo (admin only). + * (https://docs.github.com/en/rest/repos/autolinks?apiVersion=2022-11-28#get-all-autolinks-of-a-repository) + * + * @return all autolinks in the repo + * @throws IOException + * the io exception + */ + public PagedIterable listAutolinks() throws IOException { + return root().createRequest() + .withHeader("Accept", "application/vnd.github+json") + .withUrlPath(String.format("/repos/%s/%s/autolinks", getOwnerName(), getName())) + .toIterable(GHAutolink[].class, item -> item.lateBind(this)); + } + + /** + * Read an autolink by ID. + * (https://docs.github.com/en/rest/repos/autolinks?apiVersion=2022-11-28#get-an-autolink-reference-of-a-repository) + * + * @param autolinkId + * the autolink id + * @return the autolink + * @throws IOException + * the io exception + */ + public GHAutolink readAutolink(int autolinkId) throws IOException { + return root().createRequest() + .withHeader("Accept", "application/vnd.github+json") + .withUrlPath(String.format("/repos/%s/%s/autolinks/%d", getOwnerName(), getName(), autolinkId)) + .fetch(GHAutolink.class) + .lateBind(this); + } + + /** + * Delete autolink. + * (https://docs.github.com/en/rest/repos/autolinks?apiVersion=2022-11-28#delete-an-autolink-reference-from-a-repository) + * + * @param autolinkId + * the autolink id + * @throws IOException + * the io exception + */ + public void deleteAutolink(int autolinkId) throws IOException { + root().createRequest() + .method("DELETE") + .withHeader("Accept", "application/vnd.github+json") + .withUrlPath(String.format("/repos/%s/%s/autolinks/%d", getOwnerName(), getName(), autolinkId)) + .send(); + } + + /** + * Create fork gh repository fork builder. + * (https://docs.github.com/en/rest/repos/forks?apiVersion=2022-11-28#create-a-fork) + * + * @return the gh repository fork builder + */ + public GHRepositoryForkBuilder createFork() { + return new GHRepositoryForkBuilder(this); + } + } diff --git a/src/main/java/org/kohsuke/github/GHRepositoryForkBuilder.java b/src/main/java/org/kohsuke/github/GHRepositoryForkBuilder.java new file mode 100644 index 0000000000..cb75c0561d --- /dev/null +++ b/src/main/java/org/kohsuke/github/GHRepositoryForkBuilder.java @@ -0,0 +1,144 @@ +package org.kohsuke.github; + +import java.io.IOException; +import java.io.InterruptedIOException; + +/** + * A builder pattern object for creating a fork of a repository. + * + * @see GHRepository#createFork() GHRepository#createFork()GHRepository#createFork() + * @see Repository fork API + */ +public class GHRepositoryForkBuilder { + private final GHRepository repo; + private final Requester req; + private String organization; + private String name; + private Boolean defaultBranchOnly; + + static int FORK_RETRY_INTERVAL = 3000; + + /** + * Instantiates a new Gh repository fork builder. + * + * @param repo + * the repository + */ + GHRepositoryForkBuilder(GHRepository repo) { + this.repo = repo; + this.req = repo.root().createRequest(); + } + + /** + * Sets whether to fork only the default branch. + * + * @param defaultBranchOnly + * the default branch only + * @return the gh repository fork builder + */ + public GHRepositoryForkBuilder defaultBranchOnly(boolean defaultBranchOnly) { + this.defaultBranchOnly = defaultBranchOnly; + return this; + } + + /** + * Specifies the target organization for the fork. + * + * @param organization + * the organization + * @return the gh repository fork builder + */ + public GHRepositoryForkBuilder organization(GHOrganization organization) { + this.organization = organization.getLogin(); + return this; + } + + /** + * Sets a custom name for the forked repository. + * + * @param name + * the desired repository name + * @return the builder + */ + public GHRepositoryForkBuilder name(String name) { + this.name = name; + return this; + } + + /** + * Creates the fork with the specified parameters. + * + * @return the gh repository + * @throws IOException + * the io exception + */ + public GHRepository create() throws IOException { + if (defaultBranchOnly != null) { + req.with("default_branch_only", defaultBranchOnly); + } + if (organization != null) { + req.with("organization", organization); + } + if (name != null) { + req.with("name", name); + } + + req.method("POST").withUrlPath(repo.getApiTailUrl("forks")).send(); + + // this API is asynchronous. we need to wait for a bit + for (int i = 0; i < 10; i++) { + GHRepository r = lookupForkedRepository(); + if (r != null) { + return r; + } + sleep(FORK_RETRY_INTERVAL); + } + throw new IOException(createTimeoutMessage()); + } + + private GHRepository lookupForkedRepository() throws IOException { + String repoName = name != null ? name : repo.getName(); + + if (organization != null) { + return repo.root().getOrganization(organization).getRepository(repoName); + } + return repo.root().getMyself().getRepository(repoName); + } + + /** + * Sleep. + * + * @param millis + * the millis + * @throws IOException + * the io exception + */ + void sleep(int millis) throws IOException { + try { + Thread.sleep(millis); + } catch (InterruptedException e) { + throw (IOException) new InterruptedIOException().initCause(e); + } + } + + /** + * Create timeout message string. + * + * @return the string + */ + String createTimeoutMessage() { + StringBuilder message = new StringBuilder(repo.getFullName()); + message.append(" was forked"); + + if (organization != null) { + message.append(" into ").append(organization); + } + + if (name != null) { + message.append(" with name ").append(name); + } + + message.append(" but can't find the new repository"); + return message.toString(); + } +} diff --git a/src/main/java/org/kohsuke/github/GHWorkflowRun.java b/src/main/java/org/kohsuke/github/GHWorkflowRun.java index 03ee257a6d..2336f11123 100644 --- a/src/main/java/org/kohsuke/github/GHWorkflowRun.java +++ b/src/main/java/org/kohsuke/github/GHWorkflowRun.java @@ -42,6 +42,7 @@ public GHWorkflowRun() { private long runAttempt; private String runStartedAt; + private GHUser triggeringActor; private String htmlUrl; private String jobsUrl; @@ -119,6 +120,16 @@ public Date getRunStartedAt() throws IOException { return GitHubClient.parseDate(runStartedAt); } + /** + * The actor which triggered the run. + * + * @return the triggering actor + */ + @SuppressFBWarnings(value = { "EI_EXPOSE_REP" }, justification = "Expected behavior") + public GHUser getTriggeringActor() { + return triggeringActor; + } + /** * Gets the html url. * diff --git a/src/main/java/org/kohsuke/github/GitHubAbuseLimitHandler.java b/src/main/java/org/kohsuke/github/GitHubAbuseLimitHandler.java index 076f6fcc1a..a495b90cb3 100644 --- a/src/main/java/org/kohsuke/github/GitHubAbuseLimitHandler.java +++ b/src/main/java/org/kohsuke/github/GitHubAbuseLimitHandler.java @@ -4,6 +4,7 @@ import java.io.IOException; import java.net.HttpURLConnection; +import java.time.Duration; import javax.annotation.Nonnull; @@ -18,6 +19,11 @@ */ public abstract class GitHubAbuseLimitHandler extends GitHubConnectorResponseErrorHandler { + /** + * On a wait, even if the response suggests a very short wait, wait for a minimum duration. + */ + private static final int MINIMUM_ABUSE_RETRY_MILLIS = 1000; + /** * Create default GitHubAbuseLimitHandler instance */ @@ -108,4 +114,43 @@ private boolean hasHeader(GitHubConnectorResponse connectorResponse, String head * */ public abstract void onError(@Nonnull GitHubConnectorResponse connectorResponse) throws IOException; + + /** + * Wait until the API abuse "wait time" is passed. + */ + public static final GitHubAbuseLimitHandler WAIT = new GitHubAbuseLimitHandler() { + @Override + public void onError(GitHubConnectorResponse connectorResponse) throws IOException { + sleep(parseWaitTime(connectorResponse)); + } + }; + + /** + * Fail immediately. + */ + public static final GitHubAbuseLimitHandler FAIL = new GitHubAbuseLimitHandler() { + @Override + public void onError(GitHubConnectorResponse connectorResponse) throws IOException { + throw new HttpException("Abuse limit reached", + connectorResponse.statusCode(), + connectorResponse.header("Status"), + connectorResponse.request().url().toString()) + .withResponseHeaderFields(connectorResponse.allHeaders()); + } + }; + + // If "Retry-After" missing, wait for unambiguously over one minute per GitHub guidance + static long DEFAULT_WAIT_MILLIS = Duration.ofSeconds(61).toMillis(); + + /* + * Exposed for testability. Given an http response, find the retry-after header field and parse it as either a + * number or a date (the spec allows both). If no header is found, wait for a reasonably amount of time. + */ + static long parseWaitTime(GitHubConnectorResponse connectorResponse) { + return parseWaitTime(connectorResponse.header("Retry-After"), + connectorResponse.header("Date"), + DEFAULT_WAIT_MILLIS, + MINIMUM_ABUSE_RETRY_MILLIS); + } + } diff --git a/src/main/java/org/kohsuke/github/GitHubConnectorResponseErrorHandler.java b/src/main/java/org/kohsuke/github/GitHubConnectorResponseErrorHandler.java index 0a7f7fa9fb..ebeb139181 100644 --- a/src/main/java/org/kohsuke/github/GitHubConnectorResponseErrorHandler.java +++ b/src/main/java/org/kohsuke/github/GitHubConnectorResponseErrorHandler.java @@ -7,7 +7,12 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; +import java.io.InterruptedIOException; import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.time.temporal.ChronoUnit; import javax.annotation.Nonnull; @@ -111,4 +116,38 @@ private boolean isServiceDown(GitHubConnectorResponse connectorResponse) throws return false; } }; + + static void sleep(long waitMillis) throws IOException { + try { + Thread.sleep(waitMillis); + } catch (InterruptedException ex) { + throw (InterruptedIOException) new InterruptedIOException().initCause(ex); + } + } + + static long parseWaitTime(String waitHeader, String dateHeader, long defaultMillis, long minimumMillis) { + if (waitHeader == null) { + return defaultMillis; + } + + try { + return Math.max(minimumMillis, Duration.ofSeconds(Long.parseLong(waitHeader)).toMillis()); + } catch (NumberFormatException nfe) { + // The wait header could be a number in seconds, or an http-date + // We know it was a date if we got a number format exception :) + + // Try not to use ZonedDateTime.now(), because the local and remote server times may not be in sync + // Instead, we can take advantage of the Date field in the response to see what time the remote server + // thinks it is + String dateField = dateHeader; + ZonedDateTime now; + if (dateField != null) { + now = ZonedDateTime.parse(dateField, DateTimeFormatter.RFC_1123_DATE_TIME); + } else { + now = ZonedDateTime.now(); + } + ZonedDateTime zdt = ZonedDateTime.parse(waitHeader, DateTimeFormatter.RFC_1123_DATE_TIME); + return Math.max(minimumMillis, ChronoUnit.MILLIS.between(now, zdt)); + } + } } diff --git a/src/main/java/org/kohsuke/github/GitHubRateLimitHandler.java b/src/main/java/org/kohsuke/github/GitHubRateLimitHandler.java index 0af46e8e50..654a7744a6 100644 --- a/src/main/java/org/kohsuke/github/GitHubRateLimitHandler.java +++ b/src/main/java/org/kohsuke/github/GitHubRateLimitHandler.java @@ -5,6 +5,9 @@ import java.io.IOException; import java.net.HttpURLConnection; +import java.time.Duration; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; import javax.annotation.Nonnull; @@ -19,6 +22,11 @@ */ public abstract class GitHubRateLimitHandler extends GitHubConnectorResponseErrorHandler { + /** + * On a wait, even if the response suggests a very short wait, wait for a minimum duration. + */ + private static final int MINIMUM_RATE_LIMIT_RETRY_MILLIS = 1000; + /** * Create default GitHubRateLimitHandler instance */ @@ -56,4 +64,56 @@ boolean isError(@NotNull GitHubConnectorResponse connectorResponse) throws IOExc * @see API documentation from GitHub */ public abstract void onError(@Nonnull GitHubConnectorResponse connectorResponse) throws IOException; + + /** + * Wait until the API abuse "wait time" is passed. + */ + public static final GitHubRateLimitHandler WAIT = new GitHubRateLimitHandler() { + @Override + public void onError(GitHubConnectorResponse connectorResponse) throws IOException { + sleep(parseWaitTime(connectorResponse)); + } + }; + + /* + * Exposed for testability. Given an http response, find the rate limit reset header field and parse it. If no + * header is found, wait for a reasonably amount of time. + */ + long parseWaitTime(GitHubConnectorResponse connectorResponse) { + String v = connectorResponse.header("X-RateLimit-Reset"); + if (v == null) + return Duration.ofMinutes(1).toMillis(); // can't tell, return 1 min + + // Don't use ZonedDateTime.now(), because the local and remote server times may not be in sync + // Instead, we can take advantage of the Date field in the response to see what time the remote server + // thinks it is + String dateField = connectorResponse.header("Date"); + ZonedDateTime now; + if (dateField != null) { + now = ZonedDateTime.parse(dateField, DateTimeFormatter.RFC_1123_DATE_TIME); + } else { + now = ZonedDateTime.now(); + } + return Math.max(MINIMUM_RATE_LIMIT_RETRY_MILLIS, (Long.parseLong(v) - now.toInstant().getEpochSecond()) * 1000); + // return parseWaitTime(connectorResponse.header("X-RateLimit-Reset"), + // connectorResponse.header("Date"), + // Duration.ofMinutes(1).toMillis(), + // MINIMUM_RATE_LIMIT_RETRY_MILLIS); + } + + /** + * Fail immediately. + */ + public static final GitHubRateLimitHandler FAIL = new GitHubRateLimitHandler() { + @Override + public void onError(GitHubConnectorResponse connectorResponse) throws IOException { + throw new HttpException("API rate limit reached", + connectorResponse.statusCode(), + connectorResponse.header("Status"), + connectorResponse.request().url().toString()) + .withResponseHeaderFields(connectorResponse.allHeaders()); + + } + }; + } diff --git a/src/main/resources/META-INF/native-image/org.kohsuke/github-api/reflect-config.json b/src/main/resources/META-INF/native-image/org.kohsuke/github-api/reflect-config.json index 4d691214ec..bf579ed21e 100644 --- a/src/main/resources/META-INF/native-image/org.kohsuke/github-api/reflect-config.json +++ b/src/main/resources/META-INF/native-image/org.kohsuke/github-api/reflect-config.json @@ -6284,6 +6284,36 @@ "allPublicClasses": true, "allDeclaredClasses": true }, + { + "name": "org.kohsuke.github.GitHubAbuseLimitHandler$1", + "allPublicFields": true, + "allDeclaredFields": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredConstructors": true, + "allPublicConstructors": true, + "allDeclaredConstructors": true, + "queryAllPublicMethods": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredMethods": true, + "allPublicClasses": true, + "allDeclaredClasses": true + }, + { + "name": "org.kohsuke.github.GitHubAbuseLimitHandler$2", + "allPublicFields": true, + "allDeclaredFields": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredConstructors": true, + "allPublicConstructors": true, + "allDeclaredConstructors": true, + "queryAllPublicMethods": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredMethods": true, + "allPublicClasses": true, + "allDeclaredClasses": true + }, { "name": "org.kohsuke.github.GitHubBuilder", "allPublicFields": true, diff --git a/src/main/resources/META-INF/native-image/org.kohsuke/github-api/serialization-config.json b/src/main/resources/META-INF/native-image/org.kohsuke/github-api/serialization-config.json index 6c7dd370a1..ffe3790ded 100644 --- a/src/main/resources/META-INF/native-image/org.kohsuke/github-api/serialization-config.json +++ b/src/main/resources/META-INF/native-image/org.kohsuke/github-api/serialization-config.json @@ -119,6 +119,9 @@ { "name": "org.kohsuke.github.GHAppInstallationsPage" }, + { + "name": "org.kohsuke.github.GHAppInstallationRequest" + }, { "name": "org.kohsuke.github.GHAppInstallationToken" }, @@ -1256,6 +1259,12 @@ { "name": "org.kohsuke.github.GitHub$AuthorizationRefreshGitHubWrapper" }, + { + "name": "org.kohsuke.github.GitHubAbuseLimitHandler$1" + }, + { + "name": "org.kohsuke.github.GitHubAbuseLimitHandler$2" + }, { "name": "org.kohsuke.github.GitHubBuilder" }, @@ -1340,4 +1349,4 @@ { "name": "org.kohsuke.github.SkipFromToString" } -] \ No newline at end of file +] diff --git a/src/test/java/org/kohsuke/github/AbuseLimitHandlerTest.java b/src/test/java/org/kohsuke/github/AbuseLimitHandlerTest.java index 4eb5aa4630..567c0f3740 100644 --- a/src/test/java/org/kohsuke/github/AbuseLimitHandlerTest.java +++ b/src/test/java/org/kohsuke/github/AbuseLimitHandlerTest.java @@ -444,12 +444,16 @@ public void onError(IOException e, HttpURLConnection uc) throws IOException { checkErrorMessageMatches(uc, "You have exceeded a secondary rate limit. Please wait a few minutes before you try again"); + long startingWaitMillis = AbuseLimitHandler.DEFAULT_WAIT_MILLIS; + + AbuseLimitHandler.DEFAULT_WAIT_MILLIS = 8 * 1000l; long waitTime = parseWaitTime(uc); // The exact value here will depend on when the test is run assertThat(waitTime, Matchers.lessThan(AbuseLimitHandler.DEFAULT_WAIT_MILLIS)); - assertThat(waitTime, Matchers.greaterThan(3 * 1000l)); + // assertThat(waitTime, equalTo(8 * 1000l)); AbuseLimitHandler.WAIT.onError(e, uc); + AbuseLimitHandler.DEFAULT_WAIT_MILLIS = startingWaitMillis; } }).build(); diff --git a/src/test/java/org/kohsuke/github/AppTest.java b/src/test/java/org/kohsuke/github/AppTest.java index b3e7e0fb0a..f6871ecbd6 100755 --- a/src/test/java/org/kohsuke/github/AppTest.java +++ b/src/test/java/org/kohsuke/github/AppTest.java @@ -1741,6 +1741,7 @@ public void notifications() throws Exception { } assertThat(found, is(true)); gitHub.listNotifications().markAsRead(); + gitHub.listNotifications().iterator().next(); } /** diff --git a/src/test/java/org/kohsuke/github/GHAppTest.java b/src/test/java/org/kohsuke/github/GHAppTest.java index 3519e3302d..6a8529eca5 100644 --- a/src/test/java/org/kohsuke/github/GHAppTest.java +++ b/src/test/java/org/kohsuke/github/GHAppTest.java @@ -79,6 +79,28 @@ public void getGitHubApp() throws IOException { assertThrows(RuntimeException.class, () -> app.setPermissions(null)); } + /** + * List installation requests. + * + * @throws IOException + * Signals that an I/O exception has occurred. + */ + @Test + public void listInstallationRequests() throws IOException { + GHApp app = gitHub.getApp(); + List installations = app.listInstallationRequests().toList(); + assertThat(installations.size(), is(1)); + + GHAppInstallationRequest appInstallation = installations.get(0); + assertThat(appInstallation.getId(), is((long) 1037204)); + assertThat(appInstallation.getAccount().getId(), is((long) 195438329)); + assertThat(appInstallation.getAccount().getLogin(), is("approval-test")); + assertThat(appInstallation.getRequester().getId(), is((long) 195437694)); + assertThat(appInstallation.getRequester().getLogin(), is("kaladinstormblessed2")); + assertThat(appInstallation.getCreatedAt(), is(GitHubClient.parseDate("2025-01-17T15:50:51Z"))); + assertThat(appInstallation.getNodeId(), is("MDMwOkludGVncmF0aW9uSW5zdGFsbGF0aW9uUmVxdWVzdDEwMzcyMDQ=")); + } + /** * List installations. * diff --git a/src/test/java/org/kohsuke/github/GHAutolinkTest.java b/src/test/java/org/kohsuke/github/GHAutolinkTest.java new file mode 100644 index 0000000000..8a09e5b22d --- /dev/null +++ b/src/test/java/org/kohsuke/github/GHAutolinkTest.java @@ -0,0 +1,208 @@ +package org.kohsuke.github; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import java.util.List; + +import static org.hamcrest.Matchers.*; + +// TODO: Auto-generated Javadoc +/** + * The type Gh autolink test. + */ +public class GHAutolinkTest extends AbstractGitHubWireMockTest { + + private GHRepository repo; + + /** + * Instantiates a new Gh autolink test. + */ + public GHAutolinkTest() { + } + + /** + * Sets up. + * + * @throws Exception + * the exception + */ + @Before + public void setUp() throws Exception { + repo = gitHub.getRepository("Alaurant/github-api-test"); + if (repo == null) { + throw new IllegalStateException("Failed to initialize repository"); + } + } + + /** + * Test create autolink. + * + * @throws Exception + * the exception + */ + @Test + public void testCreateAutolink() throws Exception { + String keyPrefix = "EXAMPLE-"; + String urlTemplate = "https://example.com/TICKET?q="; + boolean isAlphanumeric = true; + + GHAutolink autolink = repo.createAutolink() + .withKeyPrefix(keyPrefix) + .withUrlTemplate(urlTemplate) + .withIsAlphanumeric(isAlphanumeric) + .create(); + + assertThat(autolink.getId(), notNullValue()); + assertThat(autolink.getKeyPrefix(), equalTo(keyPrefix)); + assertThat(autolink.getUrlTemplate(), equalTo(urlTemplate)); + assertThat(autolink.isAlphanumeric(), equalTo(isAlphanumeric)); + assertThat(autolink.getOwner(), equalTo(repo)); + + autolink.delete(); + + } + + /** + * Test get autolink. + * + * @throws Exception + * the exception + */ + @Test + public void testReadAutolink() throws Exception { + GHAutolink autolink = repo.createAutolink() + .withKeyPrefix("JIRA-") + .withUrlTemplate("https://example.com/test/") + .withIsAlphanumeric(false) + .create(); + + GHAutolink fetched = repo.readAutolink(autolink.getId()); + + assertThat(fetched.getId(), equalTo(autolink.getId())); + assertThat(fetched.getKeyPrefix(), equalTo(autolink.getKeyPrefix())); + assertThat(fetched.getUrlTemplate(), equalTo(autolink.getUrlTemplate())); + assertThat(fetched.isAlphanumeric(), equalTo(autolink.isAlphanumeric())); + assertThat(fetched.getOwner(), equalTo(repo)); + + autolink.delete(); + + } + + /** + * Test get autolinks. + * + * @throws Exception + * the exception + */ + @Test + public void testListAllAutolinks() throws Exception { + assertThat("Initial autolinks list", repo.listAutolinks().toList(), is(empty())); + + GHAutolink autolink1 = repo.createAutolink() + .withKeyPrefix("LIST-") + .withUrlTemplate("https://example.com/list1/") + .withIsAlphanumeric(true) + .create(); + + GHAutolink autolink2 = repo.createAutolink() + .withKeyPrefix("LISTED-") + .withUrlTemplate("https://example.com/list2/") + .withIsAlphanumeric(false) + .create(); + + boolean found1 = false; + boolean found2 = false; + + PagedIterable autolinks = repo.listAutolinks(); + + List autolinkList = autolinks.toList(); + assertThat("Number of autolinks", autolinkList.size(), is(2)); + + for (GHAutolink autolink : autolinkList) { + + if (autolink.getId() == autolink1.getId()) { + found1 = true; + assertThat(autolink.getKeyPrefix(), equalTo(autolink1.getKeyPrefix())); + assertThat(autolink.getUrlTemplate(), equalTo(autolink1.getUrlTemplate())); + assertThat(autolink.isAlphanumeric(), equalTo(autolink1.isAlphanumeric())); + } + if (autolink.getId() == autolink2.getId()) { + found2 = true; + assertThat(autolink.getKeyPrefix(), equalTo(autolink2.getKeyPrefix())); + assertThat(autolink.getUrlTemplate(), equalTo(autolink2.getUrlTemplate())); + assertThat(autolink.isAlphanumeric(), equalTo(autolink2.isAlphanumeric())); + } + } + + assertThat("First autolink", found1, is(true)); + assertThat("Second autolink", found2, is(true)); + + } + + /** + * Test delete autolink. + * + * @throws Exception + * the exception + */ + @Test + public void testDeleteAutolink() throws Exception { + // Delete autolink using the instance method + GHAutolink autolink = repo.createAutolink() + .withKeyPrefix("DELETE-") + .withUrlTemplate("https://example.com/delete/") + .withIsAlphanumeric(true) + .create(); + + autolink.delete(); + + try { + repo.readAutolink(autolink.getId()); + fail("Expected GHFileNotFoundException"); + } catch (GHFileNotFoundException e) { + // Expected + } + + // Delete autolink using repository delete method + autolink = repo.createAutolink() + .withKeyPrefix("DELETED-") + .withUrlTemplate("https://example.com/delete2/") + .withIsAlphanumeric(true) + .create(); + + repo.deleteAutolink(autolink.getId()); + + try { + repo.readAutolink(autolink.getId()); + fail("Expected GHFileNotFoundException"); + } catch (GHFileNotFoundException e) { + // Expected + } + } + + /** + * Cleanup. + * + * @throws Exception + * the exception + */ + @After + public void cleanup() throws Exception { + if (repo != null) { + try { + PagedIterable autolinks = repo.listAutolinks(); + for (GHAutolink autolink : autolinks) { + try { + autolink.delete(); + } catch (Exception e) { + System.err.println("Failed to delete autolink: " + e.getMessage()); + } + } + } catch (Exception e) { + System.err.println("Cleanup failed: " + e.getMessage()); + } + } + } +} diff --git a/src/test/java/org/kohsuke/github/GHRepositoryForkBuilderTest.java b/src/test/java/org/kohsuke/github/GHRepositoryForkBuilderTest.java new file mode 100644 index 0000000000..2ed56583f5 --- /dev/null +++ b/src/test/java/org/kohsuke/github/GHRepositoryForkBuilderTest.java @@ -0,0 +1,280 @@ +package org.kohsuke.github; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import java.io.IOException; +import java.io.InterruptedIOException; +import java.time.Duration; +import java.util.Map; + +import static org.awaitility.Awaitility.await; +import static org.hamcrest.Matchers.*; + +// TODO: Auto-generated Javadoc + +/** + * The Class GHRepositoryForkBuilderTest. + */ +public class GHRepositoryForkBuilderTest extends AbstractGitHubWireMockTest { + private GHRepository repo; + private static final String TARGET_ORG = "nts-api-test-org"; + private int originalInterval; + + /** + * Instantiates a new Gh repository fork builder test. + */ + public GHRepositoryForkBuilderTest() { + } + + /** + * Sets up. + * + * @throws Exception + * the exception + */ + @Before + public void setUp() throws Exception { + repo = getTempRepository(); + + originalInterval = GHRepositoryForkBuilder.FORK_RETRY_INTERVAL; + GHRepositoryForkBuilder.FORK_RETRY_INTERVAL = 100; + + if (mockGitHub.isUseProxy()) { + GitHub github = getNonRecordingGitHub(); + GHRepository repo = github.getRepository(this.repo.getFullName()); + String defaultBranch = repo.getDefaultBranch(); + GHRef mainRef = repo.getRef("heads/" + defaultBranch); + String mainSha = mainRef.getObject().getSha(); + + String[] branchNames = { "test-branch1", "test-branch2", "test-branch3" }; + for (String branchName : branchNames) { + repo.createRef("refs/heads/" + branchName, mainSha); + } + } + } + + /** + * Tear down. + */ + @After + public void tearDown() { + GHRepositoryForkBuilder.FORK_RETRY_INTERVAL = originalInterval; + } + + /** + * The type Test fork builder. + */ + class TestForkBuilder extends GHRepositoryForkBuilder { + /** + * The Sleep count. + */ + int sleepCount = 0; + /** + * The Last sleep millis. + */ + int lastSleepMillis = 0; + + /** + * Instantiates a new Test fork builder. + * + * @param repo + * the repo + */ + TestForkBuilder(GHRepository repo) { + super(repo); + } + + @Override + void sleep(int millis) throws IOException { + sleepCount++; + lastSleepMillis = millis; + try { + if (mockGitHub.isUseProxy()) { + Thread.sleep(millis); + } else { + Thread.sleep(1); + } + } catch (InterruptedException e) { + throw (IOException) new InterruptedIOException().initCause(e); + } + } + } + + private TestForkBuilder createBuilder() { + return new TestForkBuilder(repo); + } + + private void verifyBasicForkProperties(GHRepository original, GHRepository forked, String expectedName) + throws IOException { + GHRepository updatedFork = forked; + + await().atMost(Duration.ofSeconds(30)) + .pollInterval(Duration.ofSeconds(3)) + .until(() -> gitHub.getRepository(forked.getFullName()).isFork()); + + assertThat(updatedFork, notNullValue()); + assertThat(updatedFork.getName(), equalTo(expectedName)); + assertThat(updatedFork.isFork(), is(true)); + assertThat(updatedFork.getParent().getFullName(), equalTo(original.getFullName())); + } + + private void verifyBranches(GHRepository forked, boolean defaultBranchOnly) throws IOException { + Map branches = forked.getBranches(); + if (defaultBranchOnly) { + assertThat(branches.size(), equalTo(1)); + } else { + assertThat(branches.size(), greaterThan(1)); + } + assertThat(branches.containsKey(forked.getDefaultBranch()), is(true)); + } + + /** + * Test fork. + * + * @throws Exception + * the exception + */ + @Test + public void testFork() throws Exception { + // cover the deprecated fork() method + GHRepository forkedRepo = repo.fork(); + + verifyBasicForkProperties(repo, forkedRepo, repo.getName()); + verifyBranches(forkedRepo, false); + + forkedRepo.delete(); + } + + /** + * Test fork to org. + * + * @throws Exception + * the exception + */ + @Test + public void testForkToOrg() throws Exception { + GHOrganization targetOrg = gitHub.getOrganization(TARGET_ORG); + // equivalent to the deprecated forkTo() method + TestForkBuilder builder = createBuilder(); + GHRepository forkedRepo = builder.organization(targetOrg).create(); + + verifyBasicForkProperties(repo, forkedRepo, repo.getName()); + verifyBranches(forkedRepo, false); + + forkedRepo.delete(); + } + + /** + * Test fork default branch only. + * + * @throws Exception + * the exception + */ + @Test + public void testForkDefaultBranchOnly() throws Exception { + TestForkBuilder builder = createBuilder(); + GHRepository forkedRepo = builder.defaultBranchOnly(true).create(); + + verifyBasicForkProperties(repo, forkedRepo, repo.getName()); + verifyBranches(forkedRepo, true); + + forkedRepo.delete(); + } + + /** + * Test fork changed name. + * + * @throws Exception + * the exception + */ + @Test + public void testForkChangedName() throws Exception { + String newRepoName = "test-fork-with-new-name"; + TestForkBuilder builder = createBuilder(); + GHRepository forkedRepo = builder.name(newRepoName).create(); + + assertThat(forkedRepo.getName(), equalTo(newRepoName)); + verifyBasicForkProperties(repo, forkedRepo, newRepoName); + verifyBranches(forkedRepo, false); + + forkedRepo.delete(); + } + + /** + * Test timeout message and sleep count. + * + * @throws Exception + * the exception + */ + @Test + public void testTimeoutMessage() throws Exception { + // For re-recording, use line below to create successful fork test copy, then comment it out and modify json + // response to 404 + // repo.createFork().name("test-message").create(); + + String newRepoName = "test-message"; + try { + + TestForkBuilder builder = createBuilder(); + try { + builder.name(newRepoName).create(); + fail("Expected IOException for timeout"); + } catch (IOException e) { + assertThat(builder.sleepCount, equalTo(10)); + assertThat(builder.lastSleepMillis, equalTo(100)); + assertThat(e.getMessage(), + allOf(containsString("was forked"), + containsString("with name " + newRepoName), + containsString("but can't find the new repository"))); + } + } finally { + GHRepositoryForkBuilder.FORK_RETRY_INTERVAL = originalInterval; + } + } + + /** + * Test timeout org message. + * + * @throws Exception + * the exception + */ + @Test + public void testTimeoutOrgMessage() throws Exception { + GHOrganization targetOrg = gitHub.getOrganization(TARGET_ORG); + // For re-recording, use line below to create successful fork test copy, then comment it out and modify json + // response to 404 + // repo.createFork().organization(targetOrg).create(); + try { + repo.createFork().organization(targetOrg).create(); + fail("Expected IOException for timeout"); + } catch (IOException e) { + assertThat(e.getMessage(), + allOf(containsString("was forked"), + containsString("into " + TARGET_ORG), + containsString("but can't find the new repository"))); + } + } + + /** + * Test sleep. + * + * @throws Exception + * the exception + */ + @Test + public void testSleep() throws Exception { + GHRepositoryForkBuilder builder = new GHRepositoryForkBuilder(repo); + Thread.currentThread().interrupt(); + + try { + builder.sleep(100); + fail("Expected InterruptedIOException"); + } catch (InterruptedIOException e) { + assertThat(e, instanceOf(InterruptedIOException.class)); + assertThat(e.getCause(), instanceOf(InterruptedException.class)); + } + } + +} diff --git a/src/test/java/org/kohsuke/github/GHRepositoryTest.java b/src/test/java/org/kohsuke/github/GHRepositoryTest.java index e37a39aee5..d910a6db53 100644 --- a/src/test/java/org/kohsuke/github/GHRepositoryTest.java +++ b/src/test/java/org/kohsuke/github/GHRepositoryTest.java @@ -507,6 +507,31 @@ public void listContributors() throws IOException { assertThat(kohsuke, is(true)); } + /** + * List contributors. + * + * @throws IOException + * Signals that an I/O exception has occurred. + */ + @Test + public void listContributorsAnon() throws IOException { + GHRepository r = gitHub.getOrganization("hub4j").getRepository("github-api"); + int i = 0; + boolean kohsuke = false; + + for (GHRepository.Contributor c : r.listContributors(true)) { + if (c.getType().equals("Anonymous")) { + assertThat(c.getContributions(), is(3)); + kohsuke = true; + } + if (++i > 1) { + break; + } + } + + assertThat(kohsuke, is(true)); + } + /** * Gets the permission. * diff --git a/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java b/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java index d15f506672..b329857e1e 100644 --- a/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java +++ b/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java @@ -117,6 +117,7 @@ public void testManualRunAndBasicInformation() throws IOException { assertThat(workflowRun.getStatus(), equalTo(Status.COMPLETED)); assertThat(workflowRun.getConclusion(), equalTo(Conclusion.SUCCESS)); assertThat(workflowRun.getHeadSha(), notNullValue()); + assertThat(workflowRun.getTriggeringActor(), hasProperty("login", equalTo("octocat"))); } /** diff --git a/src/test/java/org/kohsuke/github/GitHubTest.java b/src/test/java/org/kohsuke/github/GitHubTest.java index 193652f84b..70c31160bb 100644 --- a/src/test/java/org/kohsuke/github/GitHubTest.java +++ b/src/test/java/org/kohsuke/github/GitHubTest.java @@ -283,6 +283,8 @@ public void testListMyAuthorizations() throws IOException { public void getMeta() throws IOException { GHMeta meta = gitHub.getMeta(); assertThat(meta.isVerifiablePasswordAuthentication(), is(true)); + assertThat(meta.getSshKeyFingerprints().size(), equalTo(4)); + assertThat(meta.getSshKeys().size(), equalTo(3)); assertThat(meta.getApi().size(), equalTo(19)); assertThat(meta.getGit().size(), equalTo(36)); assertThat(meta.getHooks().size(), equalTo(4)); diff --git a/src/test/java/org/kohsuke/github/RateLimitHandlerTest.java b/src/test/java/org/kohsuke/github/RateLimitHandlerTest.java index b624409152..e592853e21 100644 --- a/src/test/java/org/kohsuke/github/RateLimitHandlerTest.java +++ b/src/test/java/org/kohsuke/github/RateLimitHandlerTest.java @@ -1,7 +1,9 @@ package org.kohsuke.github; import com.github.tomakehurst.wiremock.core.WireMockConfiguration; +import org.jetbrains.annotations.NotNull; import org.junit.Test; +import org.kohsuke.github.connector.GitHubConnectorResponse; import java.io.IOException; import java.net.HttpURLConnection; @@ -115,16 +117,56 @@ public void testHandler_HttpStatus_Fail() throws Exception { /** * Test handler wait. * - * @throws Exception + * @throws IOException * the exception */ @Test - public void testHandler_Wait() throws Exception { + public void testHandler_Wait() throws IOException { + // Customized response that templates the date to keep things working + snapshotNotAllowed(); + + gitHub = getGitHubBuilder().withEndpoint(mockGitHub.apiServer().baseUrl()) + .withRateLimitHandler(new GitHubRateLimitHandler() { + + @Override + public void onError(@NotNull GitHubConnectorResponse connectorResponse) throws IOException { + long waitTime = GitHubRateLimitHandler.WAIT.parseWaitTime(connectorResponse); + assertThat(waitTime, equalTo(3 * 1000l)); + + GitHubAbuseLimitHandler.WAIT.onError(connectorResponse); + } + }) + .build(); + + gitHub.getMyself(); + assertThat(mockGitHub.getRequestCount(), equalTo(1)); + + getTempRepository(); + assertThat(mockGitHub.getRequestCount(), equalTo(3)); + } + + /** + * Test the wait logic in the case where the "Date" header field is missing from the response. + * + * @throws IOException + * if the code under test throws that exception + */ + @Test + public void testHandler_Wait_Missing_Date_Header() throws IOException { // Customized response that templates the date to keep things working snapshotNotAllowed(); gitHub = getGitHubBuilder().withEndpoint(mockGitHub.apiServer().baseUrl()) - .withRateLimitHandler(RateLimitHandler.WAIT) + .withRateLimitHandler(new GitHubRateLimitHandler() { + + @Override + public void onError(@NotNull GitHubConnectorResponse connectorResponse) throws IOException { + long waitTime = GitHubRateLimitHandler.WAIT.parseWaitTime(connectorResponse); + assertThat(waitTime, equalTo(3 * 1000l)); + + GitHubAbuseLimitHandler.WAIT.onError(connectorResponse); + } + }) .build(); gitHub.getMyself(); diff --git a/src/test/resources/no-reflect-and-serialization-list b/src/test/resources/no-reflect-and-serialization-list index d786dc0cfa..94e21c6130 100644 --- a/src/test/resources/no-reflect-and-serialization-list +++ b/src/test/resources/no-reflect-and-serialization-list @@ -18,6 +18,8 @@ org.kohsuke.github.GitHub org.kohsuke.github.GitHub$DependentAuthorizationProvider org.kohsuke.github.GitHub$LoginLoadingUserAuthorizationProvider org.kohsuke.github.GitHubAbuseLimitHandler +org.kohsuke.github.GitHubAbuseLimitHandler$1 +org.kohsuke.github.GitHubAbuseLimitHandler$2 org.kohsuke.github.GitHubClient org.kohsuke.github.GitHubClient$BodyHandler org.kohsuke.github.GitHubClient$GHApiInfo @@ -91,4 +93,7 @@ org.kohsuke.github.internal.EnumUtils org.kohsuke.github.internal.GitHubConnectorHttpConnectorAdapter org.kohsuke.github.internal.GitHubConnectorHttpConnectorAdapter$HttpURLConnectionGitHubConnectorResponse org.kohsuke.github.internal.Previews -org.kohsuke.github.EnterpriseManagedSupport \ No newline at end of file +org.kohsuke.github.EnterpriseManagedSupport +org.kohsuke.github.GHAutolink +org.kohsuke.github.GHAutolinkBuilder +org.kohsuke.github.GHRepositoryForkBuilder \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AbuseLimitHandlerTest/wiremock/testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header/__files/1-user.json b/src/test/resources/org/kohsuke/github/AbuseLimitHandlerTest/wiremock/testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header/__files/1-user.json new file mode 100644 index 0000000000..467313f149 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/AbuseLimitHandlerTest/wiremock/testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header/__files/1-user.json @@ -0,0 +1,45 @@ +{ + "login": "bitwiseman", + "id": 1958953, + "node_id": "MDQ6VXNlcjE5NTg5NTM=", + "avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/bitwiseman", + "html_url": "https://github.com/bitwiseman", + "followers_url": "https://api.github.com/users/bitwiseman/followers", + "following_url": "https://api.github.com/users/bitwiseman/following{/other_user}", + "gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}", + "starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions", + "organizations_url": "https://api.github.com/users/bitwiseman/orgs", + "repos_url": "https://api.github.com/users/bitwiseman/repos", + "events_url": "https://api.github.com/users/bitwiseman/events{/privacy}", + "received_events_url": "https://api.github.com/users/bitwiseman/received_events", + "type": "User", + "site_admin": false, + "name": "Liam Newman", + "company": "Cloudbees, Inc.", + "blog": "", + "location": "Seattle, WA, USA", + "email": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 181, + "public_gists": 7, + "followers": 146, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-02-06T17:29:39Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AbuseLimitHandlerTest/wiremock/testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header/__files/3-r_h_t_fail.json b/src/test/resources/org/kohsuke/github/AbuseLimitHandlerTest/wiremock/testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header/__files/3-r_h_t_fail.json new file mode 100644 index 0000000000..5733e9a2d9 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/AbuseLimitHandlerTest/wiremock/testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header/__files/3-r_h_t_fail.json @@ -0,0 +1,126 @@ +{ + "id": 238757196, + "node_id": "MDEwOlJlcG9zaXRvcnkyMzg3NTcxOTY=", + "name": "temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After", + "full_name": "hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After", + "description": "A test repository for testing the github-api project: temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After/deployments", + "created_at": "2020-02-06T18:33:39Z", + "updated_at": "2020-02-06T18:33:43Z", + "pushed_at": "2020-02-06T18:33:41Z", + "git_url": "git://github.com/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "push": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "delete_branch_on_merge": false, + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AbuseLimitHandlerTest/wiremock/testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header/mappings/1-user.json b/src/test/resources/org/kohsuke/github/AbuseLimitHandlerTest/wiremock/testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header/mappings/1-user.json new file mode 100644 index 0000000000..34eb3c32ce --- /dev/null +++ b/src/test/resources/org/kohsuke/github/AbuseLimitHandlerTest/wiremock/testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header/mappings/1-user.json @@ -0,0 +1,47 @@ +{ + "id": "a60baf84-5b5c-4f86-af3d-cab0d609c7b2", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4930", + "X-RateLimit-Reset": "{{now offset='3 seconds' format='unix'}}", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"1cb30f031c67c499473b3aad01c7f7a5\"", + "Last-Modified": "Thu, 06 Feb 2020 17:29:39 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "CC37:2605:3F884:4E941:5E3C5BFC" + } + }, + "uuid": "a60baf84-5b5c-4f86-af3d-cab0d609c7b2", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AbuseLimitHandlerTest/wiremock/testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header/mappings/2-r_h_t_fail.json b/src/test/resources/org/kohsuke/github/AbuseLimitHandlerTest/wiremock/testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header/mappings/2-r_h_t_fail.json new file mode 100644 index 0000000000..786e939541 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/AbuseLimitHandlerTest/wiremock/testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header/mappings/2-r_h_t_fail.json @@ -0,0 +1,48 @@ +{ + "id": "79fb1092-8bf3-4274-bc8e-ca126c9d9261", + "name": "repos_hub4j-test-org_temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header", + "request": { + "url": "/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 429, + "body": "{\"message\":\"You have exceeded a secondary rate limit. Please wait a few minutes before you try again\"}", + "headers": { + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "429 Too Many Requests", + "Retry-After": "{{now offset='8 seconds' timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"7ff3c96399f7ddf6129622d675ca9935\"", + "Last-Modified": "Thu, 06 Feb 2020 18:33:37 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, gh-limited-by, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "CC37:2605:3F982:4E949:5E3C5BFC" + } + }, + "uuid": "79fb1092-8bf3-4274-bc8e-ca126c9d9261", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-temp-testHandler_Wait_Secondary_Limits2", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-hub4j-test-org-temp-testHandler_Wait_Secondary_Limits2-2", + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AbuseLimitHandlerTest/wiremock/testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header/mappings/3-r_h_t_fail.json b/src/test/resources/org/kohsuke/github/AbuseLimitHandlerTest/wiremock/testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header/mappings/3-r_h_t_fail.json new file mode 100644 index 0000000000..68d215ca2a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/AbuseLimitHandlerTest/wiremock/testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header/mappings/3-r_h_t_fail.json @@ -0,0 +1,50 @@ +{ + "id": "574da117-6845-46d8-b2c1-4415546ca670", + "name": "repos_hub4j-test-org_temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header", + "request": { + "url": "/repos/hub4j-test-org/temp-testHandler_Wait_Secondary_Limits_Too_Many_Requests_Date_Retry_After_Missing_Date_Header", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "3-r_h_t_fail.json", + "headers": { + "Date": "{{now timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4922", + "X-RateLimit-Reset": "{{testStartDate offset='3 seconds' format='unix'}}", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"858224998ac7d1fd6dcd43f73d375297\"", + "Last-Modified": "Thu, 06 Feb 2020 18:33:43 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, gh-limited-by, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "CC37:2605:3FADC:4EA8C:5E3C5C02" + } + }, + "uuid": "574da117-6845-46d8-b2c1-4415546ca670", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-temp-testHandler_Wait_Secondary_Limits2", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-temp-testHandler_Wait_Secondary_Limits2-2", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/notifications/__files/27-notifications.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/notifications/__files/27-notifications.json new file mode 100644 index 0000000000..9527e46df8 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/notifications/__files/27-notifications.json @@ -0,0 +1,5 @@ +{ + "message": "Unable to parse If-Modified-Since request header. Please make sure value is in an acceptable format.", + "documentation_url": "https://docs.github.com/rest/activity/notifications#list-notifications-for-the-authenticated-user", + "status": "422" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/notifications/mappings/26-notifications.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/notifications/mappings/26-notifications.json index 5a7378d124..a120a83569 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/notifications/mappings/26-notifications.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/notifications/mappings/26-notifications.json @@ -40,8 +40,7 @@ "X-XSS-Protection": "1; mode=block", "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "CB13:833E:A1F759:BFE352:5DB3A151", - "Link": "; rel=\"next\", ; rel=\"last\"" + "X-GitHub-Request-Id": "CB13:833E:A1F759:BFE352:5DB3A151" } }, "uuid": "ac22e3e2-f0d3-4ff1-af23-23e9c79c725c", diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/notifications/mappings/27-notifications.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/notifications/mappings/27-notifications.json new file mode 100644 index 0000000000..f6c602f01a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/notifications/mappings/27-notifications.json @@ -0,0 +1,47 @@ +{ + "id": "ac22e3e2-f0d3-4ff1-af23-23e9c7915874", + "name": "notifications", + "request": { + "url": "/notifications", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + }, + "If-Modified-Since":{ + "equalTo": "null" + } + } + }, + "response": { + "status": 422, + "bodyFileName": "27-notifications.json", + "headers": { + "Date": "Wed, 20 Nov 2024 13:55:23 GMT", + "Content-Type": "application/json; charset=utf-8", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "notifications, repo", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4992", + "X-RateLimit-Reset": "1732111985", + "X-RateLimit-Used": "8", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "052F:2E353B:3FE0C:42EBB:673DEA4B" + } + }, + "uuid": "ac22e3e2-f0d3-4ff1-af23-23e9c7915874", + "persistent": true, + "insertionIndex": 26 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAppTest/wiremock/listInstallationRequests/__files/1-app.json b/src/test/resources/org/kohsuke/github/GHAppTest/wiremock/listInstallationRequests/__files/1-app.json new file mode 100644 index 0000000000..6eddba3601 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAppTest/wiremock/listInstallationRequests/__files/1-app.json @@ -0,0 +1,42 @@ +{ + "id": 986532, + "client_id": "Iv23liTxF5NAu46u9qto", + "slug": "anuj-github-app", + "node_id": "A_kwDOB7K2ac4ADw2k", + "owner": { + "login": "kaladinstormblessed", + "id": 129152617, + "node_id": "U_kgDOB7K2aQ", + "avatar_url": "https://avatars.githubusercontent.com/u/129152617?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/kaladinstormblessed", + "html_url": "https://github.com/kaladinstormblessed", + "followers_url": "https://api.github.com/users/kaladinstormblessed/followers", + "following_url": "https://api.github.com/users/kaladinstormblessed/following{/other_user}", + "gists_url": "https://api.github.com/users/kaladinstormblessed/gists{/gist_id}", + "starred_url": "https://api.github.com/users/kaladinstormblessed/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/kaladinstormblessed/subscriptions", + "organizations_url": "https://api.github.com/users/kaladinstormblessed/orgs", + "repos_url": "https://api.github.com/users/kaladinstormblessed/repos", + "events_url": "https://api.github.com/users/kaladinstormblessed/events{/privacy}", + "received_events_url": "https://api.github.com/users/kaladinstormblessed/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "name": "anuj-github-app", + "description": "", + "external_url": "https://cloud.cloud", + "html_url": "https://github.com/apps/anuj-github-app", + "created_at": "2024-09-03T07:14:38Z", + "updated_at": "2025-01-17T10:52:47Z", + "permissions": { + "administration": "write", + "contents": "write", + "members": "read", + "metadata": "read", + "pull_requests": "read" + }, + "events": [], + "installations_count": 6 +} diff --git a/src/test/resources/org/kohsuke/github/GHAppTest/wiremock/listInstallationRequests/__files/2-app_installation-requests.json b/src/test/resources/org/kohsuke/github/GHAppTest/wiremock/listInstallationRequests/__files/2-app_installation-requests.json new file mode 100644 index 0000000000..46c2ad4c16 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAppTest/wiremock/listInstallationRequests/__files/2-app_installation-requests.json @@ -0,0 +1,49 @@ +[ + { + "id": 1037204, + "node_id": "MDMwOkludGVncmF0aW9uSW5zdGFsbGF0aW9uUmVxdWVzdDEwMzcyMDQ=", + "account": { + "login": "approval-test", + "id": 195438329, + "node_id": "O_kgDOC6Ym-Q", + "avatar_url": "https://avatars.githubusercontent.com/u/195438329?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/approval-test", + "html_url": "https://github.com/approval-test", + "followers_url": "https://api.github.com/users/approval-test/followers", + "following_url": "https://api.github.com/users/approval-test/following{/other_user}", + "gists_url": "https://api.github.com/users/approval-test/gists{/gist_id}", + "starred_url": "https://api.github.com/users/approval-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/approval-test/subscriptions", + "organizations_url": "https://api.github.com/users/approval-test/orgs", + "repos_url": "https://api.github.com/users/approval-test/repos", + "events_url": "https://api.github.com/users/approval-test/events{/privacy}", + "received_events_url": "https://api.github.com/users/approval-test/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "requester": { + "login": "kaladinstormblessed2", + "id": 195437694, + "node_id": "U_kgDOC6Ykfg", + "avatar_url": "https://avatars.githubusercontent.com/u/195437694?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/kaladinstormblessed2", + "html_url": "https://github.com/kaladinstormblessed2", + "followers_url": "https://api.github.com/users/kaladinstormblessed2/followers", + "following_url": "https://api.github.com/users/kaladinstormblessed2/following{/other_user}", + "gists_url": "https://api.github.com/users/kaladinstormblessed2/gists{/gist_id}", + "starred_url": "https://api.github.com/users/kaladinstormblessed2/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/kaladinstormblessed2/subscriptions", + "organizations_url": "https://api.github.com/users/kaladinstormblessed2/orgs", + "repos_url": "https://api.github.com/users/kaladinstormblessed2/repos", + "events_url": "https://api.github.com/users/kaladinstormblessed2/events{/privacy}", + "received_events_url": "https://api.github.com/users/kaladinstormblessed2/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "created_at": "2025-01-17T15:50:51Z" + } +] diff --git a/src/test/resources/org/kohsuke/github/GHAppTest/wiremock/listInstallationRequests/mappings/1-app.json b/src/test/resources/org/kohsuke/github/GHAppTest/wiremock/listInstallationRequests/mappings/1-app.json new file mode 100644 index 0000000000..24036fcca0 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAppTest/wiremock/listInstallationRequests/mappings/1-app.json @@ -0,0 +1,39 @@ +{ + "id": "7dd11376-7827-4472-9b35-d129d432687e", + "name": "app", + "request": { + "url": "/app", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-app.json", + "headers": { + "Date": "Fri, 17 Jan 2025 17:53:40 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "public, max-age=60, s-maxage=60", + "Vary": "Accept,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"2ae03ff428b2f6f2651437f7bbb52bcc5aa4fd43ec20540006591c05a6c4de48\"", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "C286:10C02C:61556D:734A43:678A9923" + } + }, + "uuid": "7dd11376-7827-4472-9b35-d129d432687e", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAppTest/wiremock/listInstallationRequests/mappings/2-app_installation-requests.json b/src/test/resources/org/kohsuke/github/GHAppTest/wiremock/listInstallationRequests/mappings/2-app_installation-requests.json new file mode 100644 index 0000000000..51f4a3a9ec --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAppTest/wiremock/listInstallationRequests/mappings/2-app_installation-requests.json @@ -0,0 +1,39 @@ +{ + "id": "2e6e47a0-0341-45c9-87f6-eda0865764d7", + "name": "app_installation-requests", + "request": { + "url": "/app/installation-requests", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "2-app_installation-requests.json", + "headers": { + "Date": "Fri, 17 Jan 2025 17:53:40 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "public, max-age=60, s-maxage=60", + "Vary": "Accept,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"1030c589d5482f2436758d79218af5ab17bd8b28c5b92792fe383357cae28d39\"", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "C287:E5098:509DB7:5CBEB7:678A9924" + } + }, + "uuid": "2e6e47a0-0341-45c9-87f6-eda0865764d7", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/1-user.json new file mode 100644 index 0000000000..0764c5a936 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": null, + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 7, + "public_gists": 0, + "followers": 3, + "following": 8, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-11-27T04:01:41Z", + "private_gists": 0, + "total_private_repos": 3, + "owned_private_repos": 3, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json new file mode 100644 index 0000000000..00da15691e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json @@ -0,0 +1,122 @@ +{ + "id": 895799232, + "node_id": "R_kgDONWTPwA", + "name": "github-api-test", + "full_name": "Alaurant/github-api-test", + "private": true, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/github-api-test", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/Alaurant/github-api-test", + "forks_url": "https://api.github.com/repos/Alaurant/github-api-test/forks", + "keys_url": "https://api.github.com/repos/Alaurant/github-api-test/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/github-api-test/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/github-api-test/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/github-api-test/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/github-api-test/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/github-api-test/events", + "assignees_url": "https://api.github.com/repos/Alaurant/github-api-test/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/github-api-test/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/github-api-test/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/github-api-test/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/github-api-test/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/github-api-test/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/github-api-test/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/github-api-test/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/github-api-test/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/github-api-test/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/github-api-test/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/github-api-test/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/github-api-test/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/github-api-test/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/github-api-test/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/github-api-test/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/github-api-test/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/github-api-test/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/github-api-test/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/github-api-test/merges", + "archive_url": "https://api.github.com/repos/Alaurant/github-api-test/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/github-api-test/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/github-api-test/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/github-api-test/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/github-api-test/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/github-api-test/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/github-api-test/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/github-api-test/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/github-api-test/deployments", + "created_at": "2024-11-28T23:44:54Z", + "updated_at": "2024-11-28T23:44:55Z", + "pushed_at": "2024-11-28T23:44:55Z", + "git_url": "git://github.com/Alaurant/github-api-test.git", + "ssh_url": "git@github.com:Alaurant/github-api-test.git", + "clone_url": "https://github.com/Alaurant/github-api-test.git", + "svn_url": "https://github.com/Alaurant/github-api-test", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 3, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 3, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AJ7BLWEW6YP5EUIYTPGKLMDHJ6O5M", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "network_count": 0, + "subscribers_count": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json new file mode 100644 index 0000000000..dcaa3400f1 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "5efad309-8a6e-4bea-b5d3-f558468cde2f", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:58 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"8bdc3eaf7312491c8eb245323f2eb3004212814ef5f8184104effa4b32f6b27c\"", + "Last-Modified": "Wed, 27 Nov 2024 04:01:41 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4964", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "36", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB4B:259AD1:AD6A0A:CCA3BA:674F9CA9" + } + }, + "uuid": "5efad309-8a6e-4bea-b5d3-f558468cde2f", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json new file mode 100644 index 0000000000..b3799cfac2 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json @@ -0,0 +1,48 @@ +{ + "id": "7b4379d6-4382-4589-a8de-6c179a3b878e", + "name": "repos_alaurant_github-api-test", + "request": { + "url": "/repos/Alaurant/github-api-test", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "2-r_a_github-api-test.json", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:58 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"94ad6f4d71086bda8c2640d1ba979adc705c9465218c4ca1e55dc20011962ee7\"", + "Last-Modified": "Thu, 28 Nov 2024 23:44:55 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4962", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "38", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB4F:261CA8:B9F4DA:D92EA2:674F9CAA" + } + }, + "uuid": "7b4379d6-4382-4589-a8de-6c179a3b878e", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json new file mode 100644 index 0000000000..882605d3e0 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json @@ -0,0 +1,54 @@ +{ + "id": "72c0b399-ca4c-4934-bb37-204fb2eee65c", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"key_prefix\":\"EXAMPLE-\",\"url_template\":\"https://example.com/TICKET?q=\",\"is_alphanumeric\":true}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "body": "{\"id\":6214215,\"key_prefix\":\"EXAMPLE-\",\"url_template\":\"https://example.com/TICKET?q=\",\"is_alphanumeric\":true}", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:59 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "\"5957fc62ce793c3c3f204807841c0322d186ec5693b11e746a2a773ff4814345\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4961", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "39", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB50:25FB34:AFAC50:CEE61E:674F9CAB" + } + }, + "uuid": "72c0b399-ca4c-4934-bb37-204fb2eee65c", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6214215.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6214215.json new file mode 100644 index 0000000000..e3e2b0ee75 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6214215.json @@ -0,0 +1,43 @@ +{ + "id": "e6f3b690-7bba-4fca-af09-bb9c36c226c2", + "name": "repos_alaurant_github-api-test_autolinks_6214215", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6214215", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 204, + "headers": { + "Date": "Wed, 04 Dec 2024 00:05:00 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4960", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "40", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "AB54:25C9E5:B594DE:D4CE98:674F9CAC" + } + }, + "uuid": "e6f3b690-7bba-4fca-af09-bb9c36c226c2", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks.json new file mode 100644 index 0000000000..3205f0a148 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks.json @@ -0,0 +1,47 @@ +{ + "id": "4e99e7cf-51c0-42eb-aac3-11c71370da7d", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "body": "[]", + "headers": { + "Date": "Wed, 04 Dec 2024 00:05:00 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "\"5b744729737bd28d14aeb327919c263d8af99640a7701726d7b2320a638b5c76\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4959", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "41", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB58:2616CE:B40D89:D3475B:674F9CAC" + } + }, + "uuid": "4e99e7cf-51c0-42eb-aac3-11c71370da7d", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/1-user.json new file mode 100644 index 0000000000..0764c5a936 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": null, + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 7, + "public_gists": 0, + "followers": 3, + "following": 8, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-11-27T04:01:41Z", + "private_gists": 0, + "total_private_repos": 3, + "owned_private_repos": 3, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json new file mode 100644 index 0000000000..f105aebb35 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json @@ -0,0 +1,122 @@ +{ + "id": 895799232, + "node_id": "R_kgDONWTPwA", + "name": "github-api-test", + "full_name": "Alaurant/github-api-test", + "private": true, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/github-api-test", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/Alaurant/github-api-test", + "forks_url": "https://api.github.com/repos/Alaurant/github-api-test/forks", + "keys_url": "https://api.github.com/repos/Alaurant/github-api-test/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/github-api-test/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/github-api-test/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/github-api-test/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/github-api-test/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/github-api-test/events", + "assignees_url": "https://api.github.com/repos/Alaurant/github-api-test/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/github-api-test/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/github-api-test/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/github-api-test/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/github-api-test/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/github-api-test/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/github-api-test/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/github-api-test/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/github-api-test/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/github-api-test/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/github-api-test/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/github-api-test/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/github-api-test/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/github-api-test/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/github-api-test/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/github-api-test/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/github-api-test/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/github-api-test/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/github-api-test/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/github-api-test/merges", + "archive_url": "https://api.github.com/repos/Alaurant/github-api-test/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/github-api-test/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/github-api-test/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/github-api-test/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/github-api-test/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/github-api-test/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/github-api-test/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/github-api-test/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/github-api-test/deployments", + "created_at": "2024-11-28T23:44:54Z", + "updated_at": "2024-11-28T23:44:55Z", + "pushed_at": "2024-11-28T23:44:55Z", + "git_url": "git://github.com/Alaurant/github-api-test.git", + "ssh_url": "git@github.com:Alaurant/github-api-test.git", + "clone_url": "https://github.com/Alaurant/github-api-test.git", + "svn_url": "https://github.com/Alaurant/github-api-test", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 3, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 3, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AJ7BLWHAAPA4X3QOA36CYTLHJ6O4S", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "network_count": 0, + "subscribers_count": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json new file mode 100644 index 0000000000..c37d3842de --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "cb401d70-c07b-4a80-9333-fd2598ce4873", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:44 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"8bdc3eaf7312491c8eb245323f2eb3004212814ef5f8184104effa4b32f6b27c\"", + "Last-Modified": "Wed, 27 Nov 2024 04:01:41 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4991", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "9", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AAFC:32381D:19A4CC:1E52E3:674F9C9C" + } + }, + "uuid": "cb401d70-c07b-4a80-9333-fd2598ce4873", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json new file mode 100644 index 0000000000..c9bb698e1c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json @@ -0,0 +1,48 @@ +{ + "id": "b4bf2f34-49d5-4aae-9962-b72cc46196c9", + "name": "repos_alaurant_github-api-test", + "request": { + "url": "/repos/Alaurant/github-api-test", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "2-r_a_github-api-test.json", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:45 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"94ad6f4d71086bda8c2640d1ba979adc705c9465218c4ca1e55dc20011962ee7\"", + "Last-Modified": "Thu, 28 Nov 2024 23:44:55 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4989", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "11", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB01:275BE1:A9865C:C65840:674F9C9D" + } + }, + "uuid": "b4bf2f34-49d5-4aae-9962-b72cc46196c9", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json new file mode 100644 index 0000000000..d09a8054a3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json @@ -0,0 +1,54 @@ +{ + "id": "9a5172dd-9af1-4543-9140-8ca5aeaa4aaa", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"key_prefix\":\"DELETE-\",\"url_template\":\"https://example.com/delete/\",\"is_alphanumeric\":true}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "body": "{\"id\":6214199,\"key_prefix\":\"DELETE-\",\"url_template\":\"https://example.com/delete/\",\"is_alphanumeric\":true}", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:45 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "\"a956fdb6994525df51a1d05464cca2bbfcfddd6b16580a60ebed7bee5c481b1c\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4988", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "12", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB05:25FB34:AFA666:CEDF6C:674F9C9D" + } + }, + "uuid": "9a5172dd-9af1-4543-9140-8ca5aeaa4aaa", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6214199.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6214199.json new file mode 100644 index 0000000000..6a7c9a740c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6214199.json @@ -0,0 +1,43 @@ +{ + "id": "cb5eb0d7-aa5f-4dec-8e47-8443c7b5eb2b", + "name": "repos_alaurant_github-api-test_autolinks_6214199", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6214199", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 204, + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:46 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4987", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "13", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "AB06:25DAE6:BD28AF:DC61D9:674F9C9E" + } + }, + "uuid": "cb5eb0d7-aa5f-4dec-8e47-8443c7b5eb2b", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6214199.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6214199.json new file mode 100644 index 0000000000..5f8cdf41c6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6214199.json @@ -0,0 +1,45 @@ +{ + "id": "bf5f8e71-e7c3-4fd9-a76e-8dcda49d68f0", + "name": "repos_alaurant_github-api-test_autolinks_6214199", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6214199", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 404, + "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/rest/repos/autolinks#get-an-autolink-reference-of-a-repository\",\"status\":\"404\"}", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:46 GMT", + "Content-Type": "application/json; charset=utf-8", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4986", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "14", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "AB07:25A8FF:B72F38:D66845:674F9C9E" + } + }, + "uuid": "bf5f8e71-e7c3-4fd9-a76e-8dcda49d68f0", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json new file mode 100644 index 0000000000..a11816818d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json @@ -0,0 +1,54 @@ +{ + "id": "c5607014-5b7d-4cf5-9970-c1c5751cdf9c", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"key_prefix\":\"DELETED-\",\"url_template\":\"https://example.com/delete2/\",\"is_alphanumeric\":true}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "body": "{\"id\":6214204,\"key_prefix\":\"DELETED-\",\"url_template\":\"https://example.com/delete2/\",\"is_alphanumeric\":true}", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:47 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "\"b344c6f9525e0a7606c9736c32b24c4bb94a746a58a0918a467d874462159497\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4985", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "15", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB0B:2377CB:ADCDF0:CBC78F:674F9C9F" + } + }, + "uuid": "c5607014-5b7d-4cf5-9970-c1c5751cdf9c", + "persistent": true, + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6214204.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6214204.json new file mode 100644 index 0000000000..5e7e325c90 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6214204.json @@ -0,0 +1,43 @@ +{ + "id": "82bde32d-073f-4740-9cca-06e6ad4ca563", + "name": "repos_alaurant_github-api-test_autolinks_6214204", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6214204", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 204, + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:47 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4984", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "16", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "AB0C:321638:1E70D8:241378:674F9C9F" + } + }, + "uuid": "82bde32d-073f-4740-9cca-06e6ad4ca563", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6214204.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6214204.json new file mode 100644 index 0000000000..d8e8b74f51 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6214204.json @@ -0,0 +1,45 @@ +{ + "id": "f41b31b6-2e5d-48f9-881b-0f96caab4c70", + "name": "repos_alaurant_github-api-test_autolinks_6214204", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6214204", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 404, + "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/rest/repos/autolinks#get-an-autolink-reference-of-a-repository\",\"status\":\"404\"}", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:48 GMT", + "Content-Type": "application/json; charset=utf-8", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4983", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "17", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "AB10:275BE1:A987C7:C659CB:674F9CA0" + } + }, + "uuid": "f41b31b6-2e5d-48f9-881b-0f96caab4c70", + "persistent": true, + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json new file mode 100644 index 0000000000..84c8a5d76a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json @@ -0,0 +1,47 @@ +{ + "id": "dd326434-5694-4484-80e4-d2a63d84daf0", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "body": "[]", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:49 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "\"5b744729737bd28d14aeb327919c263d8af99640a7701726d7b2320a638b5c76\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4982", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "18", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB11:25E009:B3D920:D3125C:674F9CA0" + } + }, + "uuid": "dd326434-5694-4484-80e4-d2a63d84daf0", + "persistent": true, + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/1-user.json new file mode 100644 index 0000000000..0764c5a936 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": null, + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 7, + "public_gists": 0, + "followers": 3, + "following": 8, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-11-27T04:01:41Z", + "private_gists": 0, + "total_private_repos": 3, + "owned_private_repos": 3, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/2-r_a_github-api-test.json new file mode 100644 index 0000000000..aea5d9d6e3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/2-r_a_github-api-test.json @@ -0,0 +1,122 @@ +{ + "id": 895799232, + "node_id": "R_kgDONWTPwA", + "name": "github-api-test", + "full_name": "Alaurant/github-api-test", + "private": true, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/github-api-test", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/Alaurant/github-api-test", + "forks_url": "https://api.github.com/repos/Alaurant/github-api-test/forks", + "keys_url": "https://api.github.com/repos/Alaurant/github-api-test/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/github-api-test/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/github-api-test/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/github-api-test/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/github-api-test/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/github-api-test/events", + "assignees_url": "https://api.github.com/repos/Alaurant/github-api-test/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/github-api-test/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/github-api-test/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/github-api-test/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/github-api-test/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/github-api-test/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/github-api-test/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/github-api-test/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/github-api-test/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/github-api-test/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/github-api-test/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/github-api-test/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/github-api-test/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/github-api-test/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/github-api-test/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/github-api-test/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/github-api-test/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/github-api-test/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/github-api-test/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/github-api-test/merges", + "archive_url": "https://api.github.com/repos/Alaurant/github-api-test/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/github-api-test/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/github-api-test/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/github-api-test/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/github-api-test/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/github-api-test/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/github-api-test/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/github-api-test/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/github-api-test/deployments", + "created_at": "2024-11-28T23:44:54Z", + "updated_at": "2024-11-28T23:44:55Z", + "pushed_at": "2024-11-28T23:44:55Z", + "git_url": "git://github.com/Alaurant/github-api-test.git", + "ssh_url": "git@github.com:Alaurant/github-api-test.git", + "clone_url": "https://github.com/Alaurant/github-api-test.git", + "svn_url": "https://github.com/Alaurant/github-api-test", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 3, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 3, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AJ7BLWDDUCRCEJ6FDF6I2MDHJ6O44", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "network_count": 0, + "subscribers_count": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/1-user.json new file mode 100644 index 0000000000..27b9001e4c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "e37bea15-a992-490d-abd4-9b62de05c88e", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:49 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"8bdc3eaf7312491c8eb245323f2eb3004212814ef5f8184104effa4b32f6b27c\"", + "Last-Modified": "Wed, 27 Nov 2024 04:01:41 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4981", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "19", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB1C:2616CE:B40940:D3426D:674F9CA1" + } + }, + "uuid": "e37bea15-a992-490d-abd4-9b62de05c88e", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/2-r_a_github-api-test.json new file mode 100644 index 0000000000..71b82fd4e4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/2-r_a_github-api-test.json @@ -0,0 +1,48 @@ +{ + "id": "6e30ba43-5316-46d1-9b80-53c527a53846", + "name": "repos_alaurant_github-api-test", + "request": { + "url": "/repos/Alaurant/github-api-test", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "2-r_a_github-api-test.json", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:50 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"94ad6f4d71086bda8c2640d1ba979adc705c9465218c4ca1e55dc20011962ee7\"", + "Last-Modified": "Thu, 28 Nov 2024 23:44:55 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4979", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "21", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB1D:32381D:19A7EC:1E5668:674F9CA2" + } + }, + "uuid": "6e30ba43-5316-46d1-9b80-53c527a53846", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/3-r_a_g_autolinks.json new file mode 100644 index 0000000000..20ae14a08b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/3-r_a_g_autolinks.json @@ -0,0 +1,50 @@ +{ + "id": "bf0df31e-be26-4067-9a91-8f4c1e918c1c", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "body": "[]", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:51 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "\"5b744729737bd28d14aeb327919c263d8af99640a7701726d7b2320a638b5c76\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4978", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "22", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB21:253D9C:B16E05:D0A746:674F9CA3" + } + }, + "uuid": "bf0df31e-be26-4067-9a91-8f4c1e918c1c", + "persistent": true, + "scenarioName": "scenario-1-repos-Alaurant-github-api-test-autolinks", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-Alaurant-github-api-test-autolinks-2", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/4-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/4-r_a_g_autolinks.json new file mode 100644 index 0000000000..c5bda9edcc --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/4-r_a_g_autolinks.json @@ -0,0 +1,54 @@ +{ + "id": "1c15b670-f893-4111-8f40-7e6843b3f3de", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "body": "{\"id\":6214208,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true}", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:51 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "\"c9b6db3f807e7bc4bb09f6a2cff12454fad030e7b1bf5c73df256d1203c86438\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4977", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "23", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB22:261CA8:B9F17C:D92AD4:674F9CA3" + } + }, + "uuid": "1c15b670-f893-4111-8f40-7e6843b3f3de", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/5-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/5-r_a_g_autolinks.json new file mode 100644 index 0000000000..0cc310c4be --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/5-r_a_g_autolinks.json @@ -0,0 +1,54 @@ +{ + "id": "7b65f4bc-bc7a-4fd9-92dd-9b0685cc61cd", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "body": "{\"id\":6214209,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:52 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "\"afdd2654330781c9949511c99bff15109b2730f99b857072c555012912bbcd8b\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4976", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "24", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB26:25CB59:B00C2A:CF4583:674F9CA3" + } + }, + "uuid": "7b65f4bc-bc7a-4fd9-92dd-9b0685cc61cd", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/6-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/6-r_a_g_autolinks.json new file mode 100644 index 0000000000..f122ac898e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/6-r_a_g_autolinks.json @@ -0,0 +1,50 @@ +{ + "id": "6b46543e-8784-4c36-970a-ed779fd6899b", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "body": "[{\"id\":6214208,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true},{\"id\":6214209,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}]", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:52 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"fe94434b76cb272acea19e422afda92332aae93faf10354bc617a3360716a141\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4975", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "25", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AA38:2616CE:B40A4C:D3439E:674F9CA4" + } + }, + "uuid": "6b46543e-8784-4c36-970a-ed779fd6899b", + "persistent": true, + "scenarioName": "scenario-1-repos-Alaurant-github-api-test-autolinks", + "requiredScenarioState": "scenario-1-repos-Alaurant-github-api-test-autolinks-2", + "newScenarioState": "scenario-1-repos-Alaurant-github-api-test-autolinks-3", + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/7-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/7-r_a_g_autolinks.json new file mode 100644 index 0000000000..42ce6b3388 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/7-r_a_g_autolinks.json @@ -0,0 +1,49 @@ +{ + "id": "e1029d4b-a07c-4f57-a043-97e49164bf5a", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "body": "[{\"id\":6214208,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true},{\"id\":6214209,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}]", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:53 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"fe94434b76cb272acea19e422afda92332aae93faf10354bc617a3360716a141\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4974", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "26", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB28:271404:A4AC9F:C177E4:674F9CA4" + } + }, + "uuid": "e1029d4b-a07c-4f57-a043-97e49164bf5a", + "persistent": true, + "scenarioName": "scenario-1-repos-Alaurant-github-api-test-autolinks", + "requiredScenarioState": "scenario-1-repos-Alaurant-github-api-test-autolinks-3", + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6214208.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6214208.json new file mode 100644 index 0000000000..524bb8a8dc --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6214208.json @@ -0,0 +1,43 @@ +{ + "id": "affffb27-b98a-4457-9ea5-3c7c952d9bfb", + "name": "repos_alaurant_github-api-test_autolinks_6214208", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6214208", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 204, + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:53 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4973", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "27", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "AB2C:32381D:19A924:1E57CD:674F9CA5" + } + }, + "uuid": "affffb27-b98a-4457-9ea5-3c7c952d9bfb", + "persistent": true, + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6214209.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6214209.json new file mode 100644 index 0000000000..b5cf4ec9de --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6214209.json @@ -0,0 +1,43 @@ +{ + "id": "b4141f4b-4ca3-4a1c-b507-08a861c87340", + "name": "repos_alaurant_github-api-test_autolinks_6214209", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6214209", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 204, + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:53 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4972", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "28", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "AB2D:259AD1:AD6833:CCA19E:674F9CA5" + } + }, + "uuid": "b4141f4b-4ca3-4a1c-b507-08a861c87340", + "persistent": true, + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/1-user.json new file mode 100644 index 0000000000..0764c5a936 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": null, + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 7, + "public_gists": 0, + "followers": 3, + "following": 8, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-11-27T04:01:41Z", + "private_gists": 0, + "total_private_repos": 3, + "owned_private_repos": 3, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/2-r_a_github-api-test.json new file mode 100644 index 0000000000..5e34f49aad --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/2-r_a_github-api-test.json @@ -0,0 +1,122 @@ +{ + "id": 895799232, + "node_id": "R_kgDONWTPwA", + "name": "github-api-test", + "full_name": "Alaurant/github-api-test", + "private": true, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/github-api-test", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/Alaurant/github-api-test", + "forks_url": "https://api.github.com/repos/Alaurant/github-api-test/forks", + "keys_url": "https://api.github.com/repos/Alaurant/github-api-test/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/github-api-test/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/github-api-test/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/github-api-test/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/github-api-test/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/github-api-test/events", + "assignees_url": "https://api.github.com/repos/Alaurant/github-api-test/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/github-api-test/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/github-api-test/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/github-api-test/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/github-api-test/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/github-api-test/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/github-api-test/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/github-api-test/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/github-api-test/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/github-api-test/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/github-api-test/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/github-api-test/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/github-api-test/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/github-api-test/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/github-api-test/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/github-api-test/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/github-api-test/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/github-api-test/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/github-api-test/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/github-api-test/merges", + "archive_url": "https://api.github.com/repos/Alaurant/github-api-test/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/github-api-test/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/github-api-test/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/github-api-test/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/github-api-test/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/github-api-test/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/github-api-test/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/github-api-test/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/github-api-test/deployments", + "created_at": "2024-11-28T23:44:54Z", + "updated_at": "2024-11-28T23:44:55Z", + "pushed_at": "2024-11-28T23:44:55Z", + "git_url": "git://github.com/Alaurant/github-api-test.git", + "ssh_url": "git@github.com:Alaurant/github-api-test.git", + "clone_url": "https://github.com/Alaurant/github-api-test.git", + "svn_url": "https://github.com/Alaurant/github-api-test", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 3, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 3, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AJ7BLWH4VOGNQPWHKJHLRCTHJ6O5G", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "network_count": 0, + "subscribers_count": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/1-user.json new file mode 100644 index 0000000000..9d91294677 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "a1c0eb19-f0f1-4359-b22a-832a141db3e7", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:54 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"8bdc3eaf7312491c8eb245323f2eb3004212814ef5f8184104effa4b32f6b27c\"", + "Last-Modified": "Wed, 27 Nov 2024 04:01:41 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4971", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "29", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB35:25CB59:B00D25:CF469E:674F9CA6" + } + }, + "uuid": "a1c0eb19-f0f1-4359-b22a-832a141db3e7", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/2-r_a_github-api-test.json new file mode 100644 index 0000000000..c1437c1acf --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/2-r_a_github-api-test.json @@ -0,0 +1,48 @@ +{ + "id": "9c9e2a60-aeb2-4314-8c97-3263084ed857", + "name": "repos_alaurant_github-api-test", + "request": { + "url": "/repos/Alaurant/github-api-test", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "2-r_a_github-api-test.json", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:55 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"94ad6f4d71086bda8c2640d1ba979adc705c9465218c4ca1e55dc20011962ee7\"", + "Last-Modified": "Thu, 28 Nov 2024 23:44:55 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4969", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "31", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB39:321638:1E7483:24179C:674F9CA7" + } + }, + "uuid": "9c9e2a60-aeb2-4314-8c97-3263084ed857", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/3-r_a_g_autolinks.json new file mode 100644 index 0000000000..608e6c0ffd --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/3-r_a_g_autolinks.json @@ -0,0 +1,54 @@ +{ + "id": "6b66e6e7-8c08-4fd9-b644-90b84f8f5bf8", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "body": "{\"id\":6214212,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:56 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "\"dd07a13b3219e53d610f3dc3c3f3261e0f56b5b9e02c03bef2c21659e19c8875\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4968", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "32", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB3D:275BE1:A98B5B:C65DE1:674F9CA7" + } + }, + "uuid": "6b66e6e7-8c08-4fd9-b644-90b84f8f5bf8", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6214212.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6214212.json new file mode 100644 index 0000000000..20eee37749 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6214212.json @@ -0,0 +1,47 @@ +{ + "id": "3c2a5120-9645-4bbf-9645-ee04be962ae2", + "name": "repos_alaurant_github-api-test_autolinks_6214212", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6214212", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "body": "{\"id\":6214212,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:56 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"dd07a13b3219e53d610f3dc3c3f3261e0f56b5b9e02c03bef2c21659e19c8875\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4967", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "33", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB3E:25E009:B3DC62:D3161D:674F9CA8" + } + }, + "uuid": "3c2a5120-9645-4bbf-9645-ee04be962ae2", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6214212.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6214212.json new file mode 100644 index 0000000000..b72ed1961f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6214212.json @@ -0,0 +1,43 @@ +{ + "id": "3ed2b3a2-3cc1-4382-86a8-251d4791104b", + "name": "repos_alaurant_github-api-test_autolinks_6214212", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6214212", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 204, + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:57 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4966", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "34", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "AB42:25DAE6:BD2DEF:DC679E:674F9CA9" + } + }, + "uuid": "3ed2b3a2-3cc1-4382-86a8-251d4791104b", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/6-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/6-r_a_g_autolinks.json new file mode 100644 index 0000000000..ce3fe6adc9 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/6-r_a_g_autolinks.json @@ -0,0 +1,47 @@ +{ + "id": "db9e25ad-fa61-44a4-ab74-c430bd85d6bb", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "body": "[]", + "headers": { + "Date": "Wed, 04 Dec 2024 00:04:57 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "\"5b744729737bd28d14aeb327919c263d8af99640a7701726d7b2320a638b5c76\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4965", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "35", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AB43:25A8FF:B7347B:D66E29:674F9CA9" + } + }, + "uuid": "db9e25ad-fa61-44a4-ab74-c430bd85d6bb", + "persistent": true, + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/1-user.json new file mode 100644 index 0000000000..a385d2bfd8 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": "Brisbane, AUS", + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 14, + "public_gists": 0, + "followers": 4, + "following": 11, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-12-15T04:04:44Z", + "private_gists": 0, + "total_private_repos": 2, + "owned_private_repos": 2, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/10-r_a_t_branches.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/10-r_a_t_branches.json new file mode 100644 index 0000000000..e9d401004d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/10-r_a_t_branches.json @@ -0,0 +1,70 @@ +[ + { + "name": "main", + "commit": { + "sha": "cc56732e2af71c7c250e5e0e61ac977b52aecd1c", + "url": "https://api.github.com/repos/Alaurant/temp-testFork/commits/cc56732e2af71c7c250e5e0e61ac977b52aecd1c" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [], + "checks": [] + } + }, + "protection_url": "https://api.github.com/repos/Alaurant/temp-testFork/branches/main/protection" + }, + { + "name": "test-branch1", + "commit": { + "sha": "cc56732e2af71c7c250e5e0e61ac977b52aecd1c", + "url": "https://api.github.com/repos/Alaurant/temp-testFork/commits/cc56732e2af71c7c250e5e0e61ac977b52aecd1c" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [], + "checks": [] + } + }, + "protection_url": "https://api.github.com/repos/Alaurant/temp-testFork/branches/test-branch1/protection" + }, + { + "name": "test-branch2", + "commit": { + "sha": "cc56732e2af71c7c250e5e0e61ac977b52aecd1c", + "url": "https://api.github.com/repos/Alaurant/temp-testFork/commits/cc56732e2af71c7c250e5e0e61ac977b52aecd1c" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [], + "checks": [] + } + }, + "protection_url": "https://api.github.com/repos/Alaurant/temp-testFork/branches/test-branch2/protection" + }, + { + "name": "test-branch3", + "commit": { + "sha": "cc56732e2af71c7c250e5e0e61ac977b52aecd1c", + "url": "https://api.github.com/repos/Alaurant/temp-testFork/commits/cc56732e2af71c7c250e5e0e61ac977b52aecd1c" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [], + "checks": [] + } + }, + "protection_url": "https://api.github.com/repos/Alaurant/temp-testFork/branches/test-branch3/protection" + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/2-r_h_temp-testfork.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/2-r_h_temp-testfork.json new file mode 100644 index 0000000000..87ad2a99ff --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/2-r_h_temp-testfork.json @@ -0,0 +1,161 @@ +{ + "id": 906237768, + "node_id": "R_kgDONgQXSA", + "name": "temp-testFork", + "full_name": "hub4j-test-org/temp-testFork", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testFork", + "description": "A test repository for testing the github-api project: temp-testFork", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testFork", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/deployments", + "created_at": "2024-12-20T13:03:02Z", + "updated_at": "2024-12-20T13:03:03Z", + "pushed_at": "2024-12-20T13:03:03Z", + "git_url": "git://github.com/hub4j-test-org/temp-testFork.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testFork.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testFork.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testFork", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "custom_properties": {}, + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "security_and_analysis": { + "secret_scanning": { + "status": "disabled" + }, + "secret_scanning_push_protection": { + "status": "disabled" + }, + "dependabot_security_updates": { + "status": "disabled" + }, + "secret_scanning_non_provider_patterns": { + "status": "disabled" + }, + "secret_scanning_validity_checks": { + "status": "disabled" + } + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/7-r_h_t_forks.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/7-r_h_t_forks.json new file mode 100644 index 0000000000..71155731bc --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/7-r_h_t_forks.json @@ -0,0 +1,312 @@ +{ + "id": 906237805, + "node_id": "R_kgDONgQXbQ", + "name": "temp-testFork", + "full_name": "Alaurant/temp-testFork", + "private": false, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/temp-testFork", + "description": "A test repository for testing the github-api project: temp-testFork", + "fork": true, + "url": "https://api.github.com/repos/Alaurant/temp-testFork", + "forks_url": "https://api.github.com/repos/Alaurant/temp-testFork/forks", + "keys_url": "https://api.github.com/repos/Alaurant/temp-testFork/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/temp-testFork/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/temp-testFork/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/temp-testFork/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/temp-testFork/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/temp-testFork/events", + "assignees_url": "https://api.github.com/repos/Alaurant/temp-testFork/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/temp-testFork/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/temp-testFork/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/temp-testFork/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/temp-testFork/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/temp-testFork/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/temp-testFork/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/temp-testFork/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/temp-testFork/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/temp-testFork/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/temp-testFork/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/temp-testFork/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/temp-testFork/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/temp-testFork/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/temp-testFork/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/temp-testFork/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/temp-testFork/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/temp-testFork/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/temp-testFork/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/temp-testFork/merges", + "archive_url": "https://api.github.com/repos/Alaurant/temp-testFork/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/temp-testFork/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/temp-testFork/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/temp-testFork/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/temp-testFork/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/temp-testFork/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/temp-testFork/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/temp-testFork/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/temp-testFork/deployments", + "created_at": "2024-12-20T13:03:09Z", + "updated_at": "2024-12-20T13:03:09Z", + "pushed_at": "2024-12-20T13:03:08Z", + "git_url": "git://github.com/Alaurant/temp-testFork.git", + "ssh_url": "git@github.com:Alaurant/temp-testFork.git", + "clone_url": "https://github.com/Alaurant/temp-testFork.git", + "svn_url": "https://github.com/Alaurant/temp-testFork", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "parent": { + "id": 906237768, + "node_id": "R_kgDONgQXSA", + "name": "temp-testFork", + "full_name": "hub4j-test-org/temp-testFork", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testFork", + "description": "A test repository for testing the github-api project: temp-testFork", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testFork", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/deployments", + "created_at": "2024-12-20T13:03:02Z", + "updated_at": "2024-12-20T13:03:06Z", + "pushed_at": "2024-12-20T13:03:08Z", + "git_url": "git://github.com/hub4j-test-org/temp-testFork.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testFork.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testFork.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testFork", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "source": { + "id": 906237768, + "node_id": "R_kgDONgQXSA", + "name": "temp-testFork", + "full_name": "hub4j-test-org/temp-testFork", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testFork", + "description": "A test repository for testing the github-api project: temp-testFork", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testFork", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/deployments", + "created_at": "2024-12-20T13:03:02Z", + "updated_at": "2024-12-20T13:03:06Z", + "pushed_at": "2024-12-20T13:03:08Z", + "git_url": "git://github.com/hub4j-test-org/temp-testFork.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testFork.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testFork.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testFork", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "network_count": 0, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/8-r_a_temp-testfork.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/8-r_a_temp-testfork.json new file mode 100644 index 0000000000..70be788276 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/8-r_a_temp-testfork.json @@ -0,0 +1,341 @@ +{ + "id": 906237805, + "node_id": "R_kgDONgQXbQ", + "name": "temp-testFork", + "full_name": "Alaurant/temp-testFork", + "private": false, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/temp-testFork", + "description": "A test repository for testing the github-api project: temp-testFork", + "fork": true, + "url": "https://api.github.com/repos/Alaurant/temp-testFork", + "forks_url": "https://api.github.com/repos/Alaurant/temp-testFork/forks", + "keys_url": "https://api.github.com/repos/Alaurant/temp-testFork/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/temp-testFork/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/temp-testFork/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/temp-testFork/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/temp-testFork/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/temp-testFork/events", + "assignees_url": "https://api.github.com/repos/Alaurant/temp-testFork/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/temp-testFork/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/temp-testFork/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/temp-testFork/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/temp-testFork/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/temp-testFork/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/temp-testFork/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/temp-testFork/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/temp-testFork/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/temp-testFork/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/temp-testFork/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/temp-testFork/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/temp-testFork/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/temp-testFork/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/temp-testFork/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/temp-testFork/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/temp-testFork/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/temp-testFork/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/temp-testFork/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/temp-testFork/merges", + "archive_url": "https://api.github.com/repos/Alaurant/temp-testFork/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/temp-testFork/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/temp-testFork/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/temp-testFork/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/temp-testFork/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/temp-testFork/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/temp-testFork/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/temp-testFork/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/temp-testFork/deployments", + "created_at": "2024-12-20T13:03:09Z", + "updated_at": "2024-12-20T13:03:09Z", + "pushed_at": "2024-12-20T13:03:08Z", + "git_url": "git://github.com/Alaurant/temp-testFork.git", + "ssh_url": "git@github.com:Alaurant/temp-testFork.git", + "clone_url": "https://github.com/Alaurant/temp-testFork.git", + "svn_url": "https://github.com/Alaurant/temp-testFork", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "parent": { + "id": 906237768, + "node_id": "R_kgDONgQXSA", + "name": "temp-testFork", + "full_name": "hub4j-test-org/temp-testFork", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testFork", + "description": "A test repository for testing the github-api project: temp-testFork", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testFork", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/deployments", + "created_at": "2024-12-20T13:03:02Z", + "updated_at": "2024-12-20T13:03:06Z", + "pushed_at": "2024-12-20T13:03:08Z", + "git_url": "git://github.com/hub4j-test-org/temp-testFork.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testFork.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testFork.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testFork", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "source": { + "id": 906237768, + "node_id": "R_kgDONgQXSA", + "name": "temp-testFork", + "full_name": "hub4j-test-org/temp-testFork", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testFork", + "description": "A test repository for testing the github-api project: temp-testFork", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testFork", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/deployments", + "created_at": "2024-12-20T13:03:02Z", + "updated_at": "2024-12-20T13:03:06Z", + "pushed_at": "2024-12-20T13:03:08Z", + "git_url": "git://github.com/hub4j-test-org/temp-testFork.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testFork.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testFork.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testFork", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "security_and_analysis": { + "secret_scanning": { + "status": "enabled" + }, + "secret_scanning_push_protection": { + "status": "enabled" + }, + "dependabot_security_updates": { + "status": "disabled" + }, + "secret_scanning_non_provider_patterns": { + "status": "disabled" + }, + "secret_scanning_validity_checks": { + "status": "disabled" + } + }, + "network_count": 1, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/9-r_a_temp-testfork.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/9-r_a_temp-testfork.json new file mode 100644 index 0000000000..70be788276 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/9-r_a_temp-testfork.json @@ -0,0 +1,341 @@ +{ + "id": 906237805, + "node_id": "R_kgDONgQXbQ", + "name": "temp-testFork", + "full_name": "Alaurant/temp-testFork", + "private": false, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/temp-testFork", + "description": "A test repository for testing the github-api project: temp-testFork", + "fork": true, + "url": "https://api.github.com/repos/Alaurant/temp-testFork", + "forks_url": "https://api.github.com/repos/Alaurant/temp-testFork/forks", + "keys_url": "https://api.github.com/repos/Alaurant/temp-testFork/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/temp-testFork/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/temp-testFork/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/temp-testFork/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/temp-testFork/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/temp-testFork/events", + "assignees_url": "https://api.github.com/repos/Alaurant/temp-testFork/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/temp-testFork/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/temp-testFork/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/temp-testFork/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/temp-testFork/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/temp-testFork/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/temp-testFork/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/temp-testFork/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/temp-testFork/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/temp-testFork/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/temp-testFork/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/temp-testFork/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/temp-testFork/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/temp-testFork/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/temp-testFork/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/temp-testFork/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/temp-testFork/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/temp-testFork/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/temp-testFork/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/temp-testFork/merges", + "archive_url": "https://api.github.com/repos/Alaurant/temp-testFork/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/temp-testFork/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/temp-testFork/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/temp-testFork/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/temp-testFork/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/temp-testFork/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/temp-testFork/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/temp-testFork/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/temp-testFork/deployments", + "created_at": "2024-12-20T13:03:09Z", + "updated_at": "2024-12-20T13:03:09Z", + "pushed_at": "2024-12-20T13:03:08Z", + "git_url": "git://github.com/Alaurant/temp-testFork.git", + "ssh_url": "git@github.com:Alaurant/temp-testFork.git", + "clone_url": "https://github.com/Alaurant/temp-testFork.git", + "svn_url": "https://github.com/Alaurant/temp-testFork", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "parent": { + "id": 906237768, + "node_id": "R_kgDONgQXSA", + "name": "temp-testFork", + "full_name": "hub4j-test-org/temp-testFork", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testFork", + "description": "A test repository for testing the github-api project: temp-testFork", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testFork", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/deployments", + "created_at": "2024-12-20T13:03:02Z", + "updated_at": "2024-12-20T13:03:06Z", + "pushed_at": "2024-12-20T13:03:08Z", + "git_url": "git://github.com/hub4j-test-org/temp-testFork.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testFork.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testFork.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testFork", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "source": { + "id": 906237768, + "node_id": "R_kgDONgQXSA", + "name": "temp-testFork", + "full_name": "hub4j-test-org/temp-testFork", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testFork", + "description": "A test repository for testing the github-api project: temp-testFork", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testFork", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/deployments", + "created_at": "2024-12-20T13:03:02Z", + "updated_at": "2024-12-20T13:03:06Z", + "pushed_at": "2024-12-20T13:03:08Z", + "git_url": "git://github.com/hub4j-test-org/temp-testFork.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testFork.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testFork.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testFork", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "security_and_analysis": { + "secret_scanning": { + "status": "enabled" + }, + "secret_scanning_push_protection": { + "status": "enabled" + }, + "dependabot_security_updates": { + "status": "disabled" + }, + "secret_scanning_non_provider_patterns": { + "status": "disabled" + }, + "secret_scanning_validity_checks": { + "status": "disabled" + } + }, + "network_count": 1, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/1-user.json new file mode 100644 index 0000000000..8d6aa05cdb --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "08691616-b577-4249-a7dc-429bc18c4244", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:01 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"385e08560117e426bff1cdeb255753d2813a21fd716dab4fb6fbce27aa60b10f\"", + "Last-Modified": "Sun, 15 Dec 2024 04:04:44 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4536", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "464", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "19C6:3BD1EB:26FDEE:2E9A5B:67656B05" + } + }, + "uuid": "08691616-b577-4249-a7dc-429bc18c4244", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/10-r_a_t_branches.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/10-r_a_t_branches.json new file mode 100644 index 0000000000..a2ea670a82 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/10-r_a_t_branches.json @@ -0,0 +1,47 @@ +{ + "id": "52fe6c07-92fb-4636-a85d-158938859417", + "name": "repos_alaurant_temp-testfork_branches", + "request": { + "url": "/repos/Alaurant/temp-testFork/branches", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "10-r_a_t_branches.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:14 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"e501e486d5a993dc60ead8b25ae136c13033c082948a20bee0edf5025df6d6cc\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4523", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "477", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "19EE:2E6E0F:D8922:10993F:67656B12" + } + }, + "uuid": "52fe6c07-92fb-4636-a85d-158938859417", + "persistent": true, + "insertionIndex": 10 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/11-r_a_temp-testfork.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/11-r_a_temp-testfork.json new file mode 100644 index 0000000000..1b344a4842 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/11-r_a_temp-testfork.json @@ -0,0 +1,43 @@ +{ + "id": "1cf8dedd-b4a6-4c34-abef-808e897c3f11", + "name": "repos_alaurant_temp-testfork", + "request": { + "url": "/repos/Alaurant/temp-testFork", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 204, + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:15 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "delete_repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4522", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "478", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "19F2:24DD67:1750C65:1B2EA4F:67656B12" + } + }, + "uuid": "1cf8dedd-b4a6-4c34-abef-808e897c3f11", + "persistent": true, + "insertionIndex": 11 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/2-r_h_temp-testfork.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/2-r_h_temp-testfork.json new file mode 100644 index 0000000000..800ab3c90f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/2-r_h_temp-testfork.json @@ -0,0 +1,48 @@ +{ + "id": "28287013-05d0-471d-aa1b-b8d3668f576c", + "name": "repos_hub4j-test-org_temp-testfork", + "request": { + "url": "/repos/hub4j-test-org/temp-testFork", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "2-r_h_temp-testfork.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:06 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"db4699475f6ac92cf3719728738d0ca7464520c78c7becccec7defe1a1342237\"", + "Last-Modified": "Fri, 20 Dec 2024 13:03:03 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4531", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "469", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "19D3:2CFAFD:E77BCB:1119D2C:67656B0A" + } + }, + "uuid": "28287013-05d0-471d-aa1b-b8d3668f576c", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/7-r_h_t_forks.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/7-r_h_t_forks.json new file mode 100644 index 0000000000..3dfc496b7c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/7-r_h_t_forks.json @@ -0,0 +1,52 @@ +{ + "id": "4ef54cbd-66f3-4aa4-baf6-f02e941385a5", + "name": "repos_hub4j-test-org_temp-testfork_forks", + "request": { + "url": "/repos/hub4j-test-org/temp-testFork/forks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 202, + "bodyFileName": "7-r_h_t_forks.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:09 GMT", + "Content-Type": "application/json; charset=utf-8", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4526", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "474", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "19DE:139242:13ED5F9:1760883:67656B0D" + } + }, + "uuid": "4ef54cbd-66f3-4aa4-baf6-f02e941385a5", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/8-r_a_temp-testfork.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/8-r_a_temp-testfork.json new file mode 100644 index 0000000000..9c4c1a8af0 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/8-r_a_temp-testfork.json @@ -0,0 +1,51 @@ +{ + "id": "c515d8f7-ff23-4299-a35d-eb2608a1e3d7", + "name": "repos_alaurant_temp-testfork", + "request": { + "url": "/repos/Alaurant/temp-testFork", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "8-r_a_temp-testfork.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:10 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"27da55e60c1909f17d020562b8fb04dfc4c058f58a317cbed8c1dc7446c98f13\"", + "Last-Modified": "Fri, 20 Dec 2024 13:03:09 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4525", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "475", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "19E3:24DD67:1750AFC:1B2E8AB:67656B0E" + } + }, + "uuid": "c515d8f7-ff23-4299-a35d-eb2608a1e3d7", + "persistent": true, + "scenarioName": "scenario-1-repos-Alaurant-temp-testFork", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-Alaurant-temp-testFork-2", + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/9-r_a_temp-testfork.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/9-r_a_temp-testfork.json new file mode 100644 index 0000000000..b71e47daac --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/9-r_a_temp-testfork.json @@ -0,0 +1,50 @@ +{ + "id": "1b689152-841c-4f2c-8998-97ad5b977bb8", + "name": "repos_alaurant_temp-testfork", + "request": { + "url": "/repos/Alaurant/temp-testFork", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "9-r_a_temp-testfork.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:14 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"27da55e60c1909f17d020562b8fb04dfc4c058f58a317cbed8c1dc7446c98f13\"", + "Last-Modified": "Fri, 20 Dec 2024 13:03:09 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4524", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "476", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "19ED:139242:13ED7CA:1760A8D:67656B11" + } + }, + "uuid": "1b689152-841c-4f2c-8998-97ad5b977bb8", + "persistent": true, + "scenarioName": "scenario-1-repos-Alaurant-temp-testFork", + "requiredScenarioState": "scenario-1-repos-Alaurant-temp-testFork-2", + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/1-user.json new file mode 100644 index 0000000000..a385d2bfd8 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": "Brisbane, AUS", + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 14, + "public_gists": 0, + "followers": 4, + "following": 11, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-12-15T04:04:44Z", + "private_gists": 0, + "total_private_repos": 2, + "owned_private_repos": 2, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/10-r_a_t_branches.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/10-r_a_t_branches.json new file mode 100644 index 0000000000..cf9be01c88 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/10-r_a_t_branches.json @@ -0,0 +1,70 @@ +[ + { + "name": "main", + "commit": { + "sha": "0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6", + "url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/commits/0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [], + "checks": [] + } + }, + "protection_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/branches/main/protection" + }, + { + "name": "test-branch1", + "commit": { + "sha": "0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6", + "url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/commits/0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [], + "checks": [] + } + }, + "protection_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/branches/test-branch1/protection" + }, + { + "name": "test-branch2", + "commit": { + "sha": "0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6", + "url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/commits/0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [], + "checks": [] + } + }, + "protection_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/branches/test-branch2/protection" + }, + { + "name": "test-branch3", + "commit": { + "sha": "0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6", + "url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/commits/0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [], + "checks": [] + } + }, + "protection_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/branches/test-branch3/protection" + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/2-r_h_temp-testforkchangedname.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/2-r_h_temp-testforkchangedname.json new file mode 100644 index 0000000000..4999eb525f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/2-r_h_temp-testforkchangedname.json @@ -0,0 +1,161 @@ +{ + "id": 906237934, + "node_id": "R_kgDONgQX7g", + "name": "temp-testForkChangedName", + "full_name": "hub4j-test-org/temp-testForkChangedName", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkChangedName", + "description": "A test repository for testing the github-api project: temp-testForkChangedName", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/deployments", + "created_at": "2024-12-20T13:03:29Z", + "updated_at": "2024-12-20T13:03:33Z", + "pushed_at": "2024-12-20T13:03:30Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkChangedName.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkChangedName.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkChangedName.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkChangedName", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "custom_properties": {}, + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "security_and_analysis": { + "secret_scanning": { + "status": "disabled" + }, + "secret_scanning_push_protection": { + "status": "disabled" + }, + "dependabot_security_updates": { + "status": "disabled" + }, + "secret_scanning_non_provider_patterns": { + "status": "disabled" + }, + "secret_scanning_validity_checks": { + "status": "disabled" + } + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/7-r_h_t_forks.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/7-r_h_t_forks.json new file mode 100644 index 0000000000..108ffed5c1 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/7-r_h_t_forks.json @@ -0,0 +1,312 @@ +{ + "id": 906237963, + "node_id": "R_kgDONgQYCw", + "name": "test-fork-with-new-name", + "full_name": "Alaurant/test-fork-with-new-name", + "private": false, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/test-fork-with-new-name", + "description": "A test repository for testing the github-api project: temp-testForkChangedName", + "fork": true, + "url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name", + "forks_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/forks", + "keys_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/events", + "assignees_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/merges", + "archive_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/deployments", + "created_at": "2024-12-20T13:03:36Z", + "updated_at": "2024-12-20T13:03:36Z", + "pushed_at": "2024-12-20T13:03:35Z", + "git_url": "git://github.com/Alaurant/test-fork-with-new-name.git", + "ssh_url": "git@github.com:Alaurant/test-fork-with-new-name.git", + "clone_url": "https://github.com/Alaurant/test-fork-with-new-name.git", + "svn_url": "https://github.com/Alaurant/test-fork-with-new-name", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "parent": { + "id": 906237934, + "node_id": "R_kgDONgQX7g", + "name": "temp-testForkChangedName", + "full_name": "hub4j-test-org/temp-testForkChangedName", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkChangedName", + "description": "A test repository for testing the github-api project: temp-testForkChangedName", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/deployments", + "created_at": "2024-12-20T13:03:29Z", + "updated_at": "2024-12-20T13:03:33Z", + "pushed_at": "2024-12-20T13:03:35Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkChangedName.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkChangedName.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkChangedName.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkChangedName", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "source": { + "id": 906237934, + "node_id": "R_kgDONgQX7g", + "name": "temp-testForkChangedName", + "full_name": "hub4j-test-org/temp-testForkChangedName", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkChangedName", + "description": "A test repository for testing the github-api project: temp-testForkChangedName", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/deployments", + "created_at": "2024-12-20T13:03:29Z", + "updated_at": "2024-12-20T13:03:33Z", + "pushed_at": "2024-12-20T13:03:35Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkChangedName.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkChangedName.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkChangedName.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkChangedName", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "network_count": 0, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/8-r_a_test-fork-with-new-name.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/8-r_a_test-fork-with-new-name.json new file mode 100644 index 0000000000..dba3b76a3a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/8-r_a_test-fork-with-new-name.json @@ -0,0 +1,341 @@ +{ + "id": 906237963, + "node_id": "R_kgDONgQYCw", + "name": "test-fork-with-new-name", + "full_name": "Alaurant/test-fork-with-new-name", + "private": false, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/test-fork-with-new-name", + "description": "A test repository for testing the github-api project: temp-testForkChangedName", + "fork": true, + "url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name", + "forks_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/forks", + "keys_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/events", + "assignees_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/merges", + "archive_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/deployments", + "created_at": "2024-12-20T13:03:36Z", + "updated_at": "2024-12-20T13:03:36Z", + "pushed_at": "2024-12-20T13:03:35Z", + "git_url": "git://github.com/Alaurant/test-fork-with-new-name.git", + "ssh_url": "git@github.com:Alaurant/test-fork-with-new-name.git", + "clone_url": "https://github.com/Alaurant/test-fork-with-new-name.git", + "svn_url": "https://github.com/Alaurant/test-fork-with-new-name", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "parent": { + "id": 906237934, + "node_id": "R_kgDONgQX7g", + "name": "temp-testForkChangedName", + "full_name": "hub4j-test-org/temp-testForkChangedName", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkChangedName", + "description": "A test repository for testing the github-api project: temp-testForkChangedName", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/deployments", + "created_at": "2024-12-20T13:03:29Z", + "updated_at": "2024-12-20T13:03:33Z", + "pushed_at": "2024-12-20T13:03:36Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkChangedName.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkChangedName.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkChangedName.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkChangedName", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "source": { + "id": 906237934, + "node_id": "R_kgDONgQX7g", + "name": "temp-testForkChangedName", + "full_name": "hub4j-test-org/temp-testForkChangedName", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkChangedName", + "description": "A test repository for testing the github-api project: temp-testForkChangedName", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/deployments", + "created_at": "2024-12-20T13:03:29Z", + "updated_at": "2024-12-20T13:03:33Z", + "pushed_at": "2024-12-20T13:03:36Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkChangedName.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkChangedName.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkChangedName.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkChangedName", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "security_and_analysis": { + "secret_scanning": { + "status": "enabled" + }, + "secret_scanning_push_protection": { + "status": "enabled" + }, + "dependabot_security_updates": { + "status": "disabled" + }, + "secret_scanning_non_provider_patterns": { + "status": "disabled" + }, + "secret_scanning_validity_checks": { + "status": "disabled" + } + }, + "network_count": 1, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/9-r_a_test-fork-with-new-name.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/9-r_a_test-fork-with-new-name.json new file mode 100644 index 0000000000..dba3b76a3a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/9-r_a_test-fork-with-new-name.json @@ -0,0 +1,341 @@ +{ + "id": 906237963, + "node_id": "R_kgDONgQYCw", + "name": "test-fork-with-new-name", + "full_name": "Alaurant/test-fork-with-new-name", + "private": false, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/test-fork-with-new-name", + "description": "A test repository for testing the github-api project: temp-testForkChangedName", + "fork": true, + "url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name", + "forks_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/forks", + "keys_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/events", + "assignees_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/merges", + "archive_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/test-fork-with-new-name/deployments", + "created_at": "2024-12-20T13:03:36Z", + "updated_at": "2024-12-20T13:03:36Z", + "pushed_at": "2024-12-20T13:03:35Z", + "git_url": "git://github.com/Alaurant/test-fork-with-new-name.git", + "ssh_url": "git@github.com:Alaurant/test-fork-with-new-name.git", + "clone_url": "https://github.com/Alaurant/test-fork-with-new-name.git", + "svn_url": "https://github.com/Alaurant/test-fork-with-new-name", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "parent": { + "id": 906237934, + "node_id": "R_kgDONgQX7g", + "name": "temp-testForkChangedName", + "full_name": "hub4j-test-org/temp-testForkChangedName", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkChangedName", + "description": "A test repository for testing the github-api project: temp-testForkChangedName", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/deployments", + "created_at": "2024-12-20T13:03:29Z", + "updated_at": "2024-12-20T13:03:33Z", + "pushed_at": "2024-12-20T13:03:36Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkChangedName.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkChangedName.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkChangedName.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkChangedName", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "source": { + "id": 906237934, + "node_id": "R_kgDONgQX7g", + "name": "temp-testForkChangedName", + "full_name": "hub4j-test-org/temp-testForkChangedName", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkChangedName", + "description": "A test repository for testing the github-api project: temp-testForkChangedName", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/deployments", + "created_at": "2024-12-20T13:03:29Z", + "updated_at": "2024-12-20T13:03:33Z", + "pushed_at": "2024-12-20T13:03:36Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkChangedName.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkChangedName.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkChangedName.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkChangedName", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "security_and_analysis": { + "secret_scanning": { + "status": "enabled" + }, + "secret_scanning_push_protection": { + "status": "enabled" + }, + "dependabot_security_updates": { + "status": "disabled" + }, + "secret_scanning_non_provider_patterns": { + "status": "disabled" + }, + "secret_scanning_validity_checks": { + "status": "disabled" + } + }, + "network_count": 1, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/1-user.json new file mode 100644 index 0000000000..7b21147a22 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "296851aa-438a-4995-a736-4fe790939978", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:27 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"385e08560117e426bff1cdeb255753d2813a21fd716dab4fb6fbce27aa60b10f\"", + "Last-Modified": "Sun, 15 Dec 2024 04:04:44 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4504", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "496", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "1828:139242:13EDC55:1760FEE:67656B1F" + } + }, + "uuid": "296851aa-438a-4995-a736-4fe790939978", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/10-r_a_t_branches.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/10-r_a_t_branches.json new file mode 100644 index 0000000000..76cb0cd00e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/10-r_a_t_branches.json @@ -0,0 +1,47 @@ +{ + "id": "ebfac3e9-0535-464d-bf28-88193b68a22f", + "name": "repos_alaurant_test-fork-with-new-name_branches", + "request": { + "url": "/repos/Alaurant/test-fork-with-new-name/branches", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "10-r_a_t_branches.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:41 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"c631fa0760eae27f877eaff9f736d0989178a369351ce7f37fec945ff2c6a285\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4491", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "509", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "1852:32E7C9:14E687F:187C166:67656B2D" + } + }, + "uuid": "ebfac3e9-0535-464d-bf28-88193b68a22f", + "persistent": true, + "insertionIndex": 10 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/11-r_a_test-fork-with-new-name.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/11-r_a_test-fork-with-new-name.json new file mode 100644 index 0000000000..7e0bc2a0d8 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/11-r_a_test-fork-with-new-name.json @@ -0,0 +1,43 @@ +{ + "id": "dcdfdace-40b8-4b5e-9687-4b1ae2da61cb", + "name": "repos_alaurant_test-fork-with-new-name", + "request": { + "url": "/repos/Alaurant/test-fork-with-new-name", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 204, + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:42 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "delete_repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4490", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "510", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "1853:273586:157205C:18F4950:67656B2D" + } + }, + "uuid": "dcdfdace-40b8-4b5e-9687-4b1ae2da61cb", + "persistent": true, + "insertionIndex": 11 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/2-r_h_temp-testforkchangedname.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/2-r_h_temp-testforkchangedname.json new file mode 100644 index 0000000000..eda249760a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/2-r_h_temp-testforkchangedname.json @@ -0,0 +1,48 @@ +{ + "id": "11509f39-9edb-47dc-a69f-816cfd79fa16", + "name": "repos_hub4j-test-org_temp-testforkchangedname", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkChangedName", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "2-r_h_temp-testforkchangedname.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:34 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"99764250f45d4b61c1d15ffad41b53a6e5ef296b162f522210b67cd0214b43c5\"", + "Last-Modified": "Fri, 20 Dec 2024 13:03:33 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4499", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "501", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "1838:2E6E0F:D8ED8:10A013:67656B25" + } + }, + "uuid": "11509f39-9edb-47dc-a69f-816cfd79fa16", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/7-r_h_t_forks.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/7-r_h_t_forks.json new file mode 100644 index 0000000000..9decf4de30 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/7-r_h_t_forks.json @@ -0,0 +1,52 @@ +{ + "id": "fdf79883-6cca-4684-8679-38e6a2190127", + "name": "repos_hub4j-test-org_temp-testforkchangedname_forks", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkChangedName/forks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"name\":\"test-fork-with-new-name\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 202, + "bodyFileName": "7-r_h_t_forks.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:37 GMT", + "Content-Type": "application/json; charset=utf-8", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4494", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "506", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "1843:32E7C9:14E66EE:187BF77:67656B28" + } + }, + "uuid": "fdf79883-6cca-4684-8679-38e6a2190127", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/8-r_a_test-fork-with-new-name.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/8-r_a_test-fork-with-new-name.json new file mode 100644 index 0000000000..e3b78e8a79 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/8-r_a_test-fork-with-new-name.json @@ -0,0 +1,51 @@ +{ + "id": "ffa0ad50-719c-4519-89bf-23bb84b88fa7", + "name": "repos_alaurant_test-fork-with-new-name", + "request": { + "url": "/repos/Alaurant/test-fork-with-new-name", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "8-r_a_test-fork-with-new-name.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:37 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"8abd35382f1e6544398de57cfb7e8fd04978f2c3ec7cdd360b7c8737aa845bd1\"", + "Last-Modified": "Fri, 20 Dec 2024 13:03:36 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4493", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "507", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "1847:2E6E0F:D8FAA:10A117:67656B29" + } + }, + "uuid": "ffa0ad50-719c-4519-89bf-23bb84b88fa7", + "persistent": true, + "scenarioName": "scenario-1-repos-Alaurant-test-fork-with-new-name", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-Alaurant-test-fork-with-new-name-2", + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/9-r_a_test-fork-with-new-name.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/9-r_a_test-fork-with-new-name.json new file mode 100644 index 0000000000..1fa85fc0dc --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/9-r_a_test-fork-with-new-name.json @@ -0,0 +1,50 @@ +{ + "id": "9282fcd8-08cc-4a3a-93d2-42ba0938abe7", + "name": "repos_alaurant_test-fork-with-new-name", + "request": { + "url": "/repos/Alaurant/test-fork-with-new-name", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "9-r_a_test-fork-with-new-name.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:41 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"8abd35382f1e6544398de57cfb7e8fd04978f2c3ec7cdd360b7c8737aa845bd1\"", + "Last-Modified": "Fri, 20 Dec 2024 13:03:36 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4492", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "508", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "1851:1E9DA:1632513:1A10497:67656B2C" + } + }, + "uuid": "9282fcd8-08cc-4a3a-93d2-42ba0938abe7", + "persistent": true, + "scenarioName": "scenario-1-repos-Alaurant-test-fork-with-new-name", + "requiredScenarioState": "scenario-1-repos-Alaurant-test-fork-with-new-name-2", + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/1-user.json new file mode 100644 index 0000000000..a385d2bfd8 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": "Brisbane, AUS", + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 14, + "public_gists": 0, + "followers": 4, + "following": 11, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-12-15T04:04:44Z", + "private_gists": 0, + "total_private_repos": 2, + "owned_private_repos": 2, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/10-r_a_t_branches.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/10-r_a_t_branches.json new file mode 100644 index 0000000000..3465145fea --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/10-r_a_t_branches.json @@ -0,0 +1,19 @@ +[ + { + "name": "main", + "commit": { + "sha": "b565d5b9adbaf54f1b35d879f0d98c135ad3d7d8", + "url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/commits/b565d5b9adbaf54f1b35d879f0d98c135ad3d7d8" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [], + "checks": [] + } + }, + "protection_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/branches/main/protection" + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/2-r_h_temp-testforkdefaultbranchonly.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/2-r_h_temp-testforkdefaultbranchonly.json new file mode 100644 index 0000000000..204cdaf251 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/2-r_h_temp-testforkdefaultbranchonly.json @@ -0,0 +1,161 @@ +{ + "id": 906237492, + "node_id": "R_kgDONgQWNA", + "name": "temp-testForkDefaultBranchOnly", + "full_name": "hub4j-test-org/temp-testForkDefaultBranchOnly", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly", + "description": "A test repository for testing the github-api project: temp-testForkDefaultBranchOnly", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/deployments", + "created_at": "2024-12-20T13:02:20Z", + "updated_at": "2024-12-20T13:02:21Z", + "pushed_at": "2024-12-20T13:02:21Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "custom_properties": {}, + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "security_and_analysis": { + "secret_scanning": { + "status": "disabled" + }, + "secret_scanning_push_protection": { + "status": "disabled" + }, + "dependabot_security_updates": { + "status": "disabled" + }, + "secret_scanning_non_provider_patterns": { + "status": "disabled" + }, + "secret_scanning_validity_checks": { + "status": "disabled" + } + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/7-r_h_t_forks.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/7-r_h_t_forks.json new file mode 100644 index 0000000000..1067cc9089 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/7-r_h_t_forks.json @@ -0,0 +1,312 @@ +{ + "id": 906237549, + "node_id": "R_kgDONgQWbQ", + "name": "temp-testForkDefaultBranchOnly", + "full_name": "Alaurant/temp-testForkDefaultBranchOnly", + "private": false, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/temp-testForkDefaultBranchOnly", + "description": "A test repository for testing the github-api project: temp-testForkDefaultBranchOnly", + "fork": true, + "url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly", + "forks_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/forks", + "keys_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/events", + "assignees_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/merges", + "archive_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/deployments", + "created_at": "2024-12-20T13:02:28Z", + "updated_at": "2024-12-20T13:02:28Z", + "pushed_at": "2024-12-20T13:02:27Z", + "git_url": "git://github.com/Alaurant/temp-testForkDefaultBranchOnly.git", + "ssh_url": "git@github.com:Alaurant/temp-testForkDefaultBranchOnly.git", + "clone_url": "https://github.com/Alaurant/temp-testForkDefaultBranchOnly.git", + "svn_url": "https://github.com/Alaurant/temp-testForkDefaultBranchOnly", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "parent": { + "id": 906237492, + "node_id": "R_kgDONgQWNA", + "name": "temp-testForkDefaultBranchOnly", + "full_name": "hub4j-test-org/temp-testForkDefaultBranchOnly", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly", + "description": "A test repository for testing the github-api project: temp-testForkDefaultBranchOnly", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/deployments", + "created_at": "2024-12-20T13:02:20Z", + "updated_at": "2024-12-20T13:02:25Z", + "pushed_at": "2024-12-20T13:02:27Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "source": { + "id": 906237492, + "node_id": "R_kgDONgQWNA", + "name": "temp-testForkDefaultBranchOnly", + "full_name": "hub4j-test-org/temp-testForkDefaultBranchOnly", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly", + "description": "A test repository for testing the github-api project: temp-testForkDefaultBranchOnly", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/deployments", + "created_at": "2024-12-20T13:02:20Z", + "updated_at": "2024-12-20T13:02:25Z", + "pushed_at": "2024-12-20T13:02:27Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "network_count": 0, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/8-r_a_temp-testforkdefaultbranchonly.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/8-r_a_temp-testforkdefaultbranchonly.json new file mode 100644 index 0000000000..540be5c247 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/8-r_a_temp-testforkdefaultbranchonly.json @@ -0,0 +1,341 @@ +{ + "id": 906237549, + "node_id": "R_kgDONgQWbQ", + "name": "temp-testForkDefaultBranchOnly", + "full_name": "Alaurant/temp-testForkDefaultBranchOnly", + "private": false, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/temp-testForkDefaultBranchOnly", + "description": "A test repository for testing the github-api project: temp-testForkDefaultBranchOnly", + "fork": true, + "url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly", + "forks_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/forks", + "keys_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/events", + "assignees_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/merges", + "archive_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/deployments", + "created_at": "2024-12-20T13:02:28Z", + "updated_at": "2024-12-20T13:02:28Z", + "pushed_at": "2024-12-20T13:02:27Z", + "git_url": "git://github.com/Alaurant/temp-testForkDefaultBranchOnly.git", + "ssh_url": "git@github.com:Alaurant/temp-testForkDefaultBranchOnly.git", + "clone_url": "https://github.com/Alaurant/temp-testForkDefaultBranchOnly.git", + "svn_url": "https://github.com/Alaurant/temp-testForkDefaultBranchOnly", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "parent": { + "id": 906237492, + "node_id": "R_kgDONgQWNA", + "name": "temp-testForkDefaultBranchOnly", + "full_name": "hub4j-test-org/temp-testForkDefaultBranchOnly", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly", + "description": "A test repository for testing the github-api project: temp-testForkDefaultBranchOnly", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/deployments", + "created_at": "2024-12-20T13:02:20Z", + "updated_at": "2024-12-20T13:02:25Z", + "pushed_at": "2024-12-20T13:02:27Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "source": { + "id": 906237492, + "node_id": "R_kgDONgQWNA", + "name": "temp-testForkDefaultBranchOnly", + "full_name": "hub4j-test-org/temp-testForkDefaultBranchOnly", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly", + "description": "A test repository for testing the github-api project: temp-testForkDefaultBranchOnly", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/deployments", + "created_at": "2024-12-20T13:02:20Z", + "updated_at": "2024-12-20T13:02:25Z", + "pushed_at": "2024-12-20T13:02:27Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "security_and_analysis": { + "secret_scanning": { + "status": "enabled" + }, + "secret_scanning_push_protection": { + "status": "enabled" + }, + "dependabot_security_updates": { + "status": "disabled" + }, + "secret_scanning_non_provider_patterns": { + "status": "disabled" + }, + "secret_scanning_validity_checks": { + "status": "disabled" + } + }, + "network_count": 1, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/9-r_a_temp-testforkdefaultbranchonly.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/9-r_a_temp-testforkdefaultbranchonly.json new file mode 100644 index 0000000000..540be5c247 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/9-r_a_temp-testforkdefaultbranchonly.json @@ -0,0 +1,341 @@ +{ + "id": 906237549, + "node_id": "R_kgDONgQWbQ", + "name": "temp-testForkDefaultBranchOnly", + "full_name": "Alaurant/temp-testForkDefaultBranchOnly", + "private": false, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/temp-testForkDefaultBranchOnly", + "description": "A test repository for testing the github-api project: temp-testForkDefaultBranchOnly", + "fork": true, + "url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly", + "forks_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/forks", + "keys_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/events", + "assignees_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/merges", + "archive_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/temp-testForkDefaultBranchOnly/deployments", + "created_at": "2024-12-20T13:02:28Z", + "updated_at": "2024-12-20T13:02:28Z", + "pushed_at": "2024-12-20T13:02:27Z", + "git_url": "git://github.com/Alaurant/temp-testForkDefaultBranchOnly.git", + "ssh_url": "git@github.com:Alaurant/temp-testForkDefaultBranchOnly.git", + "clone_url": "https://github.com/Alaurant/temp-testForkDefaultBranchOnly.git", + "svn_url": "https://github.com/Alaurant/temp-testForkDefaultBranchOnly", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "parent": { + "id": 906237492, + "node_id": "R_kgDONgQWNA", + "name": "temp-testForkDefaultBranchOnly", + "full_name": "hub4j-test-org/temp-testForkDefaultBranchOnly", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly", + "description": "A test repository for testing the github-api project: temp-testForkDefaultBranchOnly", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/deployments", + "created_at": "2024-12-20T13:02:20Z", + "updated_at": "2024-12-20T13:02:25Z", + "pushed_at": "2024-12-20T13:02:27Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "source": { + "id": 906237492, + "node_id": "R_kgDONgQWNA", + "name": "temp-testForkDefaultBranchOnly", + "full_name": "hub4j-test-org/temp-testForkDefaultBranchOnly", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly", + "description": "A test repository for testing the github-api project: temp-testForkDefaultBranchOnly", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/deployments", + "created_at": "2024-12-20T13:02:20Z", + "updated_at": "2024-12-20T13:02:25Z", + "pushed_at": "2024-12-20T13:02:27Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkDefaultBranchOnly", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "security_and_analysis": { + "secret_scanning": { + "status": "enabled" + }, + "secret_scanning_push_protection": { + "status": "enabled" + }, + "dependabot_security_updates": { + "status": "disabled" + }, + "secret_scanning_non_provider_patterns": { + "status": "disabled" + }, + "secret_scanning_validity_checks": { + "status": "disabled" + } + }, + "network_count": 1, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/1-user.json new file mode 100644 index 0000000000..fd54ba4f0d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "a1f43b65-4451-4893-b3ec-55bb3ed9acb1", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02:18 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"385e08560117e426bff1cdeb255753d2813a21fd716dab4fb6fbce27aa60b10f\"", + "Last-Modified": "Sun, 15 Dec 2024 04:04:44 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4583", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "417", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "192D:245A47:15F4196:19D1C40:67656ADA" + } + }, + "uuid": "a1f43b65-4451-4893-b3ec-55bb3ed9acb1", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/10-r_a_t_branches.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/10-r_a_t_branches.json new file mode 100644 index 0000000000..f6ca3b4c1b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/10-r_a_t_branches.json @@ -0,0 +1,47 @@ +{ + "id": "3a909acd-2013-4517-9a77-1463cf3264ef", + "name": "repos_alaurant_temp-testforkdefaultbranchonly_branches", + "request": { + "url": "/repos/Alaurant/temp-testForkDefaultBranchOnly/branches", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "10-r_a_t_branches.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02:34 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"76199ebd0c7fbbf1471460d4f8f4c0840dd2d806b2508d607c954916e56c287b\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4570", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "430", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "195B:2CFAFD:E77421:111939A:67656AE9" + } + }, + "uuid": "3a909acd-2013-4517-9a77-1463cf3264ef", + "persistent": true, + "insertionIndex": 10 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/11-r_a_temp-testforkdefaultbranchonly.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/11-r_a_temp-testforkdefaultbranchonly.json new file mode 100644 index 0000000000..44cd1b71bb --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/11-r_a_temp-testforkdefaultbranchonly.json @@ -0,0 +1,43 @@ +{ + "id": "f0e6c205-8829-417f-bb6a-9b42277bd227", + "name": "repos_alaurant_temp-testforkdefaultbranchonly", + "request": { + "url": "/repos/Alaurant/temp-testForkDefaultBranchOnly", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 204, + "headers": { + "Date": "Fri, 20 Dec 2024 13:02:34 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "delete_repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4569", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "431", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "195F:2C3D90:F87165:12348DC:67656AEA" + } + }, + "uuid": "f0e6c205-8829-417f-bb6a-9b42277bd227", + "persistent": true, + "insertionIndex": 11 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/2-r_h_temp-testforkdefaultbranchonly.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/2-r_h_temp-testforkdefaultbranchonly.json new file mode 100644 index 0000000000..7c2fa978cb --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/2-r_h_temp-testforkdefaultbranchonly.json @@ -0,0 +1,48 @@ +{ + "id": "3a839321-aaa9-4ce2-9d8b-1ea770f6325e", + "name": "repos_hub4j-test-org_temp-testforkdefaultbranchonly", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkDefaultBranchOnly", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "2-r_h_temp-testforkdefaultbranchonly.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02:25 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"9fb7691cba8fffab330566af72a89dceb7c917597c1de7eb620966055f03e9b9\"", + "Last-Modified": "Fri, 20 Dec 2024 13:02:21 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4578", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "422", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "193E:24DD67:1750018:1B2DB22:67656AE1" + } + }, + "uuid": "3a839321-aaa9-4ce2-9d8b-1ea770f6325e", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/7-r_h_t_forks.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/7-r_h_t_forks.json new file mode 100644 index 0000000000..9c439fc281 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/7-r_h_t_forks.json @@ -0,0 +1,52 @@ +{ + "id": "e8ef3012-976b-46e8-825d-64021780b138", + "name": "repos_hub4j-test-org_temp-testforkdefaultbranchonly_forks", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/forks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"default_branch_only\":true}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 202, + "bodyFileName": "7-r_h_t_forks.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02:29 GMT", + "Content-Type": "application/json; charset=utf-8", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4573", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "427", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "194C:2CFAFD:E7729D:11191A7:67656AE3" + } + }, + "uuid": "e8ef3012-976b-46e8-825d-64021780b138", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/8-r_a_temp-testforkdefaultbranchonly.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/8-r_a_temp-testforkdefaultbranchonly.json new file mode 100644 index 0000000000..42e6029115 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/8-r_a_temp-testforkdefaultbranchonly.json @@ -0,0 +1,51 @@ +{ + "id": "68dc53e9-7109-430b-acbd-ee8f0dc8badc", + "name": "repos_alaurant_temp-testforkdefaultbranchonly", + "request": { + "url": "/repos/Alaurant/temp-testForkDefaultBranchOnly", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "8-r_a_temp-testforkdefaultbranchonly.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02:30 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"258fe8a9c2265c3f43048484d077b712f4b8bfeed0fe8dca8dbf4bf6dd23cfed\"", + "Last-Modified": "Fri, 20 Dec 2024 13:02:28 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4572", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "428", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "1950:2C3D90:F8706A:12347A8:67656AE5" + } + }, + "uuid": "68dc53e9-7109-430b-acbd-ee8f0dc8badc", + "persistent": true, + "scenarioName": "scenario-1-repos-Alaurant-temp-testForkDefaultBranchOnly", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-Alaurant-temp-testForkDefaultBranchOnly-2", + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/9-r_a_temp-testforkdefaultbranchonly.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/9-r_a_temp-testforkdefaultbranchonly.json new file mode 100644 index 0000000000..ee34e7e8bc --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/9-r_a_temp-testforkdefaultbranchonly.json @@ -0,0 +1,50 @@ +{ + "id": "80a03a5f-1425-4968-bc89-2b44d5ab566f", + "name": "repos_alaurant_temp-testforkdefaultbranchonly", + "request": { + "url": "/repos/Alaurant/temp-testForkDefaultBranchOnly", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "9-r_a_temp-testforkdefaultbranchonly.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02:33 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"258fe8a9c2265c3f43048484d077b712f4b8bfeed0fe8dca8dbf4bf6dd23cfed\"", + "Last-Modified": "Fri, 20 Dec 2024 13:02:28 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4571", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "429", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "195A:245A47:15F4535:19D20C9:67656AE9" + } + }, + "uuid": "80a03a5f-1425-4968-bc89-2b44d5ab566f", + "persistent": true, + "scenarioName": "scenario-1-repos-Alaurant-temp-testForkDefaultBranchOnly", + "requiredScenarioState": "scenario-1-repos-Alaurant-temp-testForkDefaultBranchOnly-2", + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/1-user.json new file mode 100644 index 0000000000..a385d2bfd8 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": "Brisbane, AUS", + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 14, + "public_gists": 0, + "followers": 4, + "following": 11, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-12-15T04:04:44Z", + "private_gists": 0, + "total_private_repos": 2, + "owned_private_repos": 2, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/10-r_n_temp-testforktoorg.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/10-r_n_temp-testforktoorg.json new file mode 100644 index 0000000000..d4a7fe7fc5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/10-r_n_temp-testforktoorg.json @@ -0,0 +1,363 @@ +{ + "id": 906237664, + "node_id": "R_kgDONgQW4A", + "name": "temp-testForkToOrg", + "full_name": "nts-api-test-org/temp-testForkToOrg", + "private": false, + "owner": { + "login": "nts-api-test-org", + "id": 191328158, + "node_id": "O_kgDOC2dvng", + "avatar_url": "https://avatars.githubusercontent.com/u/191328158?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/nts-api-test-org", + "html_url": "https://github.com/nts-api-test-org", + "followers_url": "https://api.github.com/users/nts-api-test-org/followers", + "following_url": "https://api.github.com/users/nts-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/nts-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/nts-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nts-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/nts-api-test-org/orgs", + "repos_url": "https://api.github.com/users/nts-api-test-org/repos", + "events_url": "https://api.github.com/users/nts-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/nts-api-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/nts-api-test-org/temp-testForkToOrg", + "description": "A test repository for testing the github-api project: temp-testForkToOrg", + "fork": true, + "url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg", + "forks_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/forks", + "keys_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/teams", + "hooks_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/hooks", + "issue_events_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/issues/events{/number}", + "events_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/events", + "assignees_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/assignees{/user}", + "branches_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/branches{/branch}", + "tags_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/tags", + "blobs_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/statuses/{sha}", + "languages_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/languages", + "stargazers_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/stargazers", + "contributors_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/contributors", + "subscribers_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/subscribers", + "subscription_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/subscription", + "commits_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/contents/{+path}", + "compare_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/merges", + "archive_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/downloads", + "issues_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/issues{/number}", + "pulls_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/pulls{/number}", + "milestones_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/milestones{/number}", + "notifications_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/labels{/name}", + "releases_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/releases{/id}", + "deployments_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/deployments", + "created_at": "2024-12-20T13:02:45Z", + "updated_at": "2024-12-20T13:02:45Z", + "pushed_at": "2024-12-20T13:02:44Z", + "git_url": "git://github.com/nts-api-test-org/temp-testForkToOrg.git", + "ssh_url": "git@github.com:nts-api-test-org/temp-testForkToOrg.git", + "clone_url": "https://github.com/nts-api-test-org/temp-testForkToOrg.git", + "svn_url": "https://github.com/nts-api-test-org/temp-testForkToOrg", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "custom_properties": {}, + "organization": { + "login": "nts-api-test-org", + "id": 191328158, + "node_id": "O_kgDOC2dvng", + "avatar_url": "https://avatars.githubusercontent.com/u/191328158?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/nts-api-test-org", + "html_url": "https://github.com/nts-api-test-org", + "followers_url": "https://api.github.com/users/nts-api-test-org/followers", + "following_url": "https://api.github.com/users/nts-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/nts-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/nts-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nts-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/nts-api-test-org/orgs", + "repos_url": "https://api.github.com/users/nts-api-test-org/repos", + "events_url": "https://api.github.com/users/nts-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/nts-api-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "parent": { + "id": 906237618, + "node_id": "R_kgDONgQWsg", + "name": "temp-testForkToOrg", + "full_name": "hub4j-test-org/temp-testForkToOrg", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkToOrg", + "description": "A test repository for testing the github-api project: temp-testForkToOrg", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/deployments", + "created_at": "2024-12-20T13:02:37Z", + "updated_at": "2024-12-20T13:02:42Z", + "pushed_at": "2024-12-20T13:02:44Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkToOrg.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkToOrg.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkToOrg.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkToOrg", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "source": { + "id": 906237618, + "node_id": "R_kgDONgQWsg", + "name": "temp-testForkToOrg", + "full_name": "hub4j-test-org/temp-testForkToOrg", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkToOrg", + "description": "A test repository for testing the github-api project: temp-testForkToOrg", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/deployments", + "created_at": "2024-12-20T13:02:37Z", + "updated_at": "2024-12-20T13:02:42Z", + "pushed_at": "2024-12-20T13:02:44Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkToOrg.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkToOrg.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkToOrg.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkToOrg", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "security_and_analysis": { + "secret_scanning": { + "status": "disabled" + }, + "secret_scanning_push_protection": { + "status": "disabled" + }, + "dependabot_security_updates": { + "status": "disabled" + }, + "secret_scanning_non_provider_patterns": { + "status": "disabled" + }, + "secret_scanning_validity_checks": { + "status": "disabled" + } + }, + "network_count": 1, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/11-r_n_t_branches.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/11-r_n_t_branches.json new file mode 100644 index 0000000000..2996fd47e3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/11-r_n_t_branches.json @@ -0,0 +1,70 @@ +[ + { + "name": "main", + "commit": { + "sha": "41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee", + "url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/commits/41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [], + "checks": [] + } + }, + "protection_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/branches/main/protection" + }, + { + "name": "test-branch1", + "commit": { + "sha": "41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee", + "url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/commits/41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [], + "checks": [] + } + }, + "protection_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/branches/test-branch1/protection" + }, + { + "name": "test-branch2", + "commit": { + "sha": "41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee", + "url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/commits/41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [], + "checks": [] + } + }, + "protection_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/branches/test-branch2/protection" + }, + { + "name": "test-branch3", + "commit": { + "sha": "41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee", + "url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/commits/41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [], + "checks": [] + } + }, + "protection_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/branches/test-branch3/protection" + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/2-r_h_temp-testforktoorg.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/2-r_h_temp-testforktoorg.json new file mode 100644 index 0000000000..bf1c956405 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/2-r_h_temp-testforktoorg.json @@ -0,0 +1,161 @@ +{ + "id": 906237618, + "node_id": "R_kgDONgQWsg", + "name": "temp-testForkToOrg", + "full_name": "hub4j-test-org/temp-testForkToOrg", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkToOrg", + "description": "A test repository for testing the github-api project: temp-testForkToOrg", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/deployments", + "created_at": "2024-12-20T13:02:37Z", + "updated_at": "2024-12-20T13:02:38Z", + "pushed_at": "2024-12-20T13:02:38Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkToOrg.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkToOrg.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkToOrg.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkToOrg", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "custom_properties": {}, + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "security_and_analysis": { + "secret_scanning": { + "status": "disabled" + }, + "secret_scanning_push_protection": { + "status": "disabled" + }, + "dependabot_security_updates": { + "status": "disabled" + }, + "secret_scanning_non_provider_patterns": { + "status": "disabled" + }, + "secret_scanning_validity_checks": { + "status": "disabled" + } + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/7-orgs_nts-api-test-org.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/7-orgs_nts-api-test-org.json new file mode 100644 index 0000000000..6ce9af2a9e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/7-orgs_nts-api-test-org.json @@ -0,0 +1,61 @@ +{ + "login": "nts-api-test-org", + "id": 191328158, + "node_id": "O_kgDOC2dvng", + "url": "https://api.github.com/orgs/nts-api-test-org", + "repos_url": "https://api.github.com/orgs/nts-api-test-org/repos", + "events_url": "https://api.github.com/orgs/nts-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/nts-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/nts-api-test-org/issues", + "members_url": "https://api.github.com/orgs/nts-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/nts-api-test-org/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/191328158?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 5, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/nts-api-test-org", + "created_at": "2024-12-11T07:04:56Z", + "updated_at": "2024-12-11T07:04:56Z", + "archived_at": null, + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 0, + "collaborators": 0, + "billing_email": "zhaody085@163.com", + "default_repository_permission": "read", + "members_can_create_repositories": true, + "two_factor_requirement_enabled": false, + "members_allowed_repository_creation_type": "all", + "members_can_create_public_repositories": true, + "members_can_create_private_repositories": true, + "members_can_create_internal_repositories": false, + "members_can_create_pages": true, + "members_can_fork_private_repositories": false, + "web_commit_signoff_required": false, + "deploy_keys_enabled_for_repositories": false, + "members_can_create_public_pages": true, + "members_can_create_private_pages": true, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 10000, + "filled_seats": 1, + "seats": 0 + }, + "advanced_security_enabled_for_new_repositories": false, + "dependabot_alerts_enabled_for_new_repositories": false, + "dependabot_security_updates_enabled_for_new_repositories": false, + "dependency_graph_enabled_for_new_repositories": false, + "secret_scanning_enabled_for_new_repositories": false, + "secret_scanning_push_protection_enabled_for_new_repositories": false, + "secret_scanning_push_protection_custom_link_enabled": false, + "secret_scanning_push_protection_custom_link": null, + "secret_scanning_validity_checks_enabled": false +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/8-r_h_t_forks.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/8-r_h_t_forks.json new file mode 100644 index 0000000000..09fdc636f2 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/8-r_h_t_forks.json @@ -0,0 +1,334 @@ +{ + "id": 906237664, + "node_id": "R_kgDONgQW4A", + "name": "temp-testForkToOrg", + "full_name": "nts-api-test-org/temp-testForkToOrg", + "private": false, + "owner": { + "login": "nts-api-test-org", + "id": 191328158, + "node_id": "O_kgDOC2dvng", + "avatar_url": "https://avatars.githubusercontent.com/u/191328158?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/nts-api-test-org", + "html_url": "https://github.com/nts-api-test-org", + "followers_url": "https://api.github.com/users/nts-api-test-org/followers", + "following_url": "https://api.github.com/users/nts-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/nts-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/nts-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nts-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/nts-api-test-org/orgs", + "repos_url": "https://api.github.com/users/nts-api-test-org/repos", + "events_url": "https://api.github.com/users/nts-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/nts-api-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/nts-api-test-org/temp-testForkToOrg", + "description": "A test repository for testing the github-api project: temp-testForkToOrg", + "fork": true, + "url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg", + "forks_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/forks", + "keys_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/teams", + "hooks_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/hooks", + "issue_events_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/issues/events{/number}", + "events_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/events", + "assignees_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/assignees{/user}", + "branches_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/branches{/branch}", + "tags_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/tags", + "blobs_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/statuses/{sha}", + "languages_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/languages", + "stargazers_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/stargazers", + "contributors_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/contributors", + "subscribers_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/subscribers", + "subscription_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/subscription", + "commits_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/contents/{+path}", + "compare_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/merges", + "archive_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/downloads", + "issues_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/issues{/number}", + "pulls_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/pulls{/number}", + "milestones_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/milestones{/number}", + "notifications_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/labels{/name}", + "releases_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/releases{/id}", + "deployments_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/deployments", + "created_at": "2024-12-20T13:02:45Z", + "updated_at": "2024-12-20T13:02:45Z", + "pushed_at": "2024-12-20T13:02:44Z", + "git_url": "git://github.com/nts-api-test-org/temp-testForkToOrg.git", + "ssh_url": "git@github.com:nts-api-test-org/temp-testForkToOrg.git", + "clone_url": "https://github.com/nts-api-test-org/temp-testForkToOrg.git", + "svn_url": "https://github.com/nts-api-test-org/temp-testForkToOrg", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "custom_properties": {}, + "organization": { + "login": "nts-api-test-org", + "id": 191328158, + "node_id": "O_kgDOC2dvng", + "avatar_url": "https://avatars.githubusercontent.com/u/191328158?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/nts-api-test-org", + "html_url": "https://github.com/nts-api-test-org", + "followers_url": "https://api.github.com/users/nts-api-test-org/followers", + "following_url": "https://api.github.com/users/nts-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/nts-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/nts-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nts-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/nts-api-test-org/orgs", + "repos_url": "https://api.github.com/users/nts-api-test-org/repos", + "events_url": "https://api.github.com/users/nts-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/nts-api-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "parent": { + "id": 906237618, + "node_id": "R_kgDONgQWsg", + "name": "temp-testForkToOrg", + "full_name": "hub4j-test-org/temp-testForkToOrg", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkToOrg", + "description": "A test repository for testing the github-api project: temp-testForkToOrg", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/deployments", + "created_at": "2024-12-20T13:02:37Z", + "updated_at": "2024-12-20T13:02:42Z", + "pushed_at": "2024-12-20T13:02:44Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkToOrg.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkToOrg.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkToOrg.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkToOrg", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "source": { + "id": 906237618, + "node_id": "R_kgDONgQWsg", + "name": "temp-testForkToOrg", + "full_name": "hub4j-test-org/temp-testForkToOrg", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkToOrg", + "description": "A test repository for testing the github-api project: temp-testForkToOrg", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/deployments", + "created_at": "2024-12-20T13:02:37Z", + "updated_at": "2024-12-20T13:02:42Z", + "pushed_at": "2024-12-20T13:02:44Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkToOrg.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkToOrg.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkToOrg.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkToOrg", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "network_count": 0, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/9-r_n_temp-testforktoorg.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/9-r_n_temp-testforktoorg.json new file mode 100644 index 0000000000..d4a7fe7fc5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/9-r_n_temp-testforktoorg.json @@ -0,0 +1,363 @@ +{ + "id": 906237664, + "node_id": "R_kgDONgQW4A", + "name": "temp-testForkToOrg", + "full_name": "nts-api-test-org/temp-testForkToOrg", + "private": false, + "owner": { + "login": "nts-api-test-org", + "id": 191328158, + "node_id": "O_kgDOC2dvng", + "avatar_url": "https://avatars.githubusercontent.com/u/191328158?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/nts-api-test-org", + "html_url": "https://github.com/nts-api-test-org", + "followers_url": "https://api.github.com/users/nts-api-test-org/followers", + "following_url": "https://api.github.com/users/nts-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/nts-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/nts-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nts-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/nts-api-test-org/orgs", + "repos_url": "https://api.github.com/users/nts-api-test-org/repos", + "events_url": "https://api.github.com/users/nts-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/nts-api-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/nts-api-test-org/temp-testForkToOrg", + "description": "A test repository for testing the github-api project: temp-testForkToOrg", + "fork": true, + "url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg", + "forks_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/forks", + "keys_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/teams", + "hooks_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/hooks", + "issue_events_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/issues/events{/number}", + "events_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/events", + "assignees_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/assignees{/user}", + "branches_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/branches{/branch}", + "tags_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/tags", + "blobs_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/statuses/{sha}", + "languages_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/languages", + "stargazers_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/stargazers", + "contributors_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/contributors", + "subscribers_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/subscribers", + "subscription_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/subscription", + "commits_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/contents/{+path}", + "compare_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/merges", + "archive_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/downloads", + "issues_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/issues{/number}", + "pulls_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/pulls{/number}", + "milestones_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/milestones{/number}", + "notifications_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/labels{/name}", + "releases_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/releases{/id}", + "deployments_url": "https://api.github.com/repos/nts-api-test-org/temp-testForkToOrg/deployments", + "created_at": "2024-12-20T13:02:45Z", + "updated_at": "2024-12-20T13:02:45Z", + "pushed_at": "2024-12-20T13:02:44Z", + "git_url": "git://github.com/nts-api-test-org/temp-testForkToOrg.git", + "ssh_url": "git@github.com:nts-api-test-org/temp-testForkToOrg.git", + "clone_url": "https://github.com/nts-api-test-org/temp-testForkToOrg.git", + "svn_url": "https://github.com/nts-api-test-org/temp-testForkToOrg", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "custom_properties": {}, + "organization": { + "login": "nts-api-test-org", + "id": 191328158, + "node_id": "O_kgDOC2dvng", + "avatar_url": "https://avatars.githubusercontent.com/u/191328158?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/nts-api-test-org", + "html_url": "https://github.com/nts-api-test-org", + "followers_url": "https://api.github.com/users/nts-api-test-org/followers", + "following_url": "https://api.github.com/users/nts-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/nts-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/nts-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nts-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/nts-api-test-org/orgs", + "repos_url": "https://api.github.com/users/nts-api-test-org/repos", + "events_url": "https://api.github.com/users/nts-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/nts-api-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "parent": { + "id": 906237618, + "node_id": "R_kgDONgQWsg", + "name": "temp-testForkToOrg", + "full_name": "hub4j-test-org/temp-testForkToOrg", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkToOrg", + "description": "A test repository for testing the github-api project: temp-testForkToOrg", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/deployments", + "created_at": "2024-12-20T13:02:37Z", + "updated_at": "2024-12-20T13:02:42Z", + "pushed_at": "2024-12-20T13:02:44Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkToOrg.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkToOrg.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkToOrg.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkToOrg", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "source": { + "id": 906237618, + "node_id": "R_kgDONgQWsg", + "name": "temp-testForkToOrg", + "full_name": "hub4j-test-org/temp-testForkToOrg", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testForkToOrg", + "description": "A test repository for testing the github-api project: temp-testForkToOrg", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/deployments", + "created_at": "2024-12-20T13:02:37Z", + "updated_at": "2024-12-20T13:02:42Z", + "pushed_at": "2024-12-20T13:02:44Z", + "git_url": "git://github.com/hub4j-test-org/temp-testForkToOrg.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testForkToOrg.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testForkToOrg.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testForkToOrg", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "security_and_analysis": { + "secret_scanning": { + "status": "disabled" + }, + "secret_scanning_push_protection": { + "status": "disabled" + }, + "dependabot_security_updates": { + "status": "disabled" + }, + "secret_scanning_non_provider_patterns": { + "status": "disabled" + }, + "secret_scanning_validity_checks": { + "status": "disabled" + } + }, + "network_count": 1, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/1-user.json new file mode 100644 index 0000000000..a84c8478b0 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "c8a7f10c-4fc7-4d26-9788-08099d053a6b", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02:36 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"385e08560117e426bff1cdeb255753d2813a21fd716dab4fb6fbce27aa60b10f\"", + "Last-Modified": "Sun, 15 Dec 2024 04:04:44 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4566", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "434", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "196A:2CFAFD:E774A3:1119436:67656AEC" + } + }, + "uuid": "c8a7f10c-4fc7-4d26-9788-08099d053a6b", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/10-r_n_temp-testforktoorg.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/10-r_n_temp-testforktoorg.json new file mode 100644 index 0000000000..75577b75ff --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/10-r_n_temp-testforktoorg.json @@ -0,0 +1,50 @@ +{ + "id": "83ad8c59-db34-4642-a4bc-2c0ee4c69db1", + "name": "repos_nts-api-test-org_temp-testforktoorg", + "request": { + "url": "/repos/nts-api-test-org/temp-testForkToOrg", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "10-r_n_temp-testforktoorg.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02:49 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"18bcfe6236e0f7bd80bbdbd0501ee09516d7de82d0d1623493784d675b63c28a\"", + "Last-Modified": "Fri, 20 Dec 2024 13:02:45 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4553", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "447", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "1994:2E6E0F:D826D:109102:67656AF9" + } + }, + "uuid": "83ad8c59-db34-4642-a4bc-2c0ee4c69db1", + "persistent": true, + "scenarioName": "scenario-1-repos-nts-api-test-org-temp-testForkToOrg", + "requiredScenarioState": "scenario-1-repos-nts-api-test-org-temp-testForkToOrg-2", + "insertionIndex": 10 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/11-r_n_t_branches.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/11-r_n_t_branches.json new file mode 100644 index 0000000000..db14d66db1 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/11-r_n_t_branches.json @@ -0,0 +1,47 @@ +{ + "id": "d0c5f80d-b010-4399-a40d-8569cd9ec759", + "name": "repos_nts-api-test-org_temp-testforktoorg_branches", + "request": { + "url": "/repos/nts-api-test-org/temp-testForkToOrg/branches", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "11-r_n_t_branches.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02:50 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"581936b81a7edab9b8efb7d06da4a1c1634837d1c5bd2fd75bf1d9adcaea2fa6\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4552", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "448", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "1995:1F61D2:1660BC6:1A3E840:67656AFA" + } + }, + "uuid": "d0c5f80d-b010-4399-a40d-8569cd9ec759", + "persistent": true, + "insertionIndex": 11 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/12-r_n_temp-testforktoorg.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/12-r_n_temp-testforktoorg.json new file mode 100644 index 0000000000..f597accb92 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/12-r_n_temp-testforktoorg.json @@ -0,0 +1,43 @@ +{ + "id": "ddc73e30-2d80-4c2d-be70-4e5dadf73c39", + "name": "repos_nts-api-test-org_temp-testforktoorg", + "request": { + "url": "/repos/nts-api-test-org/temp-testForkToOrg", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 204, + "headers": { + "Date": "Fri, 20 Dec 2024 13:02:50 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "delete_repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4551", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "449", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "1996:245A47:15F4938:19D25C0:67656AFA" + } + }, + "uuid": "ddc73e30-2d80-4c2d-be70-4e5dadf73c39", + "persistent": true, + "insertionIndex": 12 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/2-r_h_temp-testforktoorg.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/2-r_h_temp-testforktoorg.json new file mode 100644 index 0000000000..5493958a5c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/2-r_h_temp-testforktoorg.json @@ -0,0 +1,48 @@ +{ + "id": "cbdbb4cf-d38c-475b-b74d-278b13ca1012", + "name": "repos_hub4j-test-org_temp-testforktoorg", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkToOrg", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "2-r_h_temp-testforktoorg.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02:42 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"8b676e0dd05afad713c4b11dfb1c1de9298be89376ed730f84838397c4c8f5c7\"", + "Last-Modified": "Fri, 20 Dec 2024 13:02:38 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4561", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "439", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "197A:24DD67:17503FB:1B2DFF8:67656AF1" + } + }, + "uuid": "cbdbb4cf-d38c-475b-b74d-278b13ca1012", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/7-orgs_nts-api-test-org.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/7-orgs_nts-api-test-org.json new file mode 100644 index 0000000000..b0029bc6b8 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/7-orgs_nts-api-test-org.json @@ -0,0 +1,48 @@ +{ + "id": "6eb047bb-0cb7-43d8-b19f-520b915b188b", + "name": "orgs_nts-api-test-org", + "request": { + "url": "/orgs/nts-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "7-orgs_nts-api-test-org.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02:44 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"a2d193e9546a2c5ce8c7be65939b8cae828c7028fafacea86617bebee3f18283\"", + "Last-Modified": "Wed, 11 Dec 2024 07:04:56 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4556", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "444", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "1985:2E6E0F:D8129:108F80:67656AF4" + } + }, + "uuid": "6eb047bb-0cb7-43d8-b19f-520b915b188b", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/8-r_h_t_forks.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/8-r_h_t_forks.json new file mode 100644 index 0000000000..b9722bf1aa --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/8-r_h_t_forks.json @@ -0,0 +1,52 @@ +{ + "id": "cbbf3824-9f52-4861-bbba-ed4ba00a633c", + "name": "repos_hub4j-test-org_temp-testforktoorg_forks", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkToOrg/forks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"organization\":\"nts-api-test-org\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 202, + "bodyFileName": "8-r_h_t_forks.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02:45 GMT", + "Content-Type": "application/json; charset=utf-8", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4555", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "445", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "1986:1F61D2:1660AC7:1A3E6F5:67656AF5" + } + }, + "uuid": "cbbf3824-9f52-4861-bbba-ed4ba00a633c", + "persistent": true, + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/9-r_n_temp-testforktoorg.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/9-r_n_temp-testforktoorg.json new file mode 100644 index 0000000000..d7a3c17927 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/9-r_n_temp-testforktoorg.json @@ -0,0 +1,51 @@ +{ + "id": "7d2f81fc-56fb-458d-9ba8-8bb0a8c4e8dc", + "name": "repos_nts-api-test-org_temp-testforktoorg", + "request": { + "url": "/repos/nts-api-test-org/temp-testForkToOrg", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "9-r_n_temp-testforktoorg.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02:46 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"18bcfe6236e0f7bd80bbdbd0501ee09516d7de82d0d1623493784d675b63c28a\"", + "Last-Modified": "Fri, 20 Dec 2024 13:02:45 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4554", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "446", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "198A:3BD1EB:26F993:2E9519:67656AF5" + } + }, + "uuid": "7d2f81fc-56fb-458d-9ba8-8bb0a8c4e8dc", + "persistent": true, + "scenarioName": "scenario-1-repos-nts-api-test-org-temp-testForkToOrg", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-nts-api-test-org-temp-testForkToOrg-2", + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/__files/1-user.json new file mode 100644 index 0000000000..a385d2bfd8 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": "Brisbane, AUS", + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 14, + "public_gists": 0, + "followers": 4, + "following": 11, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-12-15T04:04:44Z", + "private_gists": 0, + "total_private_repos": 2, + "owned_private_repos": 2, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/__files/2-r_h_temp-testsleep.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/__files/2-r_h_temp-testsleep.json new file mode 100644 index 0000000000..62b0ea59db --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/__files/2-r_h_temp-testsleep.json @@ -0,0 +1,161 @@ +{ + "id": 906237707, + "node_id": "R_kgDONgQXCw", + "name": "temp-testSleep", + "full_name": "hub4j-test-org/temp-testSleep", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testSleep", + "description": "A test repository for testing the github-api project: temp-testSleep", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/deployments", + "created_at": "2024-12-20T13:02:53Z", + "updated_at": "2024-12-20T13:02:57Z", + "pushed_at": "2024-12-20T13:02:53Z", + "git_url": "git://github.com/hub4j-test-org/temp-testSleep.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testSleep.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testSleep.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testSleep", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "custom_properties": {}, + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "security_and_analysis": { + "secret_scanning": { + "status": "disabled" + }, + "secret_scanning_push_protection": { + "status": "disabled" + }, + "dependabot_security_updates": { + "status": "disabled" + }, + "secret_scanning_non_provider_patterns": { + "status": "disabled" + }, + "secret_scanning_validity_checks": { + "status": "disabled" + } + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/mappings/1-user.json new file mode 100644 index 0000000000..8a5192537b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "920a33da-4635-4053-b3c8-668f75dbf5b1", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02:52 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"385e08560117e426bff1cdeb255753d2813a21fd716dab4fb6fbce27aa60b10f\"", + "Last-Modified": "Sun, 15 Dec 2024 04:04:44 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4548", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "452", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "19A4:1F61D2:1660C42:1A3E8D5:67656AFC" + } + }, + "uuid": "920a33da-4635-4053-b3c8-668f75dbf5b1", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/mappings/2-r_h_temp-testsleep.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/mappings/2-r_h_temp-testsleep.json new file mode 100644 index 0000000000..3c9ca6771f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/mappings/2-r_h_temp-testsleep.json @@ -0,0 +1,48 @@ +{ + "id": "eea96b7f-cbc6-45ef-9401-0588e5e7e57c", + "name": "repos_hub4j-test-org_temp-testsleep", + "request": { + "url": "/repos/hub4j-test-org/temp-testSleep", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "2-r_h_temp-testsleep.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02:57 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"86ebe2844fb2b26815d0bc5bd0b7f5068321ae8266fd34e43caa3663ae7500a9\"", + "Last-Modified": "Fri, 20 Dec 2024 13:02:57 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4543", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "457", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "19B1:139242:13ED1AF:176036E:67656B01" + } + }, + "uuid": "eea96b7f-cbc6-45ef-9401-0588e5e7e57c", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/1-user.json new file mode 100644 index 0000000000..a385d2bfd8 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": "Brisbane, AUS", + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 14, + "public_gists": 0, + "followers": 4, + "following": 11, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-12-15T04:04:44Z", + "private_gists": 0, + "total_private_repos": 2, + "owned_private_repos": 2, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/2-r_h_temp-testtimeoutmessage.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/2-r_h_temp-testtimeoutmessage.json new file mode 100644 index 0000000000..a19bd2b1e8 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/2-r_h_temp-testtimeoutmessage.json @@ -0,0 +1,161 @@ +{ + "id": 906238015, + "node_id": "R_kgDONgQYPw", + "name": "temp-testTimeoutMessage", + "full_name": "hub4j-test-org/temp-testTimeoutMessage", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testTimeoutMessage", + "description": "A test repository for testing the github-api project: temp-testTimeoutMessage", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/deployments", + "created_at": "2024-12-20T13:03:45Z", + "updated_at": "2024-12-20T13:03:48Z", + "pushed_at": "2024-12-20T13:03:45Z", + "git_url": "git://github.com/hub4j-test-org/temp-testTimeoutMessage.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testTimeoutMessage.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testTimeoutMessage.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testTimeoutMessage", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "custom_properties": {}, + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "security_and_analysis": { + "secret_scanning": { + "status": "disabled" + }, + "secret_scanning_push_protection": { + "status": "disabled" + }, + "dependabot_security_updates": { + "status": "disabled" + }, + "secret_scanning_non_provider_patterns": { + "status": "disabled" + }, + "secret_scanning_validity_checks": { + "status": "disabled" + } + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/7-r_h_t_forks.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/7-r_h_t_forks.json new file mode 100644 index 0000000000..d035851ade --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/7-r_h_t_forks.json @@ -0,0 +1,312 @@ +{ + "id": 906238046, + "node_id": "R_kgDONgQYXg", + "name": "test-message", + "full_name": "Alaurant/test-message", + "private": false, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/test-message", + "description": "A test repository for testing the github-api project: temp-testTimeoutMessage", + "fork": true, + "url": "https://api.github.com/repos/Alaurant/test-message", + "forks_url": "https://api.github.com/repos/Alaurant/test-message/forks", + "keys_url": "https://api.github.com/repos/Alaurant/test-message/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/test-message/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/test-message/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/test-message/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/test-message/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/test-message/events", + "assignees_url": "https://api.github.com/repos/Alaurant/test-message/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/test-message/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/test-message/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/test-message/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/test-message/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/test-message/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/test-message/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/test-message/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/test-message/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/test-message/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/test-message/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/test-message/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/test-message/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/test-message/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/test-message/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/test-message/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/test-message/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/test-message/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/test-message/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/test-message/merges", + "archive_url": "https://api.github.com/repos/Alaurant/test-message/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/test-message/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/test-message/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/test-message/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/test-message/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/test-message/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/test-message/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/test-message/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/test-message/deployments", + "created_at": "2024-12-20T13:03:51Z", + "updated_at": "2024-12-20T13:03:52Z", + "pushed_at": "2024-12-20T13:03:50Z", + "git_url": "git://github.com/Alaurant/test-message.git", + "ssh_url": "git@github.com:Alaurant/test-message.git", + "clone_url": "https://github.com/Alaurant/test-message.git", + "svn_url": "https://github.com/Alaurant/test-message", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "parent": { + "id": 906238015, + "node_id": "R_kgDONgQYPw", + "name": "temp-testTimeoutMessage", + "full_name": "hub4j-test-org/temp-testTimeoutMessage", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testTimeoutMessage", + "description": "A test repository for testing the github-api project: temp-testTimeoutMessage", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/deployments", + "created_at": "2024-12-20T13:03:45Z", + "updated_at": "2024-12-20T13:03:48Z", + "pushed_at": "2024-12-20T13:03:50Z", + "git_url": "git://github.com/hub4j-test-org/temp-testTimeoutMessage.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testTimeoutMessage.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testTimeoutMessage.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testTimeoutMessage", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "source": { + "id": 906238015, + "node_id": "R_kgDONgQYPw", + "name": "temp-testTimeoutMessage", + "full_name": "hub4j-test-org/temp-testTimeoutMessage", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testTimeoutMessage", + "description": "A test repository for testing the github-api project: temp-testTimeoutMessage", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/deployments", + "created_at": "2024-12-20T13:03:45Z", + "updated_at": "2024-12-20T13:03:48Z", + "pushed_at": "2024-12-20T13:03:51Z", + "git_url": "git://github.com/hub4j-test-org/temp-testTimeoutMessage.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testTimeoutMessage.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testTimeoutMessage.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testTimeoutMessage", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "network_count": 0, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/8-r_a_test-message.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/8-r_a_test-message.json new file mode 100644 index 0000000000..a33a7e2330 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/8-r_a_test-message.json @@ -0,0 +1,341 @@ +{ + "id": 906238046, + "node_id": "R_kgDONgQYXg", + "name": "test-message", + "full_name": "Alaurant/test-message", + "private": false, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/test-message", + "description": "A test repository for testing the github-api project: temp-testTimeoutMessage", + "fork": true, + "url": "https://api.github.com/repos/Alaurant/test-message", + "forks_url": "https://api.github.com/repos/Alaurant/test-message/forks", + "keys_url": "https://api.github.com/repos/Alaurant/test-message/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/test-message/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/test-message/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/test-message/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/test-message/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/test-message/events", + "assignees_url": "https://api.github.com/repos/Alaurant/test-message/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/test-message/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/test-message/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/test-message/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/test-message/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/test-message/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/test-message/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/test-message/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/test-message/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/test-message/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/test-message/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/test-message/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/test-message/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/test-message/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/test-message/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/test-message/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/test-message/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/test-message/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/test-message/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/test-message/merges", + "archive_url": "https://api.github.com/repos/Alaurant/test-message/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/test-message/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/test-message/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/test-message/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/test-message/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/test-message/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/test-message/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/test-message/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/test-message/deployments", + "created_at": "2024-12-20T13:03:51Z", + "updated_at": "2024-12-20T13:03:52Z", + "pushed_at": "2024-12-20T13:03:50Z", + "git_url": "git://github.com/Alaurant/test-message.git", + "ssh_url": "git@github.com:Alaurant/test-message.git", + "clone_url": "https://github.com/Alaurant/test-message.git", + "svn_url": "https://github.com/Alaurant/test-message", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "parent": { + "id": 906238015, + "node_id": "R_kgDONgQYPw", + "name": "temp-testTimeoutMessage", + "full_name": "hub4j-test-org/temp-testTimeoutMessage", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testTimeoutMessage", + "description": "A test repository for testing the github-api project: temp-testTimeoutMessage", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/deployments", + "created_at": "2024-12-20T13:03:45Z", + "updated_at": "2024-12-20T13:03:48Z", + "pushed_at": "2024-12-20T13:03:51Z", + "git_url": "git://github.com/hub4j-test-org/temp-testTimeoutMessage.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testTimeoutMessage.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testTimeoutMessage.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testTimeoutMessage", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "source": { + "id": 906238015, + "node_id": "R_kgDONgQYPw", + "name": "temp-testTimeoutMessage", + "full_name": "hub4j-test-org/temp-testTimeoutMessage", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testTimeoutMessage", + "description": "A test repository for testing the github-api project: temp-testTimeoutMessage", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/deployments", + "created_at": "2024-12-20T13:03:45Z", + "updated_at": "2024-12-20T13:03:48Z", + "pushed_at": "2024-12-20T13:03:51Z", + "git_url": "git://github.com/hub4j-test-org/temp-testTimeoutMessage.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testTimeoutMessage.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testTimeoutMessage.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testTimeoutMessage", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "security_and_analysis": { + "secret_scanning": { + "status": "enabled" + }, + "secret_scanning_push_protection": { + "status": "enabled" + }, + "dependabot_security_updates": { + "status": "disabled" + }, + "secret_scanning_non_provider_patterns": { + "status": "disabled" + }, + "secret_scanning_validity_checks": { + "status": "disabled" + } + }, + "network_count": 1, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/1-user.json new file mode 100644 index 0000000000..c4d20025e3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "ec8a0b27-5d8c-445c-9e00-0525603e6dff", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:43 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"385e08560117e426bff1cdeb255753d2813a21fd716dab4fb6fbce27aa60b10f\"", + "Last-Modified": "Sun, 15 Dec 2024 04:04:44 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4487", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "513", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "1861:32E7C9:14E692D:187C22E:67656B2F" + } + }, + "uuid": "ec8a0b27-5d8c-445c-9e00-0525603e6dff", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/2-r_h_temp-testtimeoutmessage.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/2-r_h_temp-testtimeoutmessage.json new file mode 100644 index 0000000000..877814016f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/2-r_h_temp-testtimeoutmessage.json @@ -0,0 +1,48 @@ +{ + "id": "e8659a91-fe4e-4444-8b49-2bad02689ffe", + "name": "repos_hub4j-test-org_temp-testtimeoutmessage", + "request": { + "url": "/repos/hub4j-test-org/temp-testTimeoutMessage", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "2-r_h_temp-testtimeoutmessage.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:49 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"56ea75b5d16128b494b9d90ed5dcc3b6217ed8948ebc17b00604aba01ca2a55d\"", + "Last-Modified": "Fri, 20 Dec 2024 13:03:48 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4482", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "518", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "186E:27FAA5:578049:68006F:67656B35" + } + }, + "uuid": "e8659a91-fe4e-4444-8b49-2bad02689ffe", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/7-r_h_t_forks.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/7-r_h_t_forks.json new file mode 100644 index 0000000000..bb27e7597f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/7-r_h_t_forks.json @@ -0,0 +1,52 @@ +{ + "id": "0a5273fe-ee5d-43c3-b6c9-be91be770726", + "name": "repos_hub4j-test-org_temp-testtimeoutmessage_forks", + "request": { + "url": "/repos/hub4j-test-org/temp-testTimeoutMessage/forks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"name\":\"test-message\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 202, + "bodyFileName": "7-r_h_t_forks.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:52 GMT", + "Content-Type": "application/json; charset=utf-8", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4477", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "523", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "187B:2C3D90:F887C7:12363DA:67656B37" + } + }, + "uuid": "0a5273fe-ee5d-43c3-b6c9-be91be770726", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/8-r_a_test-message.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/8-r_a_test-message.json new file mode 100644 index 0000000000..fa201a1743 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/8-r_a_test-message.json @@ -0,0 +1,48 @@ +{ + "id": "dc4377aa-727f-42c9-b91e-6ef5c92826da", + "name": "repos_alaurant_test-message", + "request": { + "url": "/repos/Alaurant/test-message", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 404, + "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/rest/reference/repos#get-a-repository\"}", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:53 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"897c68bbc417e21f9fd33fe6a2eee4d9abafcaaf6d920fbe747fa7d53410af47\"", + "Last-Modified": "Fri, 20 Dec 2024 13:03:52 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4476", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "524", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "187F:32E7C9:14E6BD1:187C555:67656B38" + } + }, + "uuid": "dc4377aa-727f-42c9-b91e-6ef5c92826da", + "persistent": true, + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/1-user.json new file mode 100644 index 0000000000..a385d2bfd8 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": "Brisbane, AUS", + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 14, + "public_gists": 0, + "followers": 4, + "following": 11, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-12-15T04:04:44Z", + "private_gists": 0, + "total_private_repos": 2, + "owned_private_repos": 2, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/2-r_h_temp-testtimeoutorgmessage.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/2-r_h_temp-testtimeoutorgmessage.json new file mode 100644 index 0000000000..c6bff04068 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/2-r_h_temp-testtimeoutorgmessage.json @@ -0,0 +1,161 @@ +{ + "id": 906237854, + "node_id": "R_kgDONgQXng", + "name": "temp-testTimeoutOrgMessage", + "full_name": "hub4j-test-org/temp-testTimeoutOrgMessage", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testTimeoutOrgMessage", + "description": "A test repository for testing the github-api project: temp-testTimeoutOrgMessage", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/deployments", + "created_at": "2024-12-20T13:03:18Z", + "updated_at": "2024-12-20T13:03:18Z", + "pushed_at": "2024-12-20T13:03:18Z", + "git_url": "git://github.com/hub4j-test-org/temp-testTimeoutOrgMessage.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testTimeoutOrgMessage.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testTimeoutOrgMessage.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testTimeoutOrgMessage", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "custom_properties": {}, + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "security_and_analysis": { + "secret_scanning": { + "status": "disabled" + }, + "secret_scanning_push_protection": { + "status": "disabled" + }, + "dependabot_security_updates": { + "status": "disabled" + }, + "secret_scanning_non_provider_patterns": { + "status": "disabled" + }, + "secret_scanning_validity_checks": { + "status": "disabled" + } + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/7-orgs_nts-api-test-org.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/7-orgs_nts-api-test-org.json new file mode 100644 index 0000000000..6ce9af2a9e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/7-orgs_nts-api-test-org.json @@ -0,0 +1,61 @@ +{ + "login": "nts-api-test-org", + "id": 191328158, + "node_id": "O_kgDOC2dvng", + "url": "https://api.github.com/orgs/nts-api-test-org", + "repos_url": "https://api.github.com/orgs/nts-api-test-org/repos", + "events_url": "https://api.github.com/orgs/nts-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/nts-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/nts-api-test-org/issues", + "members_url": "https://api.github.com/orgs/nts-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/nts-api-test-org/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/191328158?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 5, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/nts-api-test-org", + "created_at": "2024-12-11T07:04:56Z", + "updated_at": "2024-12-11T07:04:56Z", + "archived_at": null, + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 0, + "collaborators": 0, + "billing_email": "zhaody085@163.com", + "default_repository_permission": "read", + "members_can_create_repositories": true, + "two_factor_requirement_enabled": false, + "members_allowed_repository_creation_type": "all", + "members_can_create_public_repositories": true, + "members_can_create_private_repositories": true, + "members_can_create_internal_repositories": false, + "members_can_create_pages": true, + "members_can_fork_private_repositories": false, + "web_commit_signoff_required": false, + "deploy_keys_enabled_for_repositories": false, + "members_can_create_public_pages": true, + "members_can_create_private_pages": true, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 10000, + "filled_seats": 1, + "seats": 0 + }, + "advanced_security_enabled_for_new_repositories": false, + "dependabot_alerts_enabled_for_new_repositories": false, + "dependabot_security_updates_enabled_for_new_repositories": false, + "dependency_graph_enabled_for_new_repositories": false, + "secret_scanning_enabled_for_new_repositories": false, + "secret_scanning_push_protection_enabled_for_new_repositories": false, + "secret_scanning_push_protection_custom_link_enabled": false, + "secret_scanning_push_protection_custom_link": null, + "secret_scanning_validity_checks_enabled": false +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/8-r_h_t_forks.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/8-r_h_t_forks.json new file mode 100644 index 0000000000..74f4626f79 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/8-r_h_t_forks.json @@ -0,0 +1,334 @@ +{ + "id": 906237909, + "node_id": "R_kgDONgQX1Q", + "name": "temp-testTimeoutOrgMessage-2", + "full_name": "nts-api-test-org/temp-testTimeoutOrgMessage-2", + "private": false, + "owner": { + "login": "nts-api-test-org", + "id": 191328158, + "node_id": "O_kgDOC2dvng", + "avatar_url": "https://avatars.githubusercontent.com/u/191328158?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/nts-api-test-org", + "html_url": "https://github.com/nts-api-test-org", + "followers_url": "https://api.github.com/users/nts-api-test-org/followers", + "following_url": "https://api.github.com/users/nts-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/nts-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/nts-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nts-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/nts-api-test-org/orgs", + "repos_url": "https://api.github.com/users/nts-api-test-org/repos", + "events_url": "https://api.github.com/users/nts-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/nts-api-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/nts-api-test-org/temp-testTimeoutOrgMessage-2", + "description": "A test repository for testing the github-api project: temp-testTimeoutOrgMessage", + "fork": true, + "url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2", + "forks_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/forks", + "keys_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/teams", + "hooks_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/hooks", + "issue_events_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/issues/events{/number}", + "events_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/events", + "assignees_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/assignees{/user}", + "branches_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/branches{/branch}", + "tags_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/tags", + "blobs_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/statuses/{sha}", + "languages_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/languages", + "stargazers_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/stargazers", + "contributors_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/contributors", + "subscribers_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/subscribers", + "subscription_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/subscription", + "commits_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/contents/{+path}", + "compare_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/merges", + "archive_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/downloads", + "issues_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/issues{/number}", + "pulls_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/pulls{/number}", + "milestones_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/milestones{/number}", + "notifications_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/labels{/name}", + "releases_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/releases{/id}", + "deployments_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage-2/deployments", + "created_at": "2024-12-20T13:03:25Z", + "updated_at": "2024-12-20T13:03:25Z", + "pushed_at": "2024-12-20T13:03:24Z", + "git_url": "git://github.com/nts-api-test-org/temp-testTimeoutOrgMessage-2.git", + "ssh_url": "git@github.com:nts-api-test-org/temp-testTimeoutOrgMessage-2.git", + "clone_url": "https://github.com/nts-api-test-org/temp-testTimeoutOrgMessage-2.git", + "svn_url": "https://github.com/nts-api-test-org/temp-testTimeoutOrgMessage-2", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "custom_properties": {}, + "organization": { + "login": "nts-api-test-org", + "id": 191328158, + "node_id": "O_kgDOC2dvng", + "avatar_url": "https://avatars.githubusercontent.com/u/191328158?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/nts-api-test-org", + "html_url": "https://github.com/nts-api-test-org", + "followers_url": "https://api.github.com/users/nts-api-test-org/followers", + "following_url": "https://api.github.com/users/nts-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/nts-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/nts-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nts-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/nts-api-test-org/orgs", + "repos_url": "https://api.github.com/users/nts-api-test-org/repos", + "events_url": "https://api.github.com/users/nts-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/nts-api-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "parent": { + "id": 906237854, + "node_id": "R_kgDONgQXng", + "name": "temp-testTimeoutOrgMessage", + "full_name": "hub4j-test-org/temp-testTimeoutOrgMessage", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testTimeoutOrgMessage", + "description": "A test repository for testing the github-api project: temp-testTimeoutOrgMessage", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/deployments", + "created_at": "2024-12-20T13:03:18Z", + "updated_at": "2024-12-20T13:03:22Z", + "pushed_at": "2024-12-20T13:03:24Z", + "git_url": "git://github.com/hub4j-test-org/temp-testTimeoutOrgMessage.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testTimeoutOrgMessage.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testTimeoutOrgMessage.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testTimeoutOrgMessage", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "source": { + "id": 906237854, + "node_id": "R_kgDONgQXng", + "name": "temp-testTimeoutOrgMessage", + "full_name": "hub4j-test-org/temp-testTimeoutOrgMessage", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testTimeoutOrgMessage", + "description": "A test repository for testing the github-api project: temp-testTimeoutOrgMessage", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/deployments", + "created_at": "2024-12-20T13:03:18Z", + "updated_at": "2024-12-20T13:03:22Z", + "pushed_at": "2024-12-20T13:03:24Z", + "git_url": "git://github.com/hub4j-test-org/temp-testTimeoutOrgMessage.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testTimeoutOrgMessage.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testTimeoutOrgMessage.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testTimeoutOrgMessage", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main" + }, + "network_count": 0, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/9-r_n_temp-testtimeoutorgmessage.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/9-r_n_temp-testtimeoutorgmessage.json new file mode 100644 index 0000000000..f7ae382e60 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/9-r_n_temp-testtimeoutorgmessage.json @@ -0,0 +1,161 @@ +{ + "id": 906230271, + "node_id": "R_kgDONgP5_w", + "name": "temp-testTimeoutOrgMessage", + "full_name": "nts-api-test-org/temp-testTimeoutOrgMessage", + "private": false, + "owner": { + "login": "nts-api-test-org", + "id": 191328158, + "node_id": "O_kgDOC2dvng", + "avatar_url": "https://avatars.githubusercontent.com/u/191328158?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/nts-api-test-org", + "html_url": "https://github.com/nts-api-test-org", + "followers_url": "https://api.github.com/users/nts-api-test-org/followers", + "following_url": "https://api.github.com/users/nts-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/nts-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/nts-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nts-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/nts-api-test-org/orgs", + "repos_url": "https://api.github.com/users/nts-api-test-org/repos", + "events_url": "https://api.github.com/users/nts-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/nts-api-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/nts-api-test-org/temp-testTimeoutOrgMessage", + "description": "A test repository for testing the github-api project: temp-testTimeoutOrgMessage", + "fork": false, + "url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage", + "forks_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/forks", + "keys_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/teams", + "hooks_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/hooks", + "issue_events_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/issues/events{/number}", + "events_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/events", + "assignees_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/assignees{/user}", + "branches_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/branches{/branch}", + "tags_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/tags", + "blobs_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/statuses/{sha}", + "languages_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/languages", + "stargazers_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/stargazers", + "contributors_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/contributors", + "subscribers_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/subscribers", + "subscription_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/subscription", + "commits_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/contents/{+path}", + "compare_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/merges", + "archive_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/downloads", + "issues_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/issues{/number}", + "pulls_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/pulls{/number}", + "milestones_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/milestones{/number}", + "notifications_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/labels{/name}", + "releases_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/releases{/id}", + "deployments_url": "https://api.github.com/repos/nts-api-test-org/temp-testTimeoutOrgMessage/deployments", + "created_at": "2024-12-20T12:43:24Z", + "updated_at": "2024-12-20T12:43:24Z", + "pushed_at": "2024-12-20T12:43:23Z", + "git_url": "git://github.com/nts-api-test-org/temp-testTimeoutOrgMessage.git", + "ssh_url": "git@github.com:nts-api-test-org/temp-testTimeoutOrgMessage.git", + "clone_url": "https://github.com/nts-api-test-org/temp-testTimeoutOrgMessage.git", + "svn_url": "https://github.com/nts-api-test-org/temp-testTimeoutOrgMessage", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "custom_properties": {}, + "organization": { + "login": "nts-api-test-org", + "id": 191328158, + "node_id": "O_kgDOC2dvng", + "avatar_url": "https://avatars.githubusercontent.com/u/191328158?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/nts-api-test-org", + "html_url": "https://github.com/nts-api-test-org", + "followers_url": "https://api.github.com/users/nts-api-test-org/followers", + "following_url": "https://api.github.com/users/nts-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/nts-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/nts-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nts-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/nts-api-test-org/orgs", + "repos_url": "https://api.github.com/users/nts-api-test-org/repos", + "events_url": "https://api.github.com/users/nts-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/nts-api-test-org/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "security_and_analysis": { + "secret_scanning": { + "status": "disabled" + }, + "secret_scanning_push_protection": { + "status": "disabled" + }, + "dependabot_security_updates": { + "status": "disabled" + }, + "secret_scanning_non_provider_patterns": { + "status": "disabled" + }, + "secret_scanning_validity_checks": { + "status": "disabled" + } + }, + "network_count": 0, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/1-user.json new file mode 100644 index 0000000000..6bd90c04ee --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "ebd5332a-d8a9-4cfc-acec-aac3c3df337d", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:16 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"385e08560117e426bff1cdeb255753d2813a21fd716dab4fb6fbce27aa60b10f\"", + "Last-Modified": "Sun, 15 Dec 2024 04:04:44 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4519", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "481", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "17FD:24DD67:1750CD9:1B2EAF3:67656B14" + } + }, + "uuid": "ebd5332a-d8a9-4cfc-acec-aac3c3df337d", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/2-r_h_temp-testtimeoutorgmessage.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/2-r_h_temp-testtimeoutorgmessage.json new file mode 100644 index 0000000000..f65cf8646c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/2-r_h_temp-testtimeoutorgmessage.json @@ -0,0 +1,48 @@ +{ + "id": "6fb39171-0d03-4034-b599-d997a13e1c23", + "name": "repos_hub4j-test-org_temp-testtimeoutorgmessage", + "request": { + "url": "/repos/hub4j-test-org/temp-testTimeoutOrgMessage", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "2-r_h_temp-testtimeoutorgmessage.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:22 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"7378a59c2455bdcbe4d4476a907a49e1404a321cf5c489fbe7f920f48e57a719\"", + "Last-Modified": "Fri, 20 Dec 2024 13:03:18 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4514", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "486", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "180D:245A47:15F5177:19D2FEB:67656B1A" + } + }, + "uuid": "6fb39171-0d03-4034-b599-d997a13e1c23", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/7-orgs_nts-api-test-org.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/7-orgs_nts-api-test-org.json new file mode 100644 index 0000000000..787ad120aa --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/7-orgs_nts-api-test-org.json @@ -0,0 +1,48 @@ +{ + "id": "d6996ef4-8737-41a7-a8ea-154b34e6dccb", + "name": "orgs_nts-api-test-org", + "request": { + "url": "/orgs/nts-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "7-orgs_nts-api-test-org.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:25 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"a2d193e9546a2c5ce8c7be65939b8cae828c7028fafacea86617bebee3f18283\"", + "Last-Modified": "Wed, 11 Dec 2024 07:04:56 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4509", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "491", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "1818:4C45C:179A3D7:1B78284:67656B1C" + } + }, + "uuid": "d6996ef4-8737-41a7-a8ea-154b34e6dccb", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/8-r_h_t_forks.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/8-r_h_t_forks.json new file mode 100644 index 0000000000..38d55d277c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/8-r_h_t_forks.json @@ -0,0 +1,52 @@ +{ + "id": "7d927adc-c6ad-473d-b682-9d3ec2b9022a", + "name": "repos_hub4j-test-org_temp-testtimeoutorgmessage_forks", + "request": { + "url": "/repos/hub4j-test-org/temp-testTimeoutOrgMessage/forks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"organization\":\"nts-api-test-org\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 202, + "bodyFileName": "8-r_h_t_forks.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:25 GMT", + "Content-Type": "application/json; charset=utf-8", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4508", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "492", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "1819:139242:13EDB7B:1760EE9:67656B1D" + } + }, + "uuid": "7d927adc-c6ad-473d-b682-9d3ec2b9022a", + "persistent": true, + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/9-r_n_temp-testtimeoutorgmessage.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/9-r_n_temp-testtimeoutorgmessage.json new file mode 100644 index 0000000000..7e0b630b37 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/9-r_n_temp-testtimeoutorgmessage.json @@ -0,0 +1,48 @@ +{ + "id": "e56316fc-1257-4501-ac91-b1e08369f523", + "name": "repos_nts-api-test-org_temp-testtimeoutorgmessage", + "request": { + "url": "/repos/nts-api-test-org/temp-testTimeoutOrgMessage", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 404, + "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/rest/reference/repos#get-a-repository\"}", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:26 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"da073a61f98b326c509ca90e3f9423a2c3c6fcc816e0146fdb19804a400adaae\"", + "Last-Modified": "Fri, 20 Dec 2024 12:43:24 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4507", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "493", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "181D:2CFAFD:E7811E:111A3A5:67656B1E" + } + }, + "uuid": "e56316fc-1257-4501-ac91-b1e08369f523", + "persistent": true, + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/1-user.json new file mode 100644 index 0000000000..39d6c8353e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/1-user.json @@ -0,0 +1,45 @@ +{ + "login": "bitwiseman", + "id": 1958953, + "node_id": "MDQ6VXNlcjE5NTg5NTM=", + "avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/bitwiseman", + "html_url": "https://github.com/bitwiseman", + "followers_url": "https://api.github.com/users/bitwiseman/followers", + "following_url": "https://api.github.com/users/bitwiseman/following{/other_user}", + "gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}", + "starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions", + "organizations_url": "https://api.github.com/users/bitwiseman/orgs", + "repos_url": "https://api.github.com/users/bitwiseman/repos", + "events_url": "https://api.github.com/users/bitwiseman/events{/privacy}", + "received_events_url": "https://api.github.com/users/bitwiseman/received_events", + "type": "User", + "site_admin": false, + "name": "Liam Newman", + "company": "Cloudbees, Inc.", + "blog": "", + "location": "Seattle, WA, USA", + "email": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 167, + "public_gists": 4, + "followers": 136, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2019-09-24T19:32:29Z", + "private_gists": 7, + "total_private_repos": 9, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/10-users_kohsuke.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/10-users_kohsuke.json new file mode 100644 index 0000000000..b0bb3da441 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/10-users_kohsuke.json @@ -0,0 +1,34 @@ +{ + "login": "kohsuke", + "id": 50003, + "node_id": "MDQ6VXNlcjUwMDAz", + "avatar_url": "https://avatars.githubusercontent.com/u/50003?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/kohsuke", + "html_url": "https://github.com/kohsuke", + "followers_url": "https://api.github.com/users/kohsuke/followers", + "following_url": "https://api.github.com/users/kohsuke/following{/other_user}", + "gists_url": "https://api.github.com/users/kohsuke/gists{/gist_id}", + "starred_url": "https://api.github.com/users/kohsuke/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/kohsuke/subscriptions", + "organizations_url": "https://api.github.com/users/kohsuke/orgs", + "repos_url": "https://api.github.com/users/kohsuke/repos", + "events_url": "https://api.github.com/users/kohsuke/events{/privacy}", + "received_events_url": "https://api.github.com/users/kohsuke/received_events", + "type": "User", + "site_admin": false, + "name": "Kohsuke Kawaguchi", + "company": "@launchableinc ", + "blog": "https://www.kohsuke.org/", + "location": "San Jose, California", + "email": "kk@kohsuke.org", + "hireable": null, + "bio": null, + "twitter_username": null, + "public_repos": 265, + "public_gists": 113, + "followers": 1999, + "following": 3, + "created_at": "2009-01-28T18:53:21Z", + "updated_at": "2022-04-10T22:58:15Z" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/2-orgs_hub4j.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/2-orgs_hub4j.json new file mode 100644 index 0000000000..2efefa017a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/2-orgs_hub4j.json @@ -0,0 +1,41 @@ +{ + "login": "hub4j", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "url": "https://api.github.com/orgs/hub4j", + "repos_url": "https://api.github.com/orgs/hub4j/repos", + "events_url": "https://api.github.com/orgs/hub4j/events", + "hooks_url": "https://api.github.com/orgs/hub4j/hooks", + "issues_url": "https://api.github.com/orgs/hub4j/issues", + "members_url": "https://api.github.com/orgs/hub4j/members{/member}", + "public_members_url": "https://api.github.com/orgs/hub4j/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 1, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/hub4j", + "created_at": "2019-09-04T18:12:34Z", + "updated_at": "2019-09-04T18:12:34Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 11899, + "collaborators": 0, + "billing_email": "bitwiseman@gmail.com", + "default_repository_permission": "read", + "members_can_create_repositories": true, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 2, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/3-r_h_github-api.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/3-r_h_github-api.json new file mode 100644 index 0000000000..a832870b2d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/3-r_h_github-api.json @@ -0,0 +1,130 @@ +{ + "id": 617210, + "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", + "name": "github-api", + "full_name": "hub4j/github-api", + "private": false, + "owner": { + "login": "hub4j", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j", + "html_url": "https://github.com/hub4j", + "followers_url": "https://api.github.com/users/hub4j/followers", + "following_url": "https://api.github.com/users/hub4j/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j/orgs", + "repos_url": "https://api.github.com/users/hub4j/repos", + "events_url": "https://api.github.com/users/hub4j/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j/github-api", + "description": "Java API for GitHub", + "fork": false, + "url": "https://api.github.com/repos/hub4j/github-api", + "forks_url": "https://api.github.com/repos/hub4j/github-api/forks", + "keys_url": "https://api.github.com/repos/hub4j/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j/github-api/teams", + "hooks_url": "https://api.github.com/repos/hub4j/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j/github-api/events", + "assignees_url": "https://api.github.com/repos/hub4j/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j/github-api/tags", + "blobs_url": "https://api.github.com/repos/hub4j/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j/github-api/languages", + "stargazers_url": "https://api.github.com/repos/hub4j/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j/github-api/contributors?anon=true", + "subscribers_url": "https://api.github.com/repos/hub4j/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j/github-api/subscription", + "commits_url": "https://api.github.com/repos/hub4j/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j/github-api/merges", + "archive_url": "https://api.github.com/repos/hub4j/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j/github-api/downloads", + "issues_url": "https://api.github.com/repos/hub4j/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", + "created_at": "2010-04-19T04:13:03Z", + "updated_at": "2019-10-03T09:41:10Z", + "pushed_at": "2019-10-02T22:27:45Z", + "git_url": "git://github.com/hub4j/github-api.git", + "ssh_url": "git@github.com:hub4j/github-api.git", + "clone_url": "https://github.com/hub4j/github-api.git", + "svn_url": "https://github.com/hub4j/github-api", + "homepage": "http://github-api.kohsuke.org/", + "size": 11899, + "stargazers_count": 557, + "watchers_count": 557, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 428, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 90, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 428, + "open_issues": 90, + "watchers": 557, + "default_branch": "main", + "permissions": { + "admin": true, + "push": true, + "pull": true + }, + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "organization": { + "login": "hub4j", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j", + "html_url": "https://github.com/hub4j", + "followers_url": "https://api.github.com/users/hub4j/followers", + "following_url": "https://api.github.com/users/hub4j/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j/orgs", + "repos_url": "https://api.github.com/users/hub4j/repos", + "events_url": "https://api.github.com/users/hub4j/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 428, + "subscribers_count": 50 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/4-r_h_g_contributors.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/4-r_h_g_contributors.json new file mode 100644 index 0000000000..b2c2b6c819 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/4-r_h_g_contributors.json @@ -0,0 +1,638 @@ +[ + { + "email":"joebob@example.org", + "name":"Joseph Roberts", + "type":"Anonymous", + "contributions":3 + }, + { + "login": "kohsuke", + "id": 50003, + "node_id": "MDQ6VXNlcjUwMDAz", + "avatar_url": "https://avatars1.githubusercontent.com/u/50003?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/kohsuke", + "html_url": "https://github.com/kohsuke", + "followers_url": "https://api.github.com/users/kohsuke/followers", + "following_url": "https://api.github.com/users/kohsuke/following{/other_user}", + "gists_url": "https://api.github.com/users/kohsuke/gists{/gist_id}", + "starred_url": "https://api.github.com/users/kohsuke/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/kohsuke/subscriptions", + "organizations_url": "https://api.github.com/users/kohsuke/orgs", + "repos_url": "https://api.github.com/users/kohsuke/repos", + "events_url": "https://api.github.com/users/kohsuke/events{/privacy}", + "received_events_url": "https://api.github.com/users/kohsuke/received_events", + "type": "User", + "site_admin": false, + "contributions": 892 + }, + { + "login": "bitwiseman", + "id": 1958953, + "node_id": "MDQ6VXNlcjE5NTg5NTM=", + "avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/bitwiseman", + "html_url": "https://github.com/bitwiseman", + "followers_url": "https://api.github.com/users/bitwiseman/followers", + "following_url": "https://api.github.com/users/bitwiseman/following{/other_user}", + "gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}", + "starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions", + "organizations_url": "https://api.github.com/users/bitwiseman/orgs", + "repos_url": "https://api.github.com/users/bitwiseman/repos", + "events_url": "https://api.github.com/users/bitwiseman/events{/privacy}", + "received_events_url": "https://api.github.com/users/bitwiseman/received_events", + "type": "User", + "site_admin": false, + "contributions": 84 + }, + { + "login": "stephenc", + "id": 209336, + "node_id": "MDQ6VXNlcjIwOTMzNg==", + "avatar_url": "https://avatars2.githubusercontent.com/u/209336?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/stephenc", + "html_url": "https://github.com/stephenc", + "followers_url": "https://api.github.com/users/stephenc/followers", + "following_url": "https://api.github.com/users/stephenc/following{/other_user}", + "gists_url": "https://api.github.com/users/stephenc/gists{/gist_id}", + "starred_url": "https://api.github.com/users/stephenc/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/stephenc/subscriptions", + "organizations_url": "https://api.github.com/users/stephenc/orgs", + "repos_url": "https://api.github.com/users/stephenc/repos", + "events_url": "https://api.github.com/users/stephenc/events{/privacy}", + "received_events_url": "https://api.github.com/users/stephenc/received_events", + "type": "User", + "site_admin": false, + "contributions": 21 + }, + { + "login": "janinko", + "id": 644267, + "node_id": "MDQ6VXNlcjY0NDI2Nw==", + "avatar_url": "https://avatars2.githubusercontent.com/u/644267?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/janinko", + "html_url": "https://github.com/janinko", + "followers_url": "https://api.github.com/users/janinko/followers", + "following_url": "https://api.github.com/users/janinko/following{/other_user}", + "gists_url": "https://api.github.com/users/janinko/gists{/gist_id}", + "starred_url": "https://api.github.com/users/janinko/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/janinko/subscriptions", + "organizations_url": "https://api.github.com/users/janinko/orgs", + "repos_url": "https://api.github.com/users/janinko/repos", + "events_url": "https://api.github.com/users/janinko/events{/privacy}", + "received_events_url": "https://api.github.com/users/janinko/received_events", + "type": "User", + "site_admin": false, + "contributions": 20 + }, + { + "login": "farmdawgnation", + "id": 620189, + "node_id": "MDQ6VXNlcjYyMDE4OQ==", + "avatar_url": "https://avatars2.githubusercontent.com/u/620189?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/farmdawgnation", + "html_url": "https://github.com/farmdawgnation", + "followers_url": "https://api.github.com/users/farmdawgnation/followers", + "following_url": "https://api.github.com/users/farmdawgnation/following{/other_user}", + "gists_url": "https://api.github.com/users/farmdawgnation/gists{/gist_id}", + "starred_url": "https://api.github.com/users/farmdawgnation/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/farmdawgnation/subscriptions", + "organizations_url": "https://api.github.com/users/farmdawgnation/orgs", + "repos_url": "https://api.github.com/users/farmdawgnation/repos", + "events_url": "https://api.github.com/users/farmdawgnation/events{/privacy}", + "received_events_url": "https://api.github.com/users/farmdawgnation/received_events", + "type": "User", + "site_admin": false, + "contributions": 16 + }, + { + "login": "johnou", + "id": 323497, + "node_id": "MDQ6VXNlcjMyMzQ5Nw==", + "avatar_url": "https://avatars2.githubusercontent.com/u/323497?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/johnou", + "html_url": "https://github.com/johnou", + "followers_url": "https://api.github.com/users/johnou/followers", + "following_url": "https://api.github.com/users/johnou/following{/other_user}", + "gists_url": "https://api.github.com/users/johnou/gists{/gist_id}", + "starred_url": "https://api.github.com/users/johnou/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/johnou/subscriptions", + "organizations_url": "https://api.github.com/users/johnou/orgs", + "repos_url": "https://api.github.com/users/johnou/repos", + "events_url": "https://api.github.com/users/johnou/events{/privacy}", + "received_events_url": "https://api.github.com/users/johnou/received_events", + "type": "User", + "site_admin": false, + "contributions": 13 + }, + { + "login": "mocleiri", + "id": 250942, + "node_id": "MDQ6VXNlcjI1MDk0Mg==", + "avatar_url": "https://avatars0.githubusercontent.com/u/250942?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/mocleiri", + "html_url": "https://github.com/mocleiri", + "followers_url": "https://api.github.com/users/mocleiri/followers", + "following_url": "https://api.github.com/users/mocleiri/following{/other_user}", + "gists_url": "https://api.github.com/users/mocleiri/gists{/gist_id}", + "starred_url": "https://api.github.com/users/mocleiri/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/mocleiri/subscriptions", + "organizations_url": "https://api.github.com/users/mocleiri/orgs", + "repos_url": "https://api.github.com/users/mocleiri/repos", + "events_url": "https://api.github.com/users/mocleiri/events{/privacy}", + "received_events_url": "https://api.github.com/users/mocleiri/received_events", + "type": "User", + "site_admin": false, + "contributions": 12 + }, + { + "login": "KostyaSha", + "id": 231611, + "node_id": "MDQ6VXNlcjIzMTYxMQ==", + "avatar_url": "https://avatars2.githubusercontent.com/u/231611?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/KostyaSha", + "html_url": "https://github.com/KostyaSha", + "followers_url": "https://api.github.com/users/KostyaSha/followers", + "following_url": "https://api.github.com/users/KostyaSha/following{/other_user}", + "gists_url": "https://api.github.com/users/KostyaSha/gists{/gist_id}", + "starred_url": "https://api.github.com/users/KostyaSha/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/KostyaSha/subscriptions", + "organizations_url": "https://api.github.com/users/KostyaSha/orgs", + "repos_url": "https://api.github.com/users/KostyaSha/repos", + "events_url": "https://api.github.com/users/KostyaSha/events{/privacy}", + "received_events_url": "https://api.github.com/users/KostyaSha/received_events", + "type": "User", + "site_admin": false, + "contributions": 12 + }, + { + "login": "jsoref", + "id": 2119212, + "node_id": "MDQ6VXNlcjIxMTkyMTI=", + "avatar_url": "https://avatars0.githubusercontent.com/u/2119212?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/jsoref", + "html_url": "https://github.com/jsoref", + "followers_url": "https://api.github.com/users/jsoref/followers", + "following_url": "https://api.github.com/users/jsoref/following{/other_user}", + "gists_url": "https://api.github.com/users/jsoref/gists{/gist_id}", + "starred_url": "https://api.github.com/users/jsoref/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/jsoref/subscriptions", + "organizations_url": "https://api.github.com/users/jsoref/orgs", + "repos_url": "https://api.github.com/users/jsoref/repos", + "events_url": "https://api.github.com/users/jsoref/events{/privacy}", + "received_events_url": "https://api.github.com/users/jsoref/received_events", + "type": "User", + "site_admin": false, + "contributions": 11 + }, + { + "login": "dependabot-preview[bot]", + "id": 27856297, + "node_id": "MDM6Qm90Mjc4NTYyOTc=", + "avatar_url": "https://avatars3.githubusercontent.com/in/2141?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/dependabot-preview%5Bbot%5D", + "html_url": "https://github.com/apps/dependabot-preview", + "followers_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false, + "contributions": 10 + }, + { + "login": "lucamilanesio", + "id": 182893, + "node_id": "MDQ6VXNlcjE4Mjg5Mw==", + "avatar_url": "https://avatars3.githubusercontent.com/u/182893?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/lucamilanesio", + "html_url": "https://github.com/lucamilanesio", + "followers_url": "https://api.github.com/users/lucamilanesio/followers", + "following_url": "https://api.github.com/users/lucamilanesio/following{/other_user}", + "gists_url": "https://api.github.com/users/lucamilanesio/gists{/gist_id}", + "starred_url": "https://api.github.com/users/lucamilanesio/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/lucamilanesio/subscriptions", + "organizations_url": "https://api.github.com/users/lucamilanesio/orgs", + "repos_url": "https://api.github.com/users/lucamilanesio/repos", + "events_url": "https://api.github.com/users/lucamilanesio/events{/privacy}", + "received_events_url": "https://api.github.com/users/lucamilanesio/received_events", + "type": "User", + "site_admin": false, + "contributions": 9 + }, + { + "login": "Shredder121", + "id": 4105066, + "node_id": "MDQ6VXNlcjQxMDUwNjY=", + "avatar_url": "https://avatars2.githubusercontent.com/u/4105066?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Shredder121", + "html_url": "https://github.com/Shredder121", + "followers_url": "https://api.github.com/users/Shredder121/followers", + "following_url": "https://api.github.com/users/Shredder121/following{/other_user}", + "gists_url": "https://api.github.com/users/Shredder121/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Shredder121/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Shredder121/subscriptions", + "organizations_url": "https://api.github.com/users/Shredder121/orgs", + "repos_url": "https://api.github.com/users/Shredder121/repos", + "events_url": "https://api.github.com/users/Shredder121/events{/privacy}", + "received_events_url": "https://api.github.com/users/Shredder121/received_events", + "type": "User", + "site_admin": false, + "contributions": 9 + }, + { + "login": "rtyley", + "id": 52038, + "node_id": "MDQ6VXNlcjUyMDM4", + "avatar_url": "https://avatars3.githubusercontent.com/u/52038?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/rtyley", + "html_url": "https://github.com/rtyley", + "followers_url": "https://api.github.com/users/rtyley/followers", + "following_url": "https://api.github.com/users/rtyley/following{/other_user}", + "gists_url": "https://api.github.com/users/rtyley/gists{/gist_id}", + "starred_url": "https://api.github.com/users/rtyley/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/rtyley/subscriptions", + "organizations_url": "https://api.github.com/users/rtyley/orgs", + "repos_url": "https://api.github.com/users/rtyley/repos", + "events_url": "https://api.github.com/users/rtyley/events{/privacy}", + "received_events_url": "https://api.github.com/users/rtyley/received_events", + "type": "User", + "site_admin": false, + "contributions": 9 + }, + { + "login": "jglick", + "id": 154109, + "node_id": "MDQ6VXNlcjE1NDEwOQ==", + "avatar_url": "https://avatars1.githubusercontent.com/u/154109?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/jglick", + "html_url": "https://github.com/jglick", + "followers_url": "https://api.github.com/users/jglick/followers", + "following_url": "https://api.github.com/users/jglick/following{/other_user}", + "gists_url": "https://api.github.com/users/jglick/gists{/gist_id}", + "starred_url": "https://api.github.com/users/jglick/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/jglick/subscriptions", + "organizations_url": "https://api.github.com/users/jglick/orgs", + "repos_url": "https://api.github.com/users/jglick/repos", + "events_url": "https://api.github.com/users/jglick/events{/privacy}", + "received_events_url": "https://api.github.com/users/jglick/received_events", + "type": "User", + "site_admin": false, + "contributions": 8 + }, + { + "login": "oleg-nenashev", + "id": 3000480, + "node_id": "MDQ6VXNlcjMwMDA0ODA=", + "avatar_url": "https://avatars0.githubusercontent.com/u/3000480?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/oleg-nenashev", + "html_url": "https://github.com/oleg-nenashev", + "followers_url": "https://api.github.com/users/oleg-nenashev/followers", + "following_url": "https://api.github.com/users/oleg-nenashev/following{/other_user}", + "gists_url": "https://api.github.com/users/oleg-nenashev/gists{/gist_id}", + "starred_url": "https://api.github.com/users/oleg-nenashev/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/oleg-nenashev/subscriptions", + "organizations_url": "https://api.github.com/users/oleg-nenashev/orgs", + "repos_url": "https://api.github.com/users/oleg-nenashev/repos", + "events_url": "https://api.github.com/users/oleg-nenashev/events{/privacy}", + "received_events_url": "https://api.github.com/users/oleg-nenashev/received_events", + "type": "User", + "site_admin": false, + "contributions": 8 + }, + { + "login": "recena", + "id": 1021745, + "node_id": "MDQ6VXNlcjEwMjE3NDU=", + "avatar_url": "https://avatars3.githubusercontent.com/u/1021745?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/recena", + "html_url": "https://github.com/recena", + "followers_url": "https://api.github.com/users/recena/followers", + "following_url": "https://api.github.com/users/recena/following{/other_user}", + "gists_url": "https://api.github.com/users/recena/gists{/gist_id}", + "starred_url": "https://api.github.com/users/recena/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/recena/subscriptions", + "organizations_url": "https://api.github.com/users/recena/orgs", + "repos_url": "https://api.github.com/users/recena/repos", + "events_url": "https://api.github.com/users/recena/events{/privacy}", + "received_events_url": "https://api.github.com/users/recena/received_events", + "type": "User", + "site_admin": false, + "contributions": 7 + }, + { + "login": "vr100", + "id": 6443683, + "node_id": "MDQ6VXNlcjY0NDM2ODM=", + "avatar_url": "https://avatars2.githubusercontent.com/u/6443683?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/vr100", + "html_url": "https://github.com/vr100", + "followers_url": "https://api.github.com/users/vr100/followers", + "following_url": "https://api.github.com/users/vr100/following{/other_user}", + "gists_url": "https://api.github.com/users/vr100/gists{/gist_id}", + "starred_url": "https://api.github.com/users/vr100/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/vr100/subscriptions", + "organizations_url": "https://api.github.com/users/vr100/orgs", + "repos_url": "https://api.github.com/users/vr100/repos", + "events_url": "https://api.github.com/users/vr100/events{/privacy}", + "received_events_url": "https://api.github.com/users/vr100/received_events", + "type": "User", + "site_admin": false, + "contributions": 6 + }, + { + "login": "jgangemi", + "id": 1831839, + "node_id": "MDQ6VXNlcjE4MzE4Mzk=", + "avatar_url": "https://avatars0.githubusercontent.com/u/1831839?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/jgangemi", + "html_url": "https://github.com/jgangemi", + "followers_url": "https://api.github.com/users/jgangemi/followers", + "following_url": "https://api.github.com/users/jgangemi/following{/other_user}", + "gists_url": "https://api.github.com/users/jgangemi/gists{/gist_id}", + "starred_url": "https://api.github.com/users/jgangemi/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/jgangemi/subscriptions", + "organizations_url": "https://api.github.com/users/jgangemi/orgs", + "repos_url": "https://api.github.com/users/jgangemi/repos", + "events_url": "https://api.github.com/users/jgangemi/events{/privacy}", + "received_events_url": "https://api.github.com/users/jgangemi/received_events", + "type": "User", + "site_admin": false, + "contributions": 5 + }, + { + "login": "sns-seb", + "id": 11717580, + "node_id": "MDQ6VXNlcjExNzE3NTgw", + "avatar_url": "https://avatars2.githubusercontent.com/u/11717580?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/sns-seb", + "html_url": "https://github.com/sns-seb", + "followers_url": "https://api.github.com/users/sns-seb/followers", + "following_url": "https://api.github.com/users/sns-seb/following{/other_user}", + "gists_url": "https://api.github.com/users/sns-seb/gists{/gist_id}", + "starred_url": "https://api.github.com/users/sns-seb/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/sns-seb/subscriptions", + "organizations_url": "https://api.github.com/users/sns-seb/orgs", + "repos_url": "https://api.github.com/users/sns-seb/repos", + "events_url": "https://api.github.com/users/sns-seb/events{/privacy}", + "received_events_url": "https://api.github.com/users/sns-seb/received_events", + "type": "User", + "site_admin": false, + "contributions": 5 + }, + { + "login": "marc-guenther", + "id": 393230, + "node_id": "MDQ6VXNlcjM5MzIzMA==", + "avatar_url": "https://avatars3.githubusercontent.com/u/393230?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/marc-guenther", + "html_url": "https://github.com/marc-guenther", + "followers_url": "https://api.github.com/users/marc-guenther/followers", + "following_url": "https://api.github.com/users/marc-guenther/following{/other_user}", + "gists_url": "https://api.github.com/users/marc-guenther/gists{/gist_id}", + "starred_url": "https://api.github.com/users/marc-guenther/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/marc-guenther/subscriptions", + "organizations_url": "https://api.github.com/users/marc-guenther/orgs", + "repos_url": "https://api.github.com/users/marc-guenther/repos", + "events_url": "https://api.github.com/users/marc-guenther/events{/privacy}", + "received_events_url": "https://api.github.com/users/marc-guenther/received_events", + "type": "User", + "site_admin": false, + "contributions": 4 + }, + { + "login": "mmitche", + "id": 8725170, + "node_id": "MDQ6VXNlcjg3MjUxNzA=", + "avatar_url": "https://avatars1.githubusercontent.com/u/8725170?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/mmitche", + "html_url": "https://github.com/mmitche", + "followers_url": "https://api.github.com/users/mmitche/followers", + "following_url": "https://api.github.com/users/mmitche/following{/other_user}", + "gists_url": "https://api.github.com/users/mmitche/gists{/gist_id}", + "starred_url": "https://api.github.com/users/mmitche/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/mmitche/subscriptions", + "organizations_url": "https://api.github.com/users/mmitche/orgs", + "repos_url": "https://api.github.com/users/mmitche/repos", + "events_url": "https://api.github.com/users/mmitche/events{/privacy}", + "received_events_url": "https://api.github.com/users/mmitche/received_events", + "type": "User", + "site_admin": false, + "contributions": 4 + }, + { + "login": "lanwen", + "id": 1964214, + "node_id": "MDQ6VXNlcjE5NjQyMTQ=", + "avatar_url": "https://avatars1.githubusercontent.com/u/1964214?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/lanwen", + "html_url": "https://github.com/lanwen", + "followers_url": "https://api.github.com/users/lanwen/followers", + "following_url": "https://api.github.com/users/lanwen/following{/other_user}", + "gists_url": "https://api.github.com/users/lanwen/gists{/gist_id}", + "starred_url": "https://api.github.com/users/lanwen/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/lanwen/subscriptions", + "organizations_url": "https://api.github.com/users/lanwen/orgs", + "repos_url": "https://api.github.com/users/lanwen/repos", + "events_url": "https://api.github.com/users/lanwen/events{/privacy}", + "received_events_url": "https://api.github.com/users/lanwen/received_events", + "type": "User", + "site_admin": false, + "contributions": 4 + }, + { + "login": "suryagaddipati", + "id": 64078, + "node_id": "MDQ6VXNlcjY0MDc4", + "avatar_url": "https://avatars3.githubusercontent.com/u/64078?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/suryagaddipati", + "html_url": "https://github.com/suryagaddipati", + "followers_url": "https://api.github.com/users/suryagaddipati/followers", + "following_url": "https://api.github.com/users/suryagaddipati/following{/other_user}", + "gists_url": "https://api.github.com/users/suryagaddipati/gists{/gist_id}", + "starred_url": "https://api.github.com/users/suryagaddipati/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/suryagaddipati/subscriptions", + "organizations_url": "https://api.github.com/users/suryagaddipati/orgs", + "repos_url": "https://api.github.com/users/suryagaddipati/repos", + "events_url": "https://api.github.com/users/suryagaddipati/events{/privacy}", + "received_events_url": "https://api.github.com/users/suryagaddipati/received_events", + "type": "User", + "site_admin": false, + "contributions": 4 + }, + { + "login": "kamontat", + "id": 14089557, + "node_id": "MDQ6VXNlcjE0MDg5NTU3", + "avatar_url": "https://avatars2.githubusercontent.com/u/14089557?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/kamontat", + "html_url": "https://github.com/kamontat", + "followers_url": "https://api.github.com/users/kamontat/followers", + "following_url": "https://api.github.com/users/kamontat/following{/other_user}", + "gists_url": "https://api.github.com/users/kamontat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/kamontat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/kamontat/subscriptions", + "organizations_url": "https://api.github.com/users/kamontat/orgs", + "repos_url": "https://api.github.com/users/kamontat/repos", + "events_url": "https://api.github.com/users/kamontat/events{/privacy}", + "received_events_url": "https://api.github.com/users/kamontat/received_events", + "type": "User", + "site_admin": false, + "contributions": 4 + }, + { + "login": "watsonian", + "id": 244, + "node_id": "MDQ6VXNlcjI0NA==", + "avatar_url": "https://avatars3.githubusercontent.com/u/244?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/watsonian", + "html_url": "https://github.com/watsonian", + "followers_url": "https://api.github.com/users/watsonian/followers", + "following_url": "https://api.github.com/users/watsonian/following{/other_user}", + "gists_url": "https://api.github.com/users/watsonian/gists{/gist_id}", + "starred_url": "https://api.github.com/users/watsonian/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/watsonian/subscriptions", + "organizations_url": "https://api.github.com/users/watsonian/orgs", + "repos_url": "https://api.github.com/users/watsonian/repos", + "events_url": "https://api.github.com/users/watsonian/events{/privacy}", + "received_events_url": "https://api.github.com/users/watsonian/received_events", + "type": "User", + "site_admin": false, + "contributions": 4 + }, + { + "login": "arngrimur-seal", + "id": 36759268, + "node_id": "MDQ6VXNlcjM2NzU5MjY4", + "avatar_url": "https://avatars3.githubusercontent.com/u/36759268?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/arngrimur-seal", + "html_url": "https://github.com/arngrimur-seal", + "followers_url": "https://api.github.com/users/arngrimur-seal/followers", + "following_url": "https://api.github.com/users/arngrimur-seal/following{/other_user}", + "gists_url": "https://api.github.com/users/arngrimur-seal/gists{/gist_id}", + "starred_url": "https://api.github.com/users/arngrimur-seal/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/arngrimur-seal/subscriptions", + "organizations_url": "https://api.github.com/users/arngrimur-seal/orgs", + "repos_url": "https://api.github.com/users/arngrimur-seal/repos", + "events_url": "https://api.github.com/users/arngrimur-seal/events{/privacy}", + "received_events_url": "https://api.github.com/users/arngrimur-seal/received_events", + "type": "User", + "site_admin": false, + "contributions": 3 + }, + { + "login": "ashwanthkumar", + "id": 600279, + "node_id": "MDQ6VXNlcjYwMDI3OQ==", + "avatar_url": "https://avatars0.githubusercontent.com/u/600279?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ashwanthkumar", + "html_url": "https://github.com/ashwanthkumar", + "followers_url": "https://api.github.com/users/ashwanthkumar/followers", + "following_url": "https://api.github.com/users/ashwanthkumar/following{/other_user}", + "gists_url": "https://api.github.com/users/ashwanthkumar/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ashwanthkumar/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ashwanthkumar/subscriptions", + "organizations_url": "https://api.github.com/users/ashwanthkumar/orgs", + "repos_url": "https://api.github.com/users/ashwanthkumar/repos", + "events_url": "https://api.github.com/users/ashwanthkumar/events{/privacy}", + "received_events_url": "https://api.github.com/users/ashwanthkumar/received_events", + "type": "User", + "site_admin": false, + "contributions": 3 + }, + { + "login": "cyrille-leclerc", + "id": 459691, + "node_id": "MDQ6VXNlcjQ1OTY5MQ==", + "avatar_url": "https://avatars3.githubusercontent.com/u/459691?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/cyrille-leclerc", + "html_url": "https://github.com/cyrille-leclerc", + "followers_url": "https://api.github.com/users/cyrille-leclerc/followers", + "following_url": "https://api.github.com/users/cyrille-leclerc/following{/other_user}", + "gists_url": "https://api.github.com/users/cyrille-leclerc/gists{/gist_id}", + "starred_url": "https://api.github.com/users/cyrille-leclerc/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/cyrille-leclerc/subscriptions", + "organizations_url": "https://api.github.com/users/cyrille-leclerc/orgs", + "repos_url": "https://api.github.com/users/cyrille-leclerc/repos", + "events_url": "https://api.github.com/users/cyrille-leclerc/events{/privacy}", + "received_events_url": "https://api.github.com/users/cyrille-leclerc/received_events", + "type": "User", + "site_admin": false, + "contributions": 3 + }, + { + "login": "daniel-beck", + "id": 1831569, + "node_id": "MDQ6VXNlcjE4MzE1Njk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/1831569?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/daniel-beck", + "html_url": "https://github.com/daniel-beck", + "followers_url": "https://api.github.com/users/daniel-beck/followers", + "following_url": "https://api.github.com/users/daniel-beck/following{/other_user}", + "gists_url": "https://api.github.com/users/daniel-beck/gists{/gist_id}", + "starred_url": "https://api.github.com/users/daniel-beck/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/daniel-beck/subscriptions", + "organizations_url": "https://api.github.com/users/daniel-beck/orgs", + "repos_url": "https://api.github.com/users/daniel-beck/repos", + "events_url": "https://api.github.com/users/daniel-beck/events{/privacy}", + "received_events_url": "https://api.github.com/users/daniel-beck/received_events", + "type": "User", + "site_admin": false, + "contributions": 3 + }, + { + "login": "dlovera", + "id": 4728774, + "node_id": "MDQ6VXNlcjQ3Mjg3NzQ=", + "avatar_url": "https://avatars1.githubusercontent.com/u/4728774?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/dlovera", + "html_url": "https://github.com/dlovera", + "followers_url": "https://api.github.com/users/dlovera/followers", + "following_url": "https://api.github.com/users/dlovera/following{/other_user}", + "gists_url": "https://api.github.com/users/dlovera/gists{/gist_id}", + "starred_url": "https://api.github.com/users/dlovera/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/dlovera/subscriptions", + "organizations_url": "https://api.github.com/users/dlovera/orgs", + "repos_url": "https://api.github.com/users/dlovera/repos", + "events_url": "https://api.github.com/users/dlovera/events{/privacy}", + "received_events_url": "https://api.github.com/users/dlovera/received_events", + "type": "User", + "site_admin": false, + "contributions": 3 + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/mappings/1-user.json new file mode 100644 index 0000000000..38fbee0bea --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "5705a11e-1421-4985-8e1f-b1e25b4ef547", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Thu, 03 Oct 2019 18:56:02 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4924", + "X-RateLimit-Reset": "1570132527", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"cf6199fecf47b59c42190e1e11147ee2\"", + "Last-Modified": "Tue, 24 Sep 2019 19:32:29 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "F355:2CE7:106E772:13682E3:5D964442" + } + }, + "uuid": "5705a11e-1421-4985-8e1f-b1e25b4ef547", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/mappings/10-users_kohsuke.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/mappings/10-users_kohsuke.json new file mode 100644 index 0000000000..27677cb055 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/mappings/10-users_kohsuke.json @@ -0,0 +1,47 @@ +{ + "id": "8e9d982b-ca60-4410-a263-d2c49834c0df", + "name": "users_kohsuke", + "request": { + "url": "/users/kohsuke", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "10-users_kohsuke.json", + "headers": { + "Server": "GitHub.com", + "Date": "Mon, 18 Apr 2022 19:55:03 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"4ca7cbddf39c9811d84469a3e5d3d4e4e577b18bc9798e19eac336ba991a7300\"", + "Last-Modified": "Sun, 10 Apr 2022 22:58:15 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4964", + "X-RateLimit-Reset": "1650312871", + "X-RateLimit-Used": "36", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C7B2:C448:2A6BF2A:2B14CE1:625DC217" + } + }, + "uuid": "8e9d982b-ca60-4410-a263-d2c49834c0df", + "persistent": true, + "insertionIndex": 10 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/mappings/2-orgs_hub4j.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/mappings/2-orgs_hub4j.json new file mode 100644 index 0000000000..44180982f4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/mappings/2-orgs_hub4j.json @@ -0,0 +1,48 @@ +{ + "id": "7c4b2a82-e18f-45a2-a6b5-4baaea191b89", + "name": "orgs_hub4j", + "request": { + "url": "/orgs/hub4j", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "2-orgs_hub4j.json", + "headers": { + "Date": "Thu, 03 Oct 2019 18:56:03 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4922", + "X-RateLimit-Reset": "1570132527", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"62b7633c1dd73301f853bcc0da2d8504\"", + "Last-Modified": "Wed, 04 Sep 2019 18:12:34 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "F355:2CE7:106E7C3:13682F9:5D964442" + } + }, + "uuid": "7c4b2a82-e18f-45a2-a6b5-4baaea191b89", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/mappings/3-r_h_github-api.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/mappings/3-r_h_github-api.json new file mode 100644 index 0000000000..94e1d632c6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/mappings/3-r_h_github-api.json @@ -0,0 +1,48 @@ +{ + "id": "d87d9579-8da1-4f01-a6e6-6f91e04cc8a7", + "name": "repos_hub4j_github-api", + "request": { + "url": "/repos/hub4j/github-api", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "3-r_h_github-api.json", + "headers": { + "Date": "Thu, 03 Oct 2019 18:56:03 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4921", + "X-RateLimit-Reset": "1570132527", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"ee2a44ea003736b3fc98deff8fb5ff11\"", + "Last-Modified": "Thu, 03 Oct 2019 09:41:10 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "F355:2CE7:106E7D7:1368356:5D964443" + } + }, + "uuid": "d87d9579-8da1-4f01-a6e6-6f91e04cc8a7", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/mappings/4-r_h_g_contributors.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/mappings/4-r_h_g_contributors.json new file mode 100644 index 0000000000..c0009b30b6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/mappings/4-r_h_g_contributors.json @@ -0,0 +1,49 @@ +{ + "id": "cd622100-1a8e-4b33-9716-dbaf0b55c2aa", + "name": "repos_hub4j_github-api_contributors", + "request": { + "url": "/repos/hub4j/github-api/contributors?anon=true", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "4-r_h_g_contributors.json", + "headers": { + "Date": "Thu, 03 Oct 2019 18:56:03 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4920", + "X-RateLimit-Reset": "1570132527", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"a1b7dbc652ab098b5033f9fa5b3bfc62\"", + "Last-Modified": "Thu, 03 Oct 2019 09:41:10 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "Link": "; rel=\"next\", ; rel=\"last\"", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "F355:2CE7:106E7F3:1368377:5D964443" + } + }, + "uuid": "cd622100-1a8e-4b33-9716-dbaf0b55c2aa", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testManualRunAndBasicInformation/__files/6-r_h_g_actions_runs.json b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testManualRunAndBasicInformation/__files/6-r_h_g_actions_runs.json index 09bc9af45f..00b4c827d6 100644 --- a/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testManualRunAndBasicInformation/__files/6-r_h_g_actions_runs.json +++ b/src/test/resources/org/kohsuke/github/GHWorkflowRunTest/wiremock/testManualRunAndBasicInformation/__files/6-r_h_g_actions_runs.json @@ -26,6 +26,26 @@ "cancel_url": "https://api.github.com/repos/hub4j-test-org/GHWorkflowRunTest/actions/runs/686034992/cancel", "rerun_url": "https://api.github.com/repos/hub4j-test-org/GHWorkflowRunTest/actions/runs/686034992/rerun", "workflow_url": "https://api.github.com/repos/hub4j-test-org/GHWorkflowRunTest/actions/workflows/6820790", + "triggering_actor": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, "head_commit": { "id": "f6a5c19a67797d64426203b8a7a05a0fd74e5037", "tree_id": "666bb9f951306171acb21632eca28a386cb35f73", diff --git a/src/test/resources/org/kohsuke/github/GitHubTest/wiremock/getMeta/__files/1-meta.json b/src/test/resources/org/kohsuke/github/GitHubTest/wiremock/getMeta/__files/1-meta.json index 2baa8baf32..d66ad1746e 100644 --- a/src/test/resources/org/kohsuke/github/GitHubTest/wiremock/getMeta/__files/1-meta.json +++ b/src/test/resources/org/kohsuke/github/GitHubTest/wiremock/getMeta/__files/1-meta.json @@ -1,5 +1,16 @@ { "verifiable_password_authentication": true, + "ssh_key_fingerprints": { + "SHA256_RSA": 1234567890, + "SHA256_DSA": 1234567890, + "SHA256_ECDSA": 1234567890, + "SHA256_ED25519": 1234567890 + }, + "ssh_keys": [ + "ssh-ed25519 ABCDEFGHIJKLMNOPQRSTUVWXYZ", + "ecdsa-sha2-nistp256 ABCDEFGHIJKLMNOPQRSTUVWXYZ", + "ssh-rsa ABCDEFGHIJKLMNOPQRSTUVWXYZ" + ], "hooks": [ "192.30.252.0/22", "185.199.108.0/22", diff --git a/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait/mappings/2-r_h_t_Wait.json b/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait/mappings/2-r_h_t_Wait.json index e70c2b006d..7ec052385a 100644 --- a/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait/mappings/2-r_h_t_Wait.json +++ b/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait/mappings/2-r_h_t_Wait.json @@ -20,7 +20,7 @@ "Status": "403 Forbidden", "X-RateLimit-Limit": "5000", "X-RateLimit-Remaining": "0", - "X-RateLimit-Reset": "{{testStartDate offset='3 seconds' format='unix'}}", + "X-RateLimit-Reset": "{{now offset='3 seconds' format='unix'}}", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ "Accept, Authorization, Cookie, X-GitHub-OTP", diff --git a/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait_Missing_Date_Header/__files/1-user.json b/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait_Missing_Date_Header/__files/1-user.json new file mode 100644 index 0000000000..467313f149 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait_Missing_Date_Header/__files/1-user.json @@ -0,0 +1,45 @@ +{ + "login": "bitwiseman", + "id": 1958953, + "node_id": "MDQ6VXNlcjE5NTg5NTM=", + "avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/bitwiseman", + "html_url": "https://github.com/bitwiseman", + "followers_url": "https://api.github.com/users/bitwiseman/followers", + "following_url": "https://api.github.com/users/bitwiseman/following{/other_user}", + "gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}", + "starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions", + "organizations_url": "https://api.github.com/users/bitwiseman/orgs", + "repos_url": "https://api.github.com/users/bitwiseman/repos", + "events_url": "https://api.github.com/users/bitwiseman/events{/privacy}", + "received_events_url": "https://api.github.com/users/bitwiseman/received_events", + "type": "User", + "site_admin": false, + "name": "Liam Newman", + "company": "Cloudbees, Inc.", + "blog": "", + "location": "Seattle, WA, USA", + "email": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 181, + "public_gists": 7, + "followers": 146, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-02-06T17:29:39Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait_Missing_Date_Header/__files/3-r_h_t_Wait.json b/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait_Missing_Date_Header/__files/3-r_h_t_Wait.json new file mode 100644 index 0000000000..59d27cff72 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait_Missing_Date_Header/__files/3-r_h_t_Wait.json @@ -0,0 +1,126 @@ +{ + "id": 238757196, + "node_id": "MDEwOlJlcG9zaXRvcnkyMzg3NTcxOTY=", + "name": "temp-testHandler_Wait", + "full_name": "hub4j-test-org/temp-testHandler_Wait", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-testHandler_Wait", + "description": "A test repository for testing the github-api project: temp-testHandler_Wait", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testHandler_Wait/deployments", + "created_at": "2020-02-06T18:33:39Z", + "updated_at": "2020-02-06T18:33:43Z", + "pushed_at": "2020-02-06T18:33:41Z", + "git_url": "git://github.com/hub4j-test-org/temp-testHandler_Wait.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-testHandler_Wait.git", + "clone_url": "https://github.com/hub4j-test-org/temp-testHandler_Wait.git", + "svn_url": "https://github.com/hub4j-test-org/temp-testHandler_Wait", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "push": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "delete_branch_on_merge": false, + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait_Missing_Date_Header/mappings/1-user.json b/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait_Missing_Date_Header/mappings/1-user.json new file mode 100644 index 0000000000..7be725572e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait_Missing_Date_Header/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "a60baf84-5b5c-4f86-af3d-cab0d609c7b2", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Thu, 06 Feb 2020 18:33:32 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4930", + "X-RateLimit-Reset": "{{now offset='3 seconds' format='unix'}}", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"1cb30f031c67c499473b3aad01c7f7a5\"", + "Last-Modified": "Thu, 06 Feb 2020 17:29:39 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "CC37:2605:3F884:4E941:5E3C5BFC" + } + }, + "uuid": "a60baf84-5b5c-4f86-af3d-cab0d609c7b2", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait_Missing_Date_Header/mappings/2-r_h_t_Wait.json b/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait_Missing_Date_Header/mappings/2-r_h_t_Wait.json new file mode 100644 index 0000000000..09da668e64 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait_Missing_Date_Header/mappings/2-r_h_t_Wait.json @@ -0,0 +1,50 @@ +{ + "id": "79fb1092-8bf3-4274-bc8e-ca126c9d9261", + "name": "repos_hub4j-test-org_temp-testHandler_Wait_Missing_Date_Header", + "request": { + "url": "/repos/hub4j-test-org/temp-testHandler_Wait_Missing_Date_Header", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 403, + "body": "{\"message\":\"Must have push access to repository\",\"documentation_url\":\"https://developer.github.com/\"}", + "headers": { + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "403 Forbidden", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "0", + "X-RateLimit-Reset": "{{now offset='3 seconds' format='unix'}}", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"7ff3c96399f7ddf6129622d675ca9935\"", + "Last-Modified": "Thu, 06 Feb 2020 18:33:37 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "CC37:2605:3F982:4E949:5E3C5BFC" + } + }, + "uuid": "79fb1092-8bf3-4274-bc8e-ca126c9d9261", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-temp-testHandler_Wait", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-hub4j-test-org-temp-testHandler_Wait-2", + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait_Missing_Date_Header/mappings/3-r_h_t_Wait.json b/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait_Missing_Date_Header/mappings/3-r_h_t_Wait.json new file mode 100644 index 0000000000..23e9904502 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RateLimitHandlerTest/wiremock/testHandler_Wait_Missing_Date_Header/mappings/3-r_h_t_Wait.json @@ -0,0 +1,49 @@ +{ + "id": "574da117-6845-46d8-b2c1-4415546ca670", + "name": "repos_hub4j-test-org_temp-testHandler_Wait_Missing_Date_Header", + "request": { + "url": "/repos/hub4j-test-org/temp-testHandler_Wait_Missing_Date_Header", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "3-r_h_t_Wait.json", + "headers": { + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4922", + "X-RateLimit-Reset": "{{testStartDate offset='3 seconds' format='unix'}}", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"858224998ac7d1fd6dcd43f73d375297\"", + "Last-Modified": "Thu, 06 Feb 2020 18:33:43 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "CC37:2605:3FADC:4EA8C:5E3C5C02" + } + }, + "uuid": "574da117-6845-46d8-b2c1-4415546ca670", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-temp-testHandler_Wait", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-temp-testHandler_Wait-2", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/user_whenProxying_AuthCorrectlyConfigured/__files/1-user.json b/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/user_whenProxying_AuthCorrectlyConfigured/__files/1-user.json new file mode 100644 index 0000000000..56ff784983 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/user_whenProxying_AuthCorrectlyConfigured/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": null, + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 7, + "public_gists": 0, + "followers": 3, + "following": 8, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-11-27T04:01:41Z", + "private_gists": 0, + "total_private_repos": 2, + "owned_private_repos": 2, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/user_whenProxying_AuthCorrectlyConfigured/mappings/1-user.json b/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/user_whenProxying_AuthCorrectlyConfigured/mappings/1-user.json new file mode 100644 index 0000000000..97d97463cf --- /dev/null +++ b/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/user_whenProxying_AuthCorrectlyConfigured/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "64916a9b-5eda-42af-9c98-48ae56c4d534", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Thu, 28 Nov 2024 03:26:34 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"649a1838c989cc406542c8419b31064e1c7a6202454895df13e7b35e43b8653b\"", + "Last-Modified": "Wed, 27 Nov 2024 04:01:41 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4881", + "X-RateLimit-Reset": "1732767344", + "X-RateLimit-Used": "119", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AA1E:348A76:BD20B0:DB5BDF:6747E2EA" + } + }, + "uuid": "64916a9b-5eda-42af-9c98-48ae56c4d534", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/whenSnapshot_EnsureProxy/__files/1-user.json b/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/whenSnapshot_EnsureProxy/__files/1-user.json new file mode 100644 index 0000000000..56ff784983 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/whenSnapshot_EnsureProxy/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": null, + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 7, + "public_gists": 0, + "followers": 3, + "following": 8, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-11-27T04:01:41Z", + "private_gists": 0, + "total_private_repos": 2, + "owned_private_repos": 2, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/whenSnapshot_EnsureProxy/mappings/1-user.json b/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/whenSnapshot_EnsureProxy/mappings/1-user.json new file mode 100644 index 0000000000..0d35435e64 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/whenSnapshot_EnsureProxy/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "7de2b730-9b8e-4691-a676-4458c8cfd026", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Thu, 28 Nov 2024 03:26:33 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"649a1838c989cc406542c8419b31064e1c7a6202454895df13e7b35e43b8653b\"", + "Last-Modified": "Wed, 27 Nov 2024 04:01:41 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4883", + "X-RateLimit-Reset": "1732767344", + "X-RateLimit-Used": "117", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AA13:3A04E5:529DA2:61BA25:6747E2E9" + } + }, + "uuid": "7de2b730-9b8e-4691-a676-4458c8cfd026", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNewWhenOldOneExpires/mappings/user-1.json b/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNewWhenOldOneExpires/mappings/user-1.json index e7cd34e018..def7745746 100644 --- a/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNewWhenOldOneExpires/mappings/user-1.json +++ b/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNewWhenOldOneExpires/mappings/user-1.json @@ -15,7 +15,7 @@ "bodyFileName": "user-1.json", "headers": { "Server": "GitHub.com", - "Date": "Tue, 04 Jul 2023 09:27:51 GMT", + "Date": "{{testStartDate timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ diff --git a/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNewWhenOldOneExpires/mappings/users_kohsuke-2.json b/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNewWhenOldOneExpires/mappings/users_kohsuke-2.json index 5897845e09..1a30ed08e1 100644 --- a/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNewWhenOldOneExpires/mappings/users_kohsuke-2.json +++ b/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNewWhenOldOneExpires/mappings/users_kohsuke-2.json @@ -20,7 +20,7 @@ "status": 403, "headers": { "Server": "GitHub.com", - "Date": "Tue, 04 Jul 2023 09:27:52 GMT", + "Date": "{{testStartDate timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ diff --git a/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNewWhenOldOneExpires/mappings/users_kohsuke-3.json b/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNewWhenOldOneExpires/mappings/users_kohsuke-3.json index a9ea666bb5..8a9c9ed267 100644 --- a/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNewWhenOldOneExpires/mappings/users_kohsuke-3.json +++ b/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNewWhenOldOneExpires/mappings/users_kohsuke-3.json @@ -21,7 +21,7 @@ "bodyFileName": "users_kohsuke-2.json", "headers": { "Server": "GitHub.com", - "Date": "Tue, 04 Jul 2023 09:27:52 GMT", + "Date": "{{testStartDate timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ diff --git a/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNewWhenOldOneExpires/mappings/users_kohsuke-4.json b/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNewWhenOldOneExpires/mappings/users_kohsuke-4.json index 6935c06c3a..849c1c7303 100644 --- a/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNewWhenOldOneExpires/mappings/users_kohsuke-4.json +++ b/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNewWhenOldOneExpires/mappings/users_kohsuke-4.json @@ -20,7 +20,7 @@ "bodyFileName": "users_kohsuke-2.json", "headers": { "Server": "GitHub.com", - "Date": "Tue, 04 Jul 2023 09:27:52 GMT", + "Date": "{{testStartDate timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ diff --git a/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNotNewWhenOldOneIsStillValid/mappings/users_kohsuke-1.json b/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNotNewWhenOldOneIsStillValid/mappings/users_kohsuke-1.json index d000da49ab..15e38b4c58 100644 --- a/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNotNewWhenOldOneIsStillValid/mappings/users_kohsuke-1.json +++ b/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNotNewWhenOldOneIsStillValid/mappings/users_kohsuke-1.json @@ -20,7 +20,7 @@ "status": 403, "headers": { "Server": "GitHub.com", - "Date": "Thu, 10 Aug 2023 09:12:37 GMT", + "Date": "{{testStartDate timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "public, max-age=60, s-maxage=60", "Vary": [ diff --git a/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNotNewWhenOldOneIsStillValid/mappings/users_kohsuke-2.json b/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNotNewWhenOldOneIsStillValid/mappings/users_kohsuke-2.json index 87b1110b97..25de341639 100644 --- a/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNotNewWhenOldOneIsStillValid/mappings/users_kohsuke-2.json +++ b/src/test/resources/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest/wiremock/testNotNewWhenOldOneIsStillValid/mappings/users_kohsuke-2.json @@ -19,7 +19,7 @@ "bodyFileName": "users_kohsuke-1.json", "headers": { "Server": "GitHub.com", - "Date": "Thu, 10 Aug 2023 09:12:37 GMT", + "Date": "{{testStartDate timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "public, max-age=60, s-maxage=60", "Vary": [ @@ -32,7 +32,7 @@ "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "60", "X-RateLimit-Remaining": "59", - "X-RateLimit-Reset": "{{testStartDate offset='1 hours' format='unix'}}", + "X-RateLimit-Reset": "{{testStartDate offset='5 seconds' format='unix'}}", "X-RateLimit-Used": "1", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",