diff --git a/src/main/java/org/kohsuke/github/GHRepository.java b/src/main/java/org/kohsuke/github/GHRepository.java index ab60eafb86..beb2ec63ee 100644 --- a/src/main/java/org/kohsuke/github/GHRepository.java +++ b/src/main/java/org/kohsuke/github/GHRepository.java @@ -35,7 +35,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.Arrays; @@ -1458,23 +1457,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(); } /** @@ -1503,27 +1490,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(); } /** @@ -3435,4 +3406,14 @@ public void deleteAutolink(int autolinkId) throws IOException { .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/test/java/org/kohsuke/github/GHRepositoryForkBuilderTest.java b/src/test/java/org/kohsuke/github/GHRepositoryForkBuilderTest.java new file mode 100644 index 0000000000..10b116d2f6 --- /dev/null +++ b/src/test/java/org/kohsuke/github/GHRepositoryForkBuilderTest.java @@ -0,0 +1,277 @@ +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; + + 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 { + // equivalent to the deprecated fork() method + TestForkBuilder builder = createBuilder(); + GHRepository forkedRepo = builder.create(); + + 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/resources/no-reflect-and-serialization-list b/src/test/resources/no-reflect-and-serialization-list index 8e6ceafcdb..4e248c490c 100644 --- a/src/test/resources/no-reflect-and-serialization-list +++ b/src/test/resources/no-reflect-and-serialization-list @@ -83,4 +83,5 @@ org.kohsuke.github.internal.EnumUtils org.kohsuke.github.internal.Previews org.kohsuke.github.EnterpriseManagedSupport org.kohsuke.github.GHAutolink -org.kohsuke.github.GHAutolinkBuilder \ No newline at end of file +org.kohsuke.github.GHAutolinkBuilder +org.kohsuke.github.GHRepositoryForkBuilder \ 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/3-r_h_t_git_refs_heads_main.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/3-r_h_t_git_refs_heads_main.json new file mode 100644 index 0000000000..7f65480788 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/3-r_h_t_git_refs_heads_main.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/main", + "node_id": "REF_kwDONgQXSK9yZWZzL2hlYWRzL21haW4", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/refs/heads/main", + "object": { + "sha": "cc56732e2af71c7c250e5e0e61ac977b52aecd1c", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/commits/cc56732e2af71c7c250e5e0e61ac977b52aecd1c" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/4-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/4-r_h_t_git_refs.json new file mode 100644 index 0000000000..b605d251ee --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/4-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch1", + "node_id": "REF_kwDONgQXSLdyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMQ", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/refs/heads/test-branch1", + "object": { + "sha": "cc56732e2af71c7c250e5e0e61ac977b52aecd1c", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/commits/cc56732e2af71c7c250e5e0e61ac977b52aecd1c" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/5-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/5-r_h_t_git_refs.json new file mode 100644 index 0000000000..54088ec815 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/5-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch2", + "node_id": "REF_kwDONgQXSLdyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMg", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/refs/heads/test-branch2", + "object": { + "sha": "cc56732e2af71c7c250e5e0e61ac977b52aecd1c", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/commits/cc56732e2af71c7c250e5e0e61ac977b52aecd1c" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/6-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/6-r_h_t_git_refs.json new file mode 100644 index 0000000000..d11fccec9a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/__files/6-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch3", + "node_id": "REF_kwDONgQXSLdyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMw", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/refs/heads/test-branch3", + "object": { + "sha": "cc56732e2af71c7c250e5e0e61ac977b52aecd1c", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/commits/cc56732e2af71c7c250e5e0e61ac977b52aecd1c" + } +} \ 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/3-r_h_t_git_refs_heads_main.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/3-r_h_t_git_refs_heads_main.json new file mode 100644 index 0000000000..d45878c2e7 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/3-r_h_t_git_refs_heads_main.json @@ -0,0 +1,49 @@ +{ + "id": "33ab9192-d58f-4206-a0ee-f09f8c45837c", + "name": "repos_hub4j-test-org_temp-testfork_git_refs_heads_main", + "request": { + "url": "/repos/hub4j-test-org/temp-testFork/git/refs/heads/main", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "3-r_h_t_git_refs_heads_main.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:07 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/\"2df495d7f45d159428761025db7ea0639e627301633cf712bd873d1a8f6b7b2d\"", + "Last-Modified": "Fri, 20 Dec 2024 13:03:06 GMT", + "X-Poll-Interval": "300", + "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": "4530", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "470", + "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": "19D7:2C3D90:F87A0D:123537F:67656B0B" + } + }, + "uuid": "33ab9192-d58f-4206-a0ee-f09f8c45837c", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/4-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/4-r_h_t_git_refs.json new file mode 100644 index 0000000000..ed4e2c65e5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/4-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "d6e16fae-d814-4f0f-93bb-24f1ab40551b", + "name": "repos_hub4j-test-org_temp-testfork_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testFork/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch1\",\"sha\":\"cc56732e2af71c7c250e5e0e61ac977b52aecd1c\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "4-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:07 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": "\"615d9eedba111b8d82e2255ab2862517ad1e0f78a0cfd9505624e95772fdc5be\"", + "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": "4529", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "471", + "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": "19D8:59D95:F0EB43:11BC877:67656B0B", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/refs/heads/test-branch1" + } + }, + "uuid": "d6e16fae-d814-4f0f-93bb-24f1ab40551b", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/5-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/5-r_h_t_git_refs.json new file mode 100644 index 0000000000..0579eb47f7 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/5-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "eeb10874-b496-434b-9595-2ff50f09c6bf", + "name": "repos_hub4j-test-org_temp-testfork_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testFork/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch2\",\"sha\":\"cc56732e2af71c7c250e5e0e61ac977b52aecd1c\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "5-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:08 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": "\"81d47fc79e2df88374ce81584b06880a30e173ff25f3adc8bed62bc8f6202bbe\"", + "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": "4528", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "472", + "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": "19D9:27FAA5:57763E:67F3E5:67656B0C", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/refs/heads/test-branch2" + } + }, + "uuid": "eeb10874-b496-434b-9595-2ff50f09c6bf", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/6-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/6-r_h_t_git_refs.json new file mode 100644 index 0000000000..578ec1b36e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testFork/mappings/6-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "c28fc22e-6a6f-4375-b529-fbb9ce84c84b", + "name": "repos_hub4j-test-org_temp-testfork_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testFork/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch3\",\"sha\":\"cc56732e2af71c7c250e5e0e61ac977b52aecd1c\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "6-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:08 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": "\"6a6053b2ed6608c1095c05ef3ce5ab95ceabf7525209340dc68d4e971d6594e7\"", + "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": "4527", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "473", + "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": "19DD:4C45C:1799D0C:1B77ABE:67656B0C", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testFork/git/refs/heads/test-branch3" + } + }, + "uuid": "c28fc22e-6a6f-4375-b529-fbb9ce84c84b", + "persistent": true, + "insertionIndex": 6 +} \ 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/3-r_h_t_git_refs_heads_main.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/3-r_h_t_git_refs_heads_main.json new file mode 100644 index 0000000000..cc29da07e8 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/3-r_h_t_git_refs_heads_main.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/main", + "node_id": "REF_kwDONgQX7q9yZWZzL2hlYWRzL21haW4", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/refs/heads/main", + "object": { + "sha": "0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/commits/0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/4-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/4-r_h_t_git_refs.json new file mode 100644 index 0000000000..ab9a331b52 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/4-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch1", + "node_id": "REF_kwDONgQX7rdyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMQ", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/refs/heads/test-branch1", + "object": { + "sha": "0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/commits/0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/5-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/5-r_h_t_git_refs.json new file mode 100644 index 0000000000..a737bc0a63 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/5-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch2", + "node_id": "REF_kwDONgQX7rdyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMg", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/refs/heads/test-branch2", + "object": { + "sha": "0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/commits/0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/6-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/6-r_h_t_git_refs.json new file mode 100644 index 0000000000..af45310f3a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/__files/6-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch3", + "node_id": "REF_kwDONgQX7rdyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMw", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/refs/heads/test-branch3", + "object": { + "sha": "0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/commits/0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6" + } +} \ 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/3-r_h_t_git_refs_heads_main.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/3-r_h_t_git_refs_heads_main.json new file mode 100644 index 0000000000..c842d7e849 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/3-r_h_t_git_refs_heads_main.json @@ -0,0 +1,49 @@ +{ + "id": "c6c1beff-0694-4b9e-acb9-0d1aa05ac5ee", + "name": "repos_hub4j-test-org_temp-testforkchangedname_git_refs_heads_main", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkChangedName/git/refs/heads/main", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "3-r_h_t_git_refs_heads_main.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/\"2493739c0f7e65fd35429517d11640132926b1c782551f832d1308ea1ba79ef5\"", + "Last-Modified": "Fri, 20 Dec 2024 13:03:33 GMT", + "X-Poll-Interval": "300", + "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": "4498", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "502", + "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": "1839:1F61D2:1661761:1A3F682:67656B26" + } + }, + "uuid": "c6c1beff-0694-4b9e-acb9-0d1aa05ac5ee", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/4-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/4-r_h_t_git_refs.json new file mode 100644 index 0000000000..1730fd871d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/4-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "c7b6c861-2877-4c5a-a4b4-32bc2523dab1", + "name": "repos_hub4j-test-org_temp-testforkchangedname_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkChangedName/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch1\",\"sha\":\"0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "4-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:35 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": "\"a0b891e8ba84a91a4b9ba07d7b15db97bb50d7bf39d03ac9332c412c82667bda\"", + "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": "4497", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "503", + "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": "183D:3BD1EB:270770:2EA5D7:67656B26", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/refs/heads/test-branch1" + } + }, + "uuid": "c7b6c861-2877-4c5a-a4b4-32bc2523dab1", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/5-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/5-r_h_t_git_refs.json new file mode 100644 index 0000000000..91e4465264 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/5-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "66a3a5d7-7308-4cfb-8c31-2947526bf942", + "name": "repos_hub4j-test-org_temp-testforkchangedname_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkChangedName/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch2\",\"sha\":\"0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "5-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:35 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": "\"1eb4634a7349b73fbd45ca3f563dfd62af2da8ec230e4814168b09c594b42190\"", + "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": "4496", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "504", + "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": "183E:18FFDF:F4AD68:11F9AA8:67656B27", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/refs/heads/test-branch2" + } + }, + "uuid": "66a3a5d7-7308-4cfb-8c31-2947526bf942", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/6-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/6-r_h_t_git_refs.json new file mode 100644 index 0000000000..89dc886c50 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkChangedName/mappings/6-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "58ebec6c-7a88-457c-9545-b3ed08e992d5", + "name": "repos_hub4j-test-org_temp-testforkchangedname_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkChangedName/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch3\",\"sha\":\"0bd7d09dfde84e453a2c1d0cdb62adfd7b1adfd6\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "6-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03: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": "\"fbd34308ff103da1441a73addb08df717a3a79ed2b13e8ec30ae35d9b64ed979\"", + "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": "4495", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "505", + "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:15F550B:19D3441:67656B27", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testForkChangedName/git/refs/heads/test-branch3" + } + }, + "uuid": "58ebec6c-7a88-457c-9545-b3ed08e992d5", + "persistent": true, + "insertionIndex": 6 +} \ 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/3-r_h_t_git_refs_heads_main.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/3-r_h_t_git_refs_heads_main.json new file mode 100644 index 0000000000..7cff66cf8b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/3-r_h_t_git_refs_heads_main.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/main", + "node_id": "REF_kwDONgQWNK9yZWZzL2hlYWRzL21haW4", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs/heads/main", + "object": { + "sha": "b565d5b9adbaf54f1b35d879f0d98c135ad3d7d8", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/commits/b565d5b9adbaf54f1b35d879f0d98c135ad3d7d8" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/4-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/4-r_h_t_git_refs.json new file mode 100644 index 0000000000..1c0e4f13ce --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/4-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch1", + "node_id": "REF_kwDONgQWNLdyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMQ", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs/heads/test-branch1", + "object": { + "sha": "b565d5b9adbaf54f1b35d879f0d98c135ad3d7d8", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/commits/b565d5b9adbaf54f1b35d879f0d98c135ad3d7d8" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/5-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/5-r_h_t_git_refs.json new file mode 100644 index 0000000000..209b1a7dc3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/5-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch2", + "node_id": "REF_kwDONgQWNLdyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMg", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs/heads/test-branch2", + "object": { + "sha": "b565d5b9adbaf54f1b35d879f0d98c135ad3d7d8", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/commits/b565d5b9adbaf54f1b35d879f0d98c135ad3d7d8" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/6-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/6-r_h_t_git_refs.json new file mode 100644 index 0000000000..4a510dbffc --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/__files/6-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch3", + "node_id": "REF_kwDONgQWNLdyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMw", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs/heads/test-branch3", + "object": { + "sha": "b565d5b9adbaf54f1b35d879f0d98c135ad3d7d8", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/commits/b565d5b9adbaf54f1b35d879f0d98c135ad3d7d8" + } +} \ 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/3-r_h_t_git_refs_heads_main.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/3-r_h_t_git_refs_heads_main.json new file mode 100644 index 0000000000..58e6f201ac --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/3-r_h_t_git_refs_heads_main.json @@ -0,0 +1,49 @@ +{ + "id": "dfa564a1-6d61-4e0a-b1fa-48d42bbc6b24", + "name": "repos_hub4j-test-org_temp-testforkdefaultbranchonly_git_refs_heads_main", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs/heads/main", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "3-r_h_t_git_refs_heads_main.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/\"53b788241e36ce9adfdf2aac99d9b0a2155ad95fd1a62bb186d67af1bfbfbfe7\"", + "Last-Modified": "Fri, 20 Dec 2024 13:02:25 GMT", + "X-Poll-Interval": "300", + "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": "4577", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "423", + "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": "1942:59D95:F0E07F:11BBB41:67656AE1" + } + }, + "uuid": "dfa564a1-6d61-4e0a-b1fa-48d42bbc6b24", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/4-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/4-r_h_t_git_refs.json new file mode 100644 index 0000000000..3bd0fe6549 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/4-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "8502a8a4-ea0c-47de-9641-248e90d4e491", + "name": "repos_hub4j-test-org_temp-testforkdefaultbranchonly_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch1\",\"sha\":\"b565d5b9adbaf54f1b35d879f0d98c135ad3d7d8\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "4-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02: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": "\"5cf50c4f85c1ad28af95e9a93d958bf5f0bbfbcde0162aba6c8afbebdf3ce01a\"", + "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": "4576", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "424", + "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": "1943:27FAA5:576C08:67E723:67656AE1", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs/heads/test-branch1" + } + }, + "uuid": "8502a8a4-ea0c-47de-9641-248e90d4e491", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/5-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/5-r_h_t_git_refs.json new file mode 100644 index 0000000000..f9156e8413 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/5-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "44aa25ba-a604-4feb-9349-22ecb1dfb052", + "name": "repos_hub4j-test-org_temp-testforkdefaultbranchonly_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch2\",\"sha\":\"b565d5b9adbaf54f1b35d879f0d98c135ad3d7d8\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "5-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02: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": "\"fec7f2615f3463b71713f08d854ec421b14a9a09a2e58fe87ac52e69b3acfcf4\"", + "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": "4575", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "425", + "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": "1947:4C45C:1798FF5:1B76B19:67656AE2", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs/heads/test-branch2" + } + }, + "uuid": "44aa25ba-a604-4feb-9349-22ecb1dfb052", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/6-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/6-r_h_t_git_refs.json new file mode 100644 index 0000000000..feb114f100 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkDefaultBranchOnly/mappings/6-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "c8d05095-d861-4f4b-8427-5926de20e482", + "name": "repos_hub4j-test-org_temp-testforkdefaultbranchonly_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch3\",\"sha\":\"b565d5b9adbaf54f1b35d879f0d98c135ad3d7d8\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "6-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02: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": "\"749132330398f993b38037f886cfb9fc6c294094976dfd9ed2842e8410fe7343\"", + "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": "4574", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "426", + "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": "1948:139242:13EC7B7:175F7B3:67656AE3", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testForkDefaultBranchOnly/git/refs/heads/test-branch3" + } + }, + "uuid": "c8d05095-d861-4f4b-8427-5926de20e482", + "persistent": true, + "insertionIndex": 6 +} \ 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/3-r_h_t_git_refs_heads_main.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/3-r_h_t_git_refs_heads_main.json new file mode 100644 index 0000000000..e97189c224 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/3-r_h_t_git_refs_heads_main.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/main", + "node_id": "REF_kwDONgQWsq9yZWZzL2hlYWRzL21haW4", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/refs/heads/main", + "object": { + "sha": "41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/commits/41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/4-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/4-r_h_t_git_refs.json new file mode 100644 index 0000000000..9898450e00 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/4-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch1", + "node_id": "REF_kwDONgQWsrdyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMQ", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/refs/heads/test-branch1", + "object": { + "sha": "41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/commits/41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/5-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/5-r_h_t_git_refs.json new file mode 100644 index 0000000000..bd3b93a738 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/5-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch2", + "node_id": "REF_kwDONgQWsrdyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMg", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/refs/heads/test-branch2", + "object": { + "sha": "41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/commits/41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/6-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/6-r_h_t_git_refs.json new file mode 100644 index 0000000000..274021a75c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/__files/6-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch3", + "node_id": "REF_kwDONgQWsrdyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMw", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/refs/heads/test-branch3", + "object": { + "sha": "41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/commits/41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee" + } +} \ 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/3-r_h_t_git_refs_heads_main.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/3-r_h_t_git_refs_heads_main.json new file mode 100644 index 0000000000..5f489cf589 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/3-r_h_t_git_refs_heads_main.json @@ -0,0 +1,49 @@ +{ + "id": "03a5031b-64e1-4946-bfb1-8a61f6b7b9c1", + "name": "repos_hub4j-test-org_temp-testforktoorg_git_refs_heads_main", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkToOrg/git/refs/heads/main", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "3-r_h_t_git_refs_heads_main.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/\"aa6b46f7fbcdea37418ffe101df4c671388ad6d8959d85cbe1b1489d0d5b0a55\"", + "Last-Modified": "Fri, 20 Dec 2024 13:02:42 GMT", + "X-Poll-Interval": "300", + "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": "4560", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "440", + "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": "197B:3BD1EB:26F8B5:2E940D:67656AF2" + } + }, + "uuid": "03a5031b-64e1-4946-bfb1-8a61f6b7b9c1", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/4-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/4-r_h_t_git_refs.json new file mode 100644 index 0000000000..1b0ea3d77f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/4-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "28469059-929d-4211-a392-56456c73b206", + "name": "repos_hub4j-test-org_temp-testforktoorg_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkToOrg/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch1\",\"sha\":\"41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "4-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02: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": "\"10d02a9b0415fba44c816cd3e303d4c6a202ff10bc6581d9c67f47d839f0828f\"", + "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": "4559", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "441", + "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": "197C:18FFDF:F4A00C:11F8A3C:67656AF2", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/refs/heads/test-branch1" + } + }, + "uuid": "28469059-929d-4211-a392-56456c73b206", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/5-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/5-r_h_t_git_refs.json new file mode 100644 index 0000000000..b7b18c24b0 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/5-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "8420754a-21b3-46c4-bca1-f77f2f79be8b", + "name": "repos_hub4j-test-org_temp-testforktoorg_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkToOrg/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch2\",\"sha\":\"41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "5-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02: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": "\"7dd22bcc111ca229e26c1d02d7974ff54e9e78f295bc032c44642b2a776fdd69\"", + "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": "4558", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "442", + "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": "1980:1E9DA:16312D9:1A0EEFC:67656AF3", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/refs/heads/test-branch2" + } + }, + "uuid": "8420754a-21b3-46c4-bca1-f77f2f79be8b", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/6-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/6-r_h_t_git_refs.json new file mode 100644 index 0000000000..2565e3a696 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testForkToOrg/mappings/6-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "10e20365-c0f0-477c-9fac-d909f39d6471", + "name": "repos_hub4j-test-org_temp-testforktoorg_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testForkToOrg/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch3\",\"sha\":\"41bcbfbf3d7ea68ab3488346ee9b323ac9d2f5ee\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "6-r_h_t_git_refs.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": "\"0e7d765a25fe6b7e5d08e8bdff9d4788cf1d1a103dd4db65ee05b57dd38aa9cb\"", + "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": "4557", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "443", + "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": "1981:32E7C9:14E5733:187ACB9:67656AF3", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testForkToOrg/git/refs/heads/test-branch3" + } + }, + "uuid": "10e20365-c0f0-477c-9fac-d909f39d6471", + "persistent": true, + "insertionIndex": 6 +} \ 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/__files/3-r_h_t_git_refs_heads_main.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/__files/3-r_h_t_git_refs_heads_main.json new file mode 100644 index 0000000000..81065bd71a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/__files/3-r_h_t_git_refs_heads_main.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/main", + "node_id": "REF_kwDONgQXC69yZWZzL2hlYWRzL21haW4", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/git/refs/heads/main", + "object": { + "sha": "2262ad909aaf41a2610868daf35637e008f0a4ef", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/git/commits/2262ad909aaf41a2610868daf35637e008f0a4ef" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/__files/4-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/__files/4-r_h_t_git_refs.json new file mode 100644 index 0000000000..a71dcd2110 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/__files/4-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch1", + "node_id": "REF_kwDONgQXC7dyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMQ", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/git/refs/heads/test-branch1", + "object": { + "sha": "2262ad909aaf41a2610868daf35637e008f0a4ef", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/git/commits/2262ad909aaf41a2610868daf35637e008f0a4ef" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/__files/5-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/__files/5-r_h_t_git_refs.json new file mode 100644 index 0000000000..e94ed24537 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/__files/5-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch2", + "node_id": "REF_kwDONgQXC7dyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMg", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/git/refs/heads/test-branch2", + "object": { + "sha": "2262ad909aaf41a2610868daf35637e008f0a4ef", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/git/commits/2262ad909aaf41a2610868daf35637e008f0a4ef" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/__files/6-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/__files/6-r_h_t_git_refs.json new file mode 100644 index 0000000000..24b729ad9f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/__files/6-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch3", + "node_id": "REF_kwDONgQXC7dyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMw", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/git/refs/heads/test-branch3", + "object": { + "sha": "2262ad909aaf41a2610868daf35637e008f0a4ef", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/git/commits/2262ad909aaf41a2610868daf35637e008f0a4ef" + } +} \ 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/testSleep/mappings/3-r_h_t_git_refs_heads_main.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/mappings/3-r_h_t_git_refs_heads_main.json new file mode 100644 index 0000000000..6c817a9896 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/mappings/3-r_h_t_git_refs_heads_main.json @@ -0,0 +1,49 @@ +{ + "id": "42fc350e-db62-44d8-a088-de65e41b7a57", + "name": "repos_hub4j-test-org_temp-testsleep_git_refs_heads_main", + "request": { + "url": "/repos/hub4j-test-org/temp-testSleep/git/refs/heads/main", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "3-r_h_t_git_refs_heads_main.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/\"e79e434c3e1e1a41c9a87f85507eaf4729826087f4de9a135e038261f907efd0\"", + "Last-Modified": "Fri, 20 Dec 2024 13:02:57 GMT", + "X-Poll-Interval": "300", + "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": "4542", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "458", + "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": "19B2:2E6E0F:D8457:109372:67656B01" + } + }, + "uuid": "42fc350e-db62-44d8-a088-de65e41b7a57", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/mappings/4-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/mappings/4-r_h_t_git_refs.json new file mode 100644 index 0000000000..c063fe9d8f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/mappings/4-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "7a021e60-a52c-4765-86b5-defbeea48d30", + "name": "repos_hub4j-test-org_temp-testsleep_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testSleep/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch1\",\"sha\":\"2262ad909aaf41a2610868daf35637e008f0a4ef\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "4-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02: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": "\"ce8b0d214c921dfd9a5106e503888149fd2e80b661026157f17f05d8baac367b\"", + "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": "4541", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "459", + "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": "19B4:245A47:15F4ADE:19D27EE:67656B02", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/git/refs/heads/test-branch1" + } + }, + "uuid": "7a021e60-a52c-4765-86b5-defbeea48d30", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/mappings/5-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/mappings/5-r_h_t_git_refs.json new file mode 100644 index 0000000000..6051fd5c86 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/mappings/5-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "aa0b23e7-7323-4312-9a31-e8cca85a972c", + "name": "repos_hub4j-test-org_temp-testsleep_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testSleep/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch2\",\"sha\":\"2262ad909aaf41a2610868daf35637e008f0a4ef\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "5-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02: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": "\"5f0853d47aa50f3daa4dd212898b38e29d777c10cab4af29c7c300b8f8de877c\"", + "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": "4540", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "460", + "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": "19B7:3BD1EB:26FD25:2E996F:67656B02", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/git/refs/heads/test-branch2" + } + }, + "uuid": "aa0b23e7-7323-4312-9a31-e8cca85a972c", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/mappings/6-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/mappings/6-r_h_t_git_refs.json new file mode 100644 index 0000000000..947c2096cc --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testSleep/mappings/6-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "2e482ff5-162a-4921-a6fe-ea9f2dc25b69", + "name": "repos_hub4j-test-org_temp-testsleep_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testSleep/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch3\",\"sha\":\"2262ad909aaf41a2610868daf35637e008f0a4ef\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "6-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:02: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": "\"15c73aafecbba7e0366448eabbe876899915cbed3b45316feade0cb532b62947\"", + "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": "4539", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "461", + "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": "19B8:18FFDF:F4A373:11F8E9D:67656B03", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testSleep/git/refs/heads/test-branch3" + } + }, + "uuid": "2e482ff5-162a-4921-a6fe-ea9f2dc25b69", + "persistent": true, + "insertionIndex": 6 +} \ 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/3-r_h_t_git_refs_heads_main.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/3-r_h_t_git_refs_heads_main.json new file mode 100644 index 0000000000..25531a13e5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/3-r_h_t_git_refs_heads_main.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/main", + "node_id": "REF_kwDONgQYP69yZWZzL2hlYWRzL21haW4", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/refs/heads/main", + "object": { + "sha": "1ea7a80cf8b399714e9988d6c1138fb7ce95e407", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/commits/1ea7a80cf8b399714e9988d6c1138fb7ce95e407" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/4-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/4-r_h_t_git_refs.json new file mode 100644 index 0000000000..ec2696a427 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/4-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch1", + "node_id": "REF_kwDONgQYP7dyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMQ", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/refs/heads/test-branch1", + "object": { + "sha": "1ea7a80cf8b399714e9988d6c1138fb7ce95e407", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/commits/1ea7a80cf8b399714e9988d6c1138fb7ce95e407" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/5-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/5-r_h_t_git_refs.json new file mode 100644 index 0000000000..09f465403f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/5-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch2", + "node_id": "REF_kwDONgQYP7dyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMg", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/refs/heads/test-branch2", + "object": { + "sha": "1ea7a80cf8b399714e9988d6c1138fb7ce95e407", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/commits/1ea7a80cf8b399714e9988d6c1138fb7ce95e407" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/6-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/6-r_h_t_git_refs.json new file mode 100644 index 0000000000..1396eeeebd --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/__files/6-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch3", + "node_id": "REF_kwDONgQYP7dyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMw", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/refs/heads/test-branch3", + "object": { + "sha": "1ea7a80cf8b399714e9988d6c1138fb7ce95e407", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/commits/1ea7a80cf8b399714e9988d6c1138fb7ce95e407" + } +} \ 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/3-r_h_t_git_refs_heads_main.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/3-r_h_t_git_refs_heads_main.json new file mode 100644 index 0000000000..a5cd83d2b1 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/3-r_h_t_git_refs_heads_main.json @@ -0,0 +1,49 @@ +{ + "id": "66b4fc49-4d20-4da0-8c00-a29b96334ee5", + "name": "repos_hub4j-test-org_temp-testtimeoutmessage_git_refs_heads_main", + "request": { + "url": "/repos/hub4j-test-org/temp-testTimeoutMessage/git/refs/heads/main", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "3-r_h_t_git_refs_heads_main.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/\"2ac386136ee3d2c920bcf229098ebee8763f8a0898502d031fe3245239bc9cab\"", + "Last-Modified": "Fri, 20 Dec 2024 13:03:48 GMT", + "X-Poll-Interval": "300", + "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": "4481", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "519", + "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": "1872:4C45C:179ADF2:1B78E18:67656B35" + } + }, + "uuid": "66b4fc49-4d20-4da0-8c00-a29b96334ee5", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/4-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/4-r_h_t_git_refs.json new file mode 100644 index 0000000000..886a1aefe2 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/4-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "9df76035-002e-4133-92f9-6618f8af3f69", + "name": "repos_hub4j-test-org_temp-testtimeoutmessage_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testTimeoutMessage/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch1\",\"sha\":\"1ea7a80cf8b399714e9988d6c1138fb7ce95e407\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "4-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03: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": "\"859494816e5e5323c0be9ced8ea5b6be86d9fbbaa96e6d8494388f5f4440be4d\"", + "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": "4480", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "520", + "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": "1873:139242:13EE3AF:17618A0:67656B36", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/refs/heads/test-branch1" + } + }, + "uuid": "9df76035-002e-4133-92f9-6618f8af3f69", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/5-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/5-r_h_t_git_refs.json new file mode 100644 index 0000000000..50a0f1303f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/5-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "be2dfb31-c825-420e-9664-56d7c6a95738", + "name": "repos_hub4j-test-org_temp-testtimeoutmessage_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testTimeoutMessage/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch2\",\"sha\":\"1ea7a80cf8b399714e9988d6c1138fb7ce95e407\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "5-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03: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": "\"0721231c1661fa473b6ae3492040bdbf730825b8c83ac2b971edcbabc144f8d8\"", + "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": "4479", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "521", + "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": "1876:245A47:15F592F:19D394D:67656B36", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/refs/heads/test-branch2" + } + }, + "uuid": "be2dfb31-c825-420e-9664-56d7c6a95738", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/6-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/6-r_h_t_git_refs.json new file mode 100644 index 0000000000..2f78d348a5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutMessage/mappings/6-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "035fcc26-a129-4db4-b679-c3fd43385cd5", + "name": "repos_hub4j-test-org_temp-testtimeoutmessage_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testTimeoutMessage/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch3\",\"sha\":\"1ea7a80cf8b399714e9988d6c1138fb7ce95e407\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "6-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03: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": "\"b73c59d804b008617ee6e6acf21a83a5faf2014a53350e47eabe26b320cc94dd\"", + "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": "4478", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "522", + "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": "187A:18FFDF:F4B17A:11F9FA5:67656B37", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutMessage/git/refs/heads/test-branch3" + } + }, + "uuid": "035fcc26-a129-4db4-b679-c3fd43385cd5", + "persistent": true, + "insertionIndex": 6 +} \ 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/3-r_h_t_git_refs_heads_main.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/3-r_h_t_git_refs_heads_main.json new file mode 100644 index 0000000000..ef1e6823ea --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/3-r_h_t_git_refs_heads_main.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/main", + "node_id": "REF_kwDONgQXnq9yZWZzL2hlYWRzL21haW4", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/refs/heads/main", + "object": { + "sha": "0bd0cfb86fe67eb30ce4ada71f4cd68c81ce1c1f", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/commits/0bd0cfb86fe67eb30ce4ada71f4cd68c81ce1c1f" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/4-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/4-r_h_t_git_refs.json new file mode 100644 index 0000000000..985244fc9b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/4-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch1", + "node_id": "REF_kwDONgQXnrdyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMQ", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/refs/heads/test-branch1", + "object": { + "sha": "0bd0cfb86fe67eb30ce4ada71f4cd68c81ce1c1f", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/commits/0bd0cfb86fe67eb30ce4ada71f4cd68c81ce1c1f" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/5-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/5-r_h_t_git_refs.json new file mode 100644 index 0000000000..4fab8147c6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/5-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch2", + "node_id": "REF_kwDONgQXnrdyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMg", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/refs/heads/test-branch2", + "object": { + "sha": "0bd0cfb86fe67eb30ce4ada71f4cd68c81ce1c1f", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/commits/0bd0cfb86fe67eb30ce4ada71f4cd68c81ce1c1f" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/6-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/6-r_h_t_git_refs.json new file mode 100644 index 0000000000..1b2d1d5138 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/__files/6-r_h_t_git_refs.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/test-branch3", + "node_id": "REF_kwDONgQXnrdyZWZzL2hlYWRzL3Rlc3QtYnJhbmNoMw", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/refs/heads/test-branch3", + "object": { + "sha": "0bd0cfb86fe67eb30ce4ada71f4cd68c81ce1c1f", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/commits/0bd0cfb86fe67eb30ce4ada71f4cd68c81ce1c1f" + } +} \ 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/3-r_h_t_git_refs_heads_main.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/3-r_h_t_git_refs_heads_main.json new file mode 100644 index 0000000000..11230a5e9f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/3-r_h_t_git_refs_heads_main.json @@ -0,0 +1,49 @@ +{ + "id": "60c8a03a-4d6f-4acb-ade0-297199cf5e55", + "name": "repos_hub4j-test-org_temp-testtimeoutorgmessage_git_refs_heads_main", + "request": { + "url": "/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/refs/heads/main", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "3-r_h_t_git_refs_heads_main.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/\"f1f1455746367f9c339338c72da71b2e7251d21489a9139157dd95154cf18439\"", + "Last-Modified": "Fri, 20 Dec 2024 13:03:22 GMT", + "X-Poll-Interval": "300", + "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": "4513", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "487", + "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": "180E:2CFAFD:E78053:111A29D:67656B1A" + } + }, + "uuid": "60c8a03a-4d6f-4acb-ade0-297199cf5e55", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/4-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/4-r_h_t_git_refs.json new file mode 100644 index 0000000000..c45f16f5e8 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/4-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "11882bf5-f519-45a7-8555-d94fbca28f50", + "name": "repos_hub4j-test-org_temp-testtimeoutorgmessage_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch1\",\"sha\":\"0bd0cfb86fe67eb30ce4ada71f4cd68c81ce1c1f\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "4-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:23 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": "\"36f5dda7e5811794d0d5159bcba03aa48e8f4acc449985c88aced1f667e99d99\"", + "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": "4512", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "488", + "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": "1812:2C3D90:F87F21:1235975:67656B1B", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/refs/heads/test-branch1" + } + }, + "uuid": "11882bf5-f519-45a7-8555-d94fbca28f50", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/5-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/5-r_h_t_git_refs.json new file mode 100644 index 0000000000..4d48690e7f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/5-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "983a8e38-83c3-4c27-9f1b-6dc7acef572a", + "name": "repos_hub4j-test-org_temp-testtimeoutorgmessage_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch2\",\"sha\":\"0bd0cfb86fe67eb30ce4ada71f4cd68c81ce1c1f\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "5-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:23 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": "\"46df309e29ca3977ff749d1cace223b377490a2b001115b243296bbfb4f24157\"", + "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": "4511", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "489", + "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": "1813:59D95:F0EF62:11BCD9C:67656B1B", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/refs/heads/test-branch2" + } + }, + "uuid": "983a8e38-83c3-4c27-9f1b-6dc7acef572a", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/6-r_h_t_git_refs.json b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/6-r_h_t_git_refs.json new file mode 100644 index 0000000000..8d70dded59 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryForkBuilderTest/wiremock/testTimeoutOrgMessage/mappings/6-r_h_t_git_refs.json @@ -0,0 +1,55 @@ +{ + "id": "cac96d72-6718-485d-b90b-4d0efcf74cd1", + "name": "repos_hub4j-test-org_temp-testtimeoutorgmessage_git_refs", + "request": { + "url": "/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/refs", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"ref\":\"refs/heads/test-branch3\",\"sha\":\"0bd0cfb86fe67eb30ce4ada71f4cd68c81ce1c1f\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "6-r_h_t_git_refs.json", + "headers": { + "Date": "Fri, 20 Dec 2024 13:03:24 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": "\"6c7bb38951c502a9f19c3a1d9376acd50433c9115dceadac540b3e31e82d789d\"", + "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": "4510", + "X-RateLimit-Reset": "1734700582", + "X-RateLimit-Used": "490", + "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": "1814:27FAA5:5779EB:67F886:67656B1C", + "Location": "https://api.github.com/repos/hub4j-test-org/temp-testTimeoutOrgMessage/git/refs/heads/test-branch3" + } + }, + "uuid": "cac96d72-6718-485d-b90b-4d0efcf74cd1", + "persistent": true, + "insertionIndex": 6 +} \ 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