From 4d5cdd504a8811cdb6e02038e40373f850f1e021 Mon Sep 17 00:00:00 2001 From: Alaurant Date: Fri, 29 Nov 2024 22:32:45 +1000 Subject: [PATCH 1/5] add autolink function --- .../java/org/kohsuke/github/GHAutolink.java | 94 +++++++++ .../org/kohsuke/github/GHAutolinkBuilder.java | 90 ++++++++ .../java/org/kohsuke/github/GHRepository.java | 60 ++++++ .../org/kohsuke/github/GHAutolinkTest.java | 194 ++++++++++++++++++ .../no-reflect-and-serialization-list | 3 +- .../testCreateAutolink/__files/1-user.json | 48 +++++ .../__files/2-r_a_github-api-test.json | 122 +++++++++++ .../testCreateAutolink/mappings/1-user.json | 48 +++++ .../mappings/2-r_a_github-api-test.json | 48 +++++ .../mappings/3-r_a_g_autolinks.json | 54 +++++ .../mappings/4-r_a_g_autolinks.json | 47 +++++ .../mappings/5-r_a_g_autolinks_6152588.json | 43 ++++ .../testDeleteAutolink/__files/1-user.json | 48 +++++ .../__files/2-r_a_github-api-test.json | 122 +++++++++++ .../testDeleteAutolink/mappings/1-user.json | 48 +++++ .../mappings/2-r_a_github-api-test.json | 48 +++++ .../mappings/3-r_a_g_autolinks.json | 54 +++++ .../mappings/4-r_a_g_autolinks_6152571.json | 43 ++++ .../mappings/5-r_a_g_autolinks_6152571.json | 45 ++++ .../mappings/6-r_a_g_autolinks.json | 54 +++++ .../mappings/7-r_a_g_autolinks_6152576.json | 43 ++++ .../mappings/8-r_a_g_autolinks_6152576.json | 45 ++++ .../mappings/9-r_a_g_autolinks.json | 47 +++++ .../testGetAllAutolinks/__files/1-user.json | 48 +++++ .../__files/2-r_a_github-api-test.json | 122 +++++++++++ .../testGetAllAutolinks/mappings/1-user.json | 48 +++++ .../mappings/2-r_a_github-api-test.json | 48 +++++ .../mappings/3-r_a_g_autolinks.json | 54 +++++ .../mappings/4-r_a_g_autolinks.json | 54 +++++ .../mappings/5-r_a_g_autolinks.json | 50 +++++ .../mappings/6-r_a_g_autolinks.json | 49 +++++ .../mappings/7-r_a_g_autolinks_6152582.json | 43 ++++ .../mappings/8-r_a_g_autolinks_6152583.json | 43 ++++ .../testGetAutolink/__files/1-user.json | 48 +++++ .../__files/2-r_a_github-api-test.json | 122 +++++++++++ .../testGetAutolink/mappings/1-user.json | 48 +++++ .../mappings/2-r_a_github-api-test.json | 48 +++++ .../mappings/3-r_a_g_autolinks.json | 54 +++++ .../mappings/4-r_a_g_autolinks_6152578.json | 47 +++++ .../mappings/5-r_a_g_autolinks.json | 47 +++++ .../mappings/6-r_a_g_autolinks_6152578.json | 43 ++++ .../__files/1-user.json | 48 +++++ .../mappings/1-user.json | 48 +++++ .../__files/1-user.json | 48 +++++ .../mappings/1-user.json | 48 +++++ 45 files changed, 2655 insertions(+), 1 deletion(-) create mode 100644 src/main/java/org/kohsuke/github/GHAutolink.java create mode 100644 src/main/java/org/kohsuke/github/GHAutolinkBuilder.java create mode 100644 src/test/java/org/kohsuke/github/GHAutolinkTest.java create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/1-user.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks_6152588.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/1-user.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6152571.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6152571.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6152576.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6152576.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/__files/1-user.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/__files/2-r_a_github-api-test.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/1-user.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/2-r_a_github-api-test.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/3-r_a_g_autolinks.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/4-r_a_g_autolinks.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/5-r_a_g_autolinks.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/6-r_a_g_autolinks.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/7-r_a_g_autolinks_6152582.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/8-r_a_g_autolinks_6152583.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/__files/1-user.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/__files/2-r_a_github-api-test.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/1-user.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/2-r_a_github-api-test.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/3-r_a_g_autolinks.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/4-r_a_g_autolinks_6152578.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/5-r_a_g_autolinks.json create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/6-r_a_g_autolinks_6152578.json create mode 100644 src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/user_whenProxying_AuthCorrectlyConfigured/__files/1-user.json create mode 100644 src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/user_whenProxying_AuthCorrectlyConfigured/mappings/1-user.json create mode 100644 src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/whenSnapshot_EnsureProxy/__files/1-user.json create mode 100644 src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/whenSnapshot_EnsureProxy/mappings/1-user.json diff --git a/src/main/java/org/kohsuke/github/GHAutolink.java b/src/main/java/org/kohsuke/github/GHAutolink.java new file mode 100644 index 0000000000..05d0000c9f --- /dev/null +++ b/src/main/java/org/kohsuke/github/GHAutolink.java @@ -0,0 +1,94 @@ +package org.kohsuke.github; + +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + +import java.io.IOException; + +// TODO: Auto-generated Javadoc +/** + * The type Gh autolink. + * + * @author Alaurant + * @see GHAutolinkBuilder + * @see GHRepository#getAutolinks() + * @see Repository autolinks API + */ +public class GHAutolink { + private Integer id; + private String key_prefix; + private String url_template; + private boolean is_alphanumeric; + private GHRepository owner; + + /** + * Gets the autolink ID + * + * @return the id + */ + public Integer getId() { + return id; + } + + /** + * Gets the key prefix used to identify issues/PR references + * + * @return the key prefix string + */ + public String getKeyPrefix() { + return key_prefix; + } + + /** + * Gets the URL template that will be used for matching + * + * @return the URL template string + */ + public String getUrlTemplate() { + return url_template; + } + + /** + * Checks if the autolink uses alphanumeric values + * + * @return true if alphanumeric, false otherwise + */ + public boolean isAlphanumeric() { + return is_alphanumeric; + } + + /** + * Gets the repository that owns this autolink + * + * @return the repository instance + */ + @SuppressFBWarnings(value = { "EI_EXPOSE_REP" }, justification = "Expected behavior") + public GHRepository getOwner() { + return owner; + } + + /** + * Deletes this autolink + * + * @throws IOException + * if the deletion fails + */ + public void delete() throws IOException { + owner.root() + .createRequest() + .method("DELETE") + .withUrlPath(String.format("/repos/%s/%s/autolinks/%d", owner.getOwnerName(), owner.getName(), getId())) + .send(); + } + + /** + * Wraps this autolink with its owner repository + * + * @param owner + * the repository that owns this autolink + * @return this instance + */ + GHAutolink wrap(GHRepository owner) { + this.owner = owner; + return this; + } +} diff --git a/src/main/java/org/kohsuke/github/GHAutolinkBuilder.java b/src/main/java/org/kohsuke/github/GHAutolinkBuilder.java new file mode 100644 index 0000000000..22a9ea5bd0 --- /dev/null +++ b/src/main/java/org/kohsuke/github/GHAutolinkBuilder.java @@ -0,0 +1,90 @@ +package org.kohsuke.github; + +import java.io.IOException; + +// TODO: Auto-generated Javadoc +/** + * The type Gh autolink builder. + * + * @see GHRepository#createAutolink() + * @see GHAutolink + */ +public class GHAutolinkBuilder { + + private final GHRepository repo; + private final Requester req; + private String keyPrefix; + private String urlTemplate; + private Boolean isAlphanumeric; + + /** + * Instantiates a new Gh autolink builder. + * + * @param repo + * the repo + */ + GHAutolinkBuilder(GHRepository repo) { + this.repo = repo; + req = repo.root().createRequest(); + } + + /** + * With key prefix gh autolink builder. + * + * @param keyPrefix + * the key prefix + * @return the gh autolink builder + */ + public GHAutolinkBuilder withKeyPrefix(String keyPrefix) { + this.keyPrefix = keyPrefix; + return this; + } + + /** + * With url template gh autolink builder. + * + * @param urlTemplate + * the url template + * @return the gh autolink builder + */ + public GHAutolinkBuilder withUrlTemplate(String urlTemplate) { + this.urlTemplate = urlTemplate; + return this; + } + + /** + * With is alphanumeric gh autolink builder. + * + * @param isAlphanumeric + * the is alphanumeric + * @return the gh autolink builder + */ + public GHAutolinkBuilder withIsAlphanumeric(boolean isAlphanumeric) { + this.isAlphanumeric = isAlphanumeric; + return this; + } + + private String getApiTail() { + return String.format("/repos/%s/%s/autolinks", repo.getOwnerName(), repo.getName()); + } + + /** + * Create gh autolink. + * + * @return the gh autolink + * @throws IOException + * the io exception + */ + public GHAutolink create() throws IOException { + GHAutolink autolink = req.method("POST") + .with("key_prefix", keyPrefix) + .with("url_template", urlTemplate) + .with("is_alphanumeric", isAlphanumeric) + .withHeader("Accept", "application/vnd.github+json") + .withUrlPath(getApiTail()) + .fetch(GHAutolink.class); + + return autolink.wrap(repo); + } + +} diff --git a/src/main/java/org/kohsuke/github/GHRepository.java b/src/main/java/org/kohsuke/github/GHRepository.java index 305dadcf7a..a587669207 100644 --- a/src/main/java/org/kohsuke/github/GHRepository.java +++ b/src/main/java/org/kohsuke/github/GHRepository.java @@ -3375,4 +3375,64 @@ protected Setter(@Nonnull GHRepository repository) { requester.method("PATCH").withUrlPath(repository.getApiTailUrl("")); } } + + /** + * Create an autolink gh autolink builder. + * + * @return the gh autolink builder + */ + public GHAutolinkBuilder createAutolink() { + return new GHAutolinkBuilder(this); + } + + /** + * Gets all autolinks of a repo (admin only). + * (https://docs.github.com/en/rest/repos/autolinks?apiVersion=2022-11-28#get-all-autolinks-of-a-repository) + * + * @return the autolinks + * @throws IOException + * the io exception + */ + public PagedIterable getAutolinks() throws IOException { + return root().createRequest() + .withHeader("Accept", "application/vnd.github+json") + .withUrlPath(String.format("/repos/%s/%s/autolinks", getOwnerName(), getName())) + .toIterable(GHAutolink[].class, item -> item.wrap(this)); + } + + /** + * Gets an autolink by ID. + * (https://docs.github.com/en/rest/repos/autolinks?apiVersion=2022-11-28#get-an-autolink-reference-of-a-repository) + * + * @param autolinkId + * the autolink id + * @return the autolink + * @throws IOException + * the io exception + */ + public GHAutolink getAutolink(Integer autolinkId) throws IOException { + return root().createRequest() + .withHeader("Accept", "application/vnd.github+json") + .withUrlPath(String.format("/repos/%s/%s/autolinks/%d", getOwnerName(), getName(), autolinkId)) + .fetch(GHAutolink.class) + .wrap(this); + } + + /** + * Delete autolink. + * (https://docs.github.com/en/rest/repos/autolinks?apiVersion=2022-11-28#delete-an-autolink-reference-from-a-repository) + * + * @param autolinkId + * the autolink id + * @throws IOException + * the io exception + */ + public void deleteAutolink(Integer autolinkId) throws IOException { + root().createRequest() + .method("DELETE") + .withHeader("Accept", "application/vnd.github+json") + .withUrlPath(String.format("/repos/%s/%s/autolinks/%d", getOwnerName(), getName(), autolinkId)) + .send(); + } + } diff --git a/src/test/java/org/kohsuke/github/GHAutolinkTest.java b/src/test/java/org/kohsuke/github/GHAutolinkTest.java new file mode 100644 index 0000000000..344ec9a30e --- /dev/null +++ b/src/test/java/org/kohsuke/github/GHAutolinkTest.java @@ -0,0 +1,194 @@ +package org.kohsuke.github; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.fail; + +// TODO: Auto-generated Javadoc +/** + * The type Gh autolink test. + */ +public class GHAutolinkTest extends AbstractGitHubWireMockTest { + + private GHRepository repo; + + /** + * Instantiates a new Gh autolink test. + */ + public GHAutolinkTest() { + } + + /** + * Sets up. + * + * @throws Exception + * the exception + */ + @Before + public void setUp() throws Exception { + repo = gitHub.getRepository("Alaurant/github-api-test"); + } + + /** + * Test create autolink. + * + * @throws Exception + * the exception + */ + @Test + public void testCreateAutolink() throws Exception { + String keyPrefix = "EXAMPLE-"; + String urlTemplate = "https://example.com/TICKET?q="; + boolean isAlphanumeric = true; + + GHAutolink autolink = repo.createAutolink() + .withKeyPrefix(keyPrefix) + .withUrlTemplate(urlTemplate) + .withIsAlphanumeric(isAlphanumeric) + .create(); + + assertThat(autolink.getId(), notNullValue()); + assertThat(autolink.getKeyPrefix(), equalTo(keyPrefix)); + assertThat(autolink.getUrlTemplate(), equalTo(urlTemplate)); + assertThat(autolink.isAlphanumeric(), equalTo(isAlphanumeric)); + assertThat(autolink.getOwner(), equalTo(repo)); + + } + + /** + * Test get autolink. + * + * @throws Exception + * the exception + */ + @Test + public void testGetAutolink() throws Exception { + GHAutolink autolink = repo.createAutolink() + .withKeyPrefix("JIRA-") + .withUrlTemplate("https://example.com/test/") + .withIsAlphanumeric(false) + .create(); + + GHAutolink fetched = repo.getAutolink(autolink.getId()); + + assertThat(fetched.getId(), equalTo(autolink.getId())); + assertThat(fetched.getKeyPrefix(), equalTo(autolink.getKeyPrefix())); + assertThat(fetched.getUrlTemplate(), equalTo(autolink.getUrlTemplate())); + assertThat(fetched.isAlphanumeric(), equalTo(autolink.isAlphanumeric())); + assertThat(fetched.getOwner(), equalTo(repo)); + + } + + /** + * Test get autolinks. + * + * @throws Exception + * the exception + */ + @Test + public void testGetAllAutolinks() throws Exception { + GHAutolink autolink1 = repo.createAutolink() + .withKeyPrefix("LIST-") + .withUrlTemplate("https://example.com/list1/") + .withIsAlphanumeric(true) + .create(); + + GHAutolink autolink2 = repo.createAutolink() + .withKeyPrefix("LISTED-") + .withUrlTemplate("https://example.com/list2/") + .withIsAlphanumeric(false) + .create(); + Thread.sleep(1000); + + boolean found1 = false; + boolean found2 = false; + + PagedIterable autolinks = repo.getAutolinks(); + + for (GHAutolink autolink : autolinks) { + + if (autolink.getId().equals(autolink1.getId())) { + found1 = true; + assertThat(autolink.getKeyPrefix(), equalTo(autolink1.getKeyPrefix())); + assertThat(autolink.getUrlTemplate(), equalTo(autolink1.getUrlTemplate())); + assertThat(autolink.isAlphanumeric(), equalTo(autolink1.isAlphanumeric())); + } + if (autolink.getId().equals(autolink2.getId())) { + found2 = true; + assertThat(autolink.getKeyPrefix(), equalTo(autolink2.getKeyPrefix())); + assertThat(autolink.getUrlTemplate(), equalTo(autolink2.getUrlTemplate())); + assertThat(autolink.isAlphanumeric(), equalTo(autolink2.isAlphanumeric())); + } + } + + assertThat("First autolink", found1, is(true)); + assertThat("Second autolink", found2, is(true)); + + } + + /** + * Test delete autolink. + * + * @throws Exception + * the exception + */ + @Test + public void testDeleteAutolink() throws Exception { + // Delete autolink using the instance method + GHAutolink autolink = repo.createAutolink() + .withKeyPrefix("DELETE-") + .withUrlTemplate("https://example.com/delete/") + .withIsAlphanumeric(true) + .create(); + + autolink.delete(); + + try { + repo.getAutolink(autolink.getId()); + fail("Expected GHFileNotFoundException"); + } catch (GHFileNotFoundException e) { + // Expected + } + + // Delete autolink using repository delete method + autolink = repo.createAutolink() + .withKeyPrefix("DELETED-") + .withUrlTemplate("https://example.com/delete2/") + .withIsAlphanumeric(true) + .create(); + + repo.deleteAutolink(autolink.getId()); + + try { + repo.getAutolink(autolink.getId()); + fail("Expected GHFileNotFoundException"); + } catch (GHFileNotFoundException e) { + // Expected + } + } + + /** + * Cleanup. + * + * @throws Exception + * the exception + */ + @After + public void cleanup() throws Exception { + try { + for (GHAutolink autolink : repo.getAutolinks()) { + try { + autolink.delete(); + } catch (GHFileNotFoundException e) { + // Ignore 404 errors during cleanup + } + } + } catch (GHFileNotFoundException e) { + // Ignore if no autolinks exist + } + } +} diff --git a/src/test/resources/no-reflect-and-serialization-list b/src/test/resources/no-reflect-and-serialization-list index e1e4fa2e0d..b52cf49423 100644 --- a/src/test/resources/no-reflect-and-serialization-list +++ b/src/test/resources/no-reflect-and-serialization-list @@ -81,4 +81,5 @@ org.kohsuke.github.function.SupplierThrows org.kohsuke.github.internal.DefaultGitHubConnector org.kohsuke.github.internal.EnumUtils org.kohsuke.github.internal.Previews -org.kohsuke.github.EnterpriseManagedSupport \ No newline at end of file +org.kohsuke.github.EnterpriseManagedSupport +org.kohsuke.github.GHAutolink \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/1-user.json new file mode 100644 index 0000000000..0764c5a936 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": null, + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 7, + "public_gists": 0, + "followers": 3, + "following": 8, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-11-27T04:01:41Z", + "private_gists": 0, + "total_private_repos": 3, + "owned_private_repos": 3, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json new file mode 100644 index 0000000000..611860a229 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json @@ -0,0 +1,122 @@ +{ + "id": 895799232, + "node_id": "R_kgDONWTPwA", + "name": "github-api-test", + "full_name": "Alaurant/github-api-test", + "private": true, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/github-api-test", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/Alaurant/github-api-test", + "forks_url": "https://api.github.com/repos/Alaurant/github-api-test/forks", + "keys_url": "https://api.github.com/repos/Alaurant/github-api-test/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/github-api-test/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/github-api-test/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/github-api-test/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/github-api-test/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/github-api-test/events", + "assignees_url": "https://api.github.com/repos/Alaurant/github-api-test/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/github-api-test/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/github-api-test/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/github-api-test/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/github-api-test/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/github-api-test/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/github-api-test/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/github-api-test/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/github-api-test/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/github-api-test/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/github-api-test/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/github-api-test/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/github-api-test/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/github-api-test/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/github-api-test/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/github-api-test/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/github-api-test/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/github-api-test/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/github-api-test/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/github-api-test/merges", + "archive_url": "https://api.github.com/repos/Alaurant/github-api-test/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/github-api-test/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/github-api-test/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/github-api-test/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/github-api-test/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/github-api-test/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/github-api-test/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/github-api-test/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/github-api-test/deployments", + "created_at": "2024-11-28T23:44:54Z", + "updated_at": "2024-11-28T23:44:55Z", + "pushed_at": "2024-11-28T23:44:55Z", + "git_url": "git://github.com/Alaurant/github-api-test.git", + "ssh_url": "git@github.com:Alaurant/github-api-test.git", + "clone_url": "https://github.com/Alaurant/github-api-test.git", + "svn_url": "https://github.com/Alaurant/github-api-test", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AJ7BLWFPFMVFENAYEGMMQNTHJGX7M", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "network_count": 0, + "subscribers_count": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json new file mode 100644 index 0000000000..27f2192306 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "235d9d84-9cd7-4be8-931c-15eada0775ef", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08: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/\"8bdc3eaf7312491c8eb245323f2eb3004212814ef5f8184104effa4b32f6b27c\"", + "Last-Modified": "Wed, 27 Nov 2024 04:01:41 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4873", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "127", + "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": "AA94:CE235:B789E:DC5E1:6749AEC9" + } + }, + "uuid": "235d9d84-9cd7-4be8-931c-15eada0775ef", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json new file mode 100644 index 0000000000..f0a0b01ff9 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json @@ -0,0 +1,48 @@ +{ + "id": "a07f11cb-b8ae-4a6a-a486-3b0fae66f3e9", + "name": "repos_alaurant_github-api-test", + "request": { + "url": "/repos/Alaurant/github-api-test", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "2-r_a_github-api-test.json", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08: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/\"7e65dfd17dae8b0f5999ecf48b16504e24747c234146f1413401d052558f8f01\"", + "Last-Modified": "Thu, 28 Nov 2024 23:44:55 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4871", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "129", + "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": "AA95:BC38C:189764:1D15CD:6749AECA" + } + }, + "uuid": "a07f11cb-b8ae-4a6a-a486-3b0fae66f3e9", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json new file mode 100644 index 0000000000..a92c528f38 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json @@ -0,0 +1,54 @@ +{ + "id": "4bf2d1c6-e598-4e44-b5b5-fd2def41755d", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"key_prefix\":\"EXAMPLE-\",\"url_template\":\"https://example.com/TICKET?q=\",\"is_alphanumeric\":true}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "body": "{\"id\":6152588,\"key_prefix\":\"EXAMPLE-\",\"url_template\":\"https://example.com/TICKET?q=\",\"is_alphanumeric\":true}", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08: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": "\"ec4fdc72dbf3168e39facb1e3952c440b2d78ed7b3e58f12404d3dd5b33ebf42\"", + "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": "4870", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "130", + "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": "AA99:B1D42:2AFA65:31D40E:6749AECA" + } + }, + "uuid": "4bf2d1c6-e598-4e44-b5b5-fd2def41755d", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks.json new file mode 100644 index 0000000000..b0446fea0d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks.json @@ -0,0 +1,47 @@ +{ + "id": "b79bb883-abb9-42ad-8b5a-a36b9080b1d4", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "body": "[{\"id\":6152588,\"key_prefix\":\"EXAMPLE-\",\"url_template\":\"https://example.com/TICKET?q=\",\"is_alphanumeric\":true}]", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08: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/\"035218fb6a57fab7a72f21d71239bfcdee1def9903d9e85c0a252f30b5c6af8d\"", + "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": "4869", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "131", + "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": "AA9A:9D84C:43B6C0:4DC18D:6749AECA" + } + }, + "uuid": "b79bb883-abb9-42ad-8b5a-a36b9080b1d4", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks_6152588.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks_6152588.json new file mode 100644 index 0000000000..0910d9239d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks_6152588.json @@ -0,0 +1,43 @@ +{ + "id": "fb9e2a36-6367-424d-b7bb-8609e11de82a", + "name": "repos_alaurant_github-api-test_autolinks_6152588", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6152588", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 204, + "headers": { + "Date": "Fri, 29 Nov 2024 12:08:43 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": "4868", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "132", + "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": "AA9B:BAFFD:1893D5:1D15E9:6749AECB" + } + }, + "uuid": "fb9e2a36-6367-424d-b7bb-8609e11de82a", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/1-user.json new file mode 100644 index 0000000000..0764c5a936 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": null, + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 7, + "public_gists": 0, + "followers": 3, + "following": 8, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-11-27T04:01:41Z", + "private_gists": 0, + "total_private_repos": 3, + "owned_private_repos": 3, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json new file mode 100644 index 0000000000..1137e01e70 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json @@ -0,0 +1,122 @@ +{ + "id": 895799232, + "node_id": "R_kgDONWTPwA", + "name": "github-api-test", + "full_name": "Alaurant/github-api-test", + "private": true, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/github-api-test", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/Alaurant/github-api-test", + "forks_url": "https://api.github.com/repos/Alaurant/github-api-test/forks", + "keys_url": "https://api.github.com/repos/Alaurant/github-api-test/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/github-api-test/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/github-api-test/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/github-api-test/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/github-api-test/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/github-api-test/events", + "assignees_url": "https://api.github.com/repos/Alaurant/github-api-test/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/github-api-test/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/github-api-test/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/github-api-test/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/github-api-test/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/github-api-test/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/github-api-test/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/github-api-test/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/github-api-test/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/github-api-test/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/github-api-test/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/github-api-test/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/github-api-test/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/github-api-test/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/github-api-test/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/github-api-test/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/github-api-test/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/github-api-test/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/github-api-test/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/github-api-test/merges", + "archive_url": "https://api.github.com/repos/Alaurant/github-api-test/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/github-api-test/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/github-api-test/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/github-api-test/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/github-api-test/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/github-api-test/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/github-api-test/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/github-api-test/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/github-api-test/deployments", + "created_at": "2024-11-28T23:44:54Z", + "updated_at": "2024-11-28T23:44:55Z", + "pushed_at": "2024-11-28T23:44:55Z", + "git_url": "git://github.com/Alaurant/github-api-test.git", + "ssh_url": "git@github.com:Alaurant/github-api-test.git", + "clone_url": "https://github.com/Alaurant/github-api-test.git", + "svn_url": "https://github.com/Alaurant/github-api-test", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AJ7BLWGFE5K6FUYWVYPIR6DHJGX6S", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "network_count": 0, + "subscribers_count": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json new file mode 100644 index 0000000000..10c0d89b74 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "e675eb73-a20a-4a74-9d64-745c35780b0c", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08:28 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"8bdc3eaf7312491c8eb245323f2eb3004212814ef5f8184104effa4b32f6b27c\"", + "Last-Modified": "Wed, 27 Nov 2024 04:01:41 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4899", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "101", + "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": "AA45:85433:17F2DD:1C73F3:6749AEBC" + } + }, + "uuid": "e675eb73-a20a-4a74-9d64-745c35780b0c", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json new file mode 100644 index 0000000000..cb992dcf73 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json @@ -0,0 +1,48 @@ +{ + "id": "36064b71-4b99-4741-b1a9-379922804e29", + "name": "repos_alaurant_github-api-test", + "request": { + "url": "/repos/Alaurant/github-api-test", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "2-r_a_github-api-test.json", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08:29 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/\"7e65dfd17dae8b0f5999ecf48b16504e24747c234146f1413401d052558f8f01\"", + "Last-Modified": "Thu, 28 Nov 2024 23:44:55 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4897", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "103", + "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": "AA4A:BC38C:1892D4:1D107D:6749AEBD" + } + }, + "uuid": "36064b71-4b99-4741-b1a9-379922804e29", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json new file mode 100644 index 0000000000..ca96da34fd --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json @@ -0,0 +1,54 @@ +{ + "id": "20591931-6b01-4b01-9bd1-b6f37c76350c", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"key_prefix\":\"DELETE-\",\"url_template\":\"https://example.com/delete/\",\"is_alphanumeric\":true}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "body": "{\"id\":6152571,\"key_prefix\":\"DELETE-\",\"url_template\":\"https://example.com/delete/\",\"is_alphanumeric\":true}", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08:29 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": "\"8d9156e63a219370bff6f41952240cfc404ba49b5ae3a52a43a805d56d4e6993\"", + "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": "4896", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "104", + "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": "AA4B:348A76:1660AAE:19F6903:6749AEBD" + } + }, + "uuid": "20591931-6b01-4b01-9bd1-b6f37c76350c", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6152571.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6152571.json new file mode 100644 index 0000000000..38edc531b7 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6152571.json @@ -0,0 +1,43 @@ +{ + "id": "5205ba37-5864-448c-bf4a-691045a75beb", + "name": "repos_alaurant_github-api-test_autolinks_6152571", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6152571", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 204, + "headers": { + "Date": "Fri, 29 Nov 2024 12:08:30 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": "4895", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "105", + "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": "AA4F:9D84C:43B2CE:4DBCF0:6749AEBE" + } + }, + "uuid": "5205ba37-5864-448c-bf4a-691045a75beb", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6152571.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6152571.json new file mode 100644 index 0000000000..3a53d7feb0 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6152571.json @@ -0,0 +1,45 @@ +{ + "id": "553463ef-4e54-4da1-a599-52d196d00b97", + "name": "repos_alaurant_github-api-test_autolinks_6152571", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6152571", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 404, + "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/rest/repos/autolinks#get-an-autolink-reference-of-a-repository\",\"status\":\"404\"}", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08:30 GMT", + "Content-Type": "application/json; charset=utf-8", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4894", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "106", + "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": "AA50:BAFFD:188FFD:1D114C:6749AEBE" + } + }, + "uuid": "553463ef-4e54-4da1-a599-52d196d00b97", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json new file mode 100644 index 0000000000..c8fdf1fa62 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json @@ -0,0 +1,54 @@ +{ + "id": "0138d5d7-2552-4f7c-9329-9fa9304457f5", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"key_prefix\":\"DELETED-\",\"url_template\":\"https://example.com/delete2/\",\"is_alphanumeric\":true}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "body": "{\"id\":6152576,\"key_prefix\":\"DELETED-\",\"url_template\":\"https://example.com/delete2/\",\"is_alphanumeric\":true}", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08:31 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": "\"18f37a6da6441c66be1e696ad1c486144d0ba450a5938fd097b5922079a97bc5\"", + "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": "4893", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "107", + "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": "AA51:39FBFE:FCA8C7:126DA98:6749AEBF" + } + }, + "uuid": "0138d5d7-2552-4f7c-9329-9fa9304457f5", + "persistent": true, + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6152576.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6152576.json new file mode 100644 index 0000000000..51cb79ab61 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6152576.json @@ -0,0 +1,43 @@ +{ + "id": "f117b38b-e1fe-4e8d-a19e-016e7c71d9ca", + "name": "repos_alaurant_github-api-test_autolinks_6152576", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6152576", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 204, + "headers": { + "Date": "Fri, 29 Nov 2024 12:08:31 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": "4892", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "108", + "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": "AA55:A0F7E:3E1D22:482016:6749AEBF" + } + }, + "uuid": "f117b38b-e1fe-4e8d-a19e-016e7c71d9ca", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6152576.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6152576.json new file mode 100644 index 0000000000..23b362775e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6152576.json @@ -0,0 +1,45 @@ +{ + "id": "e3d28f43-08a6-4ea0-871f-d05b808c8c43", + "name": "repos_alaurant_github-api-test_autolinks_6152576", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6152576", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 404, + "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/rest/repos/autolinks#get-an-autolink-reference-of-a-repository\",\"status\":\"404\"}", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08:32 GMT", + "Content-Type": "application/json; charset=utf-8", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4891", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "109", + "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": "AA56:C0E92:17F7BB:1C7335:6749AEBF" + } + }, + "uuid": "e3d28f43-08a6-4ea0-871f-d05b808c8c43", + "persistent": true, + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json new file mode 100644 index 0000000000..43ce48f2ea --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json @@ -0,0 +1,47 @@ +{ + "id": "cc1427a5-e6ee-40de-ab73-dadb2e2f7204", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "body": "[]", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08:32 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "\"5b744729737bd28d14aeb327919c263d8af99640a7701726d7b2320a638b5c76\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4890", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "110", + "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": "AA57:BD623:19252C:1DAF47:6749AEC0" + } + }, + "uuid": "cc1427a5-e6ee-40de-ab73-dadb2e2f7204", + "persistent": true, + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/__files/1-user.json new file mode 100644 index 0000000000..0764c5a936 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": null, + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 7, + "public_gists": 0, + "followers": 3, + "following": 8, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-11-27T04:01:41Z", + "private_gists": 0, + "total_private_repos": 3, + "owned_private_repos": 3, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/__files/2-r_a_github-api-test.json new file mode 100644 index 0000000000..fd8931c285 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/__files/2-r_a_github-api-test.json @@ -0,0 +1,122 @@ +{ + "id": 895799232, + "node_id": "R_kgDONWTPwA", + "name": "github-api-test", + "full_name": "Alaurant/github-api-test", + "private": true, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/github-api-test", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/Alaurant/github-api-test", + "forks_url": "https://api.github.com/repos/Alaurant/github-api-test/forks", + "keys_url": "https://api.github.com/repos/Alaurant/github-api-test/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/github-api-test/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/github-api-test/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/github-api-test/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/github-api-test/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/github-api-test/events", + "assignees_url": "https://api.github.com/repos/Alaurant/github-api-test/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/github-api-test/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/github-api-test/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/github-api-test/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/github-api-test/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/github-api-test/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/github-api-test/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/github-api-test/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/github-api-test/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/github-api-test/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/github-api-test/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/github-api-test/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/github-api-test/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/github-api-test/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/github-api-test/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/github-api-test/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/github-api-test/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/github-api-test/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/github-api-test/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/github-api-test/merges", + "archive_url": "https://api.github.com/repos/Alaurant/github-api-test/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/github-api-test/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/github-api-test/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/github-api-test/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/github-api-test/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/github-api-test/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/github-api-test/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/github-api-test/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/github-api-test/deployments", + "created_at": "2024-11-28T23:44:54Z", + "updated_at": "2024-11-28T23:44:55Z", + "pushed_at": "2024-11-28T23:44:55Z", + "git_url": "git://github.com/Alaurant/github-api-test.git", + "ssh_url": "git@github.com:Alaurant/github-api-test.git", + "clone_url": "https://github.com/Alaurant/github-api-test.git", + "svn_url": "https://github.com/Alaurant/github-api-test", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AJ7BLWAUVGDG2AWRT3BGNMDHJGX7C", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "network_count": 0, + "subscribers_count": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/1-user.json new file mode 100644 index 0000000000..398f401086 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "a645c520-c716-4c18-b3ee-8569c890487f", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08: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/\"8bdc3eaf7312491c8eb245323f2eb3004212814ef5f8184104effa4b32f6b27c\"", + "Last-Modified": "Wed, 27 Nov 2024 04:01:41 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4882", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "118", + "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": "AA78:348A76:1660CBB:19F6B6E:6749AEC4" + } + }, + "uuid": "a645c520-c716-4c18-b3ee-8569c890487f", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/2-r_a_github-api-test.json new file mode 100644 index 0000000000..6c59240a58 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/2-r_a_github-api-test.json @@ -0,0 +1,48 @@ +{ + "id": "183fe5a6-6e2e-4c57-8b75-d1826e094a8b", + "name": "repos_alaurant_github-api-test", + "request": { + "url": "/repos/Alaurant/github-api-test", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "2-r_a_github-api-test.json", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08: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/\"7e65dfd17dae8b0f5999ecf48b16504e24747c234146f1413401d052558f8f01\"", + "Last-Modified": "Thu, 28 Nov 2024 23:44:55 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4880", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "120", + "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": "AA79:B44B4:181143:1C8F4E:6749AEC5" + } + }, + "uuid": "183fe5a6-6e2e-4c57-8b75-d1826e094a8b", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/3-r_a_g_autolinks.json new file mode 100644 index 0000000000..adef8f0ae6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/3-r_a_g_autolinks.json @@ -0,0 +1,54 @@ +{ + "id": "6ddc045f-2be3-451c-92f0-447177ab2e7d", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "body": "{\"id\":6152582,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true}", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08: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": "\"ab4ac5ab17a6323d45fe3fdba72aed69d6acf1eb0cea20688d8540ab5e2a16b8\"", + "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": "4879", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "121", + "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": "AA7E:39FBFE:FCAAD9:126DD24:6749AEC5" + } + }, + "uuid": "6ddc045f-2be3-451c-92f0-447177ab2e7d", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/4-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/4-r_a_g_autolinks.json new file mode 100644 index 0000000000..fea09f7fc5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/4-r_a_g_autolinks.json @@ -0,0 +1,54 @@ +{ + "id": "0cc88e84-c2da-4957-a7be-413babe73ed6", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "body": "{\"id\":6152583,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08:38 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": "\"78d132df03415dc37356f59db0f25f0fc85435eefdf6fa003e74f3012dfe2100\"", + "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": "4878", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "122", + "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": "AA7F:BC84B:18766D:1CF775:6749AEC6" + } + }, + "uuid": "0cc88e84-c2da-4957-a7be-413babe73ed6", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/5-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/5-r_a_g_autolinks.json new file mode 100644 index 0000000000..c17ac0e767 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/5-r_a_g_autolinks.json @@ -0,0 +1,50 @@ +{ + "id": "5352de4b-7621-453d-b6a6-2a7a40221323", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "body": "[{\"id\":6152582,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true},{\"id\":6152583,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}]", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08:40 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/\"fdc76d59b5589224e9a8f8196f0013adb2472c81c3bd1f1515076811f4dda34c\"", + "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": "4877", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "123", + "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": "AA83:C0E92:17FA36:1C7633:6749AEC7" + } + }, + "uuid": "5352de4b-7621-453d-b6a6-2a7a40221323", + "persistent": true, + "scenarioName": "scenario-1-repos-Alaurant-github-api-test-autolinks", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-Alaurant-github-api-test-autolinks-2", + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/6-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/6-r_a_g_autolinks.json new file mode 100644 index 0000000000..fe5cd9ccd5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/6-r_a_g_autolinks.json @@ -0,0 +1,49 @@ +{ + "id": "7a9a6d30-2355-4ffc-ba4b-9e95525f71a3", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "body": "[{\"id\":6152582,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true},{\"id\":6152583,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}]", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08:40 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/\"fdc76d59b5589224e9a8f8196f0013adb2472c81c3bd1f1515076811f4dda34c\"", + "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": "4876", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "124", + "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": "AA87:348A76:1660DEC:19F6CED:6749AEC8" + } + }, + "uuid": "7a9a6d30-2355-4ffc-ba4b-9e95525f71a3", + "persistent": true, + "scenarioName": "scenario-1-repos-Alaurant-github-api-test-autolinks", + "requiredScenarioState": "scenario-1-repos-Alaurant-github-api-test-autolinks-2", + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/7-r_a_g_autolinks_6152582.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/7-r_a_g_autolinks_6152582.json new file mode 100644 index 0000000000..2b6f866592 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/7-r_a_g_autolinks_6152582.json @@ -0,0 +1,43 @@ +{ + "id": "000b1a98-d980-4ea7-94ec-e8b7acdb7949", + "name": "repos_alaurant_github-api-test_autolinks_6152582", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6152582", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 204, + "headers": { + "Date": "Fri, 29 Nov 2024 12:08:40 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": "4875", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "125", + "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": "AA88:B44B4:181254:1C9080:6749AEC8" + } + }, + "uuid": "000b1a98-d980-4ea7-94ec-e8b7acdb7949", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/8-r_a_g_autolinks_6152583.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/8-r_a_g_autolinks_6152583.json new file mode 100644 index 0000000000..4d790cb503 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/8-r_a_g_autolinks_6152583.json @@ -0,0 +1,43 @@ +{ + "id": "48d63973-1b3c-4d84-a5af-88cb182f7f58", + "name": "repos_alaurant_github-api-test_autolinks_6152583", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6152583", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 204, + "headers": { + "Date": "Fri, 29 Nov 2024 12:08:41 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "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": "4874", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "126", + "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": "AA89:A1026:42C9FD:4CD074:6749AEC9" + } + }, + "uuid": "48d63973-1b3c-4d84-a5af-88cb182f7f58", + "persistent": true, + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/__files/1-user.json new file mode 100644 index 0000000000..0764c5a936 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": null, + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 7, + "public_gists": 0, + "followers": 3, + "following": 8, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-11-27T04:01:41Z", + "private_gists": 0, + "total_private_repos": 3, + "owned_private_repos": 3, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/__files/2-r_a_github-api-test.json new file mode 100644 index 0000000000..e93ced287f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/__files/2-r_a_github-api-test.json @@ -0,0 +1,122 @@ +{ + "id": 895799232, + "node_id": "R_kgDONWTPwA", + "name": "github-api-test", + "full_name": "Alaurant/github-api-test", + "private": true, + "owner": { + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/Alaurant/github-api-test", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/Alaurant/github-api-test", + "forks_url": "https://api.github.com/repos/Alaurant/github-api-test/forks", + "keys_url": "https://api.github.com/repos/Alaurant/github-api-test/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Alaurant/github-api-test/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Alaurant/github-api-test/teams", + "hooks_url": "https://api.github.com/repos/Alaurant/github-api-test/hooks", + "issue_events_url": "https://api.github.com/repos/Alaurant/github-api-test/issues/events{/number}", + "events_url": "https://api.github.com/repos/Alaurant/github-api-test/events", + "assignees_url": "https://api.github.com/repos/Alaurant/github-api-test/assignees{/user}", + "branches_url": "https://api.github.com/repos/Alaurant/github-api-test/branches{/branch}", + "tags_url": "https://api.github.com/repos/Alaurant/github-api-test/tags", + "blobs_url": "https://api.github.com/repos/Alaurant/github-api-test/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Alaurant/github-api-test/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Alaurant/github-api-test/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Alaurant/github-api-test/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Alaurant/github-api-test/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Alaurant/github-api-test/languages", + "stargazers_url": "https://api.github.com/repos/Alaurant/github-api-test/stargazers", + "contributors_url": "https://api.github.com/repos/Alaurant/github-api-test/contributors", + "subscribers_url": "https://api.github.com/repos/Alaurant/github-api-test/subscribers", + "subscription_url": "https://api.github.com/repos/Alaurant/github-api-test/subscription", + "commits_url": "https://api.github.com/repos/Alaurant/github-api-test/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Alaurant/github-api-test/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Alaurant/github-api-test/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Alaurant/github-api-test/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Alaurant/github-api-test/contents/{+path}", + "compare_url": "https://api.github.com/repos/Alaurant/github-api-test/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Alaurant/github-api-test/merges", + "archive_url": "https://api.github.com/repos/Alaurant/github-api-test/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Alaurant/github-api-test/downloads", + "issues_url": "https://api.github.com/repos/Alaurant/github-api-test/issues{/number}", + "pulls_url": "https://api.github.com/repos/Alaurant/github-api-test/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Alaurant/github-api-test/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Alaurant/github-api-test/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Alaurant/github-api-test/labels{/name}", + "releases_url": "https://api.github.com/repos/Alaurant/github-api-test/releases{/id}", + "deployments_url": "https://api.github.com/repos/Alaurant/github-api-test/deployments", + "created_at": "2024-11-28T23:44:54Z", + "updated_at": "2024-11-28T23:44:55Z", + "pushed_at": "2024-11-28T23:44:55Z", + "git_url": "git://github.com/Alaurant/github-api-test.git", + "ssh_url": "git@github.com:Alaurant/github-api-test.git", + "clone_url": "https://github.com/Alaurant/github-api-test.git", + "svn_url": "https://github.com/Alaurant/github-api-test", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AJ7BLWEHS5V3ECCFWNDRQDTHJGX64", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "network_count": 0, + "subscribers_count": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/1-user.json new file mode 100644 index 0000000000..5d8ad625bc --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "a7f46e4b-e5c6-4909-8919-086127a448cd", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08: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/\"8bdc3eaf7312491c8eb245323f2eb3004212814ef5f8184104effa4b32f6b27c\"", + "Last-Modified": "Wed, 27 Nov 2024 04:01:41 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4889", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "111", + "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": "AA62:9BA56:40EB4D:4AEEB2:6749AEC1" + } + }, + "uuid": "a7f46e4b-e5c6-4909-8919-086127a448cd", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/2-r_a_github-api-test.json new file mode 100644 index 0000000000..1b3eba4a56 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/2-r_a_github-api-test.json @@ -0,0 +1,48 @@ +{ + "id": "ab00ffa1-3b5a-4230-b0c2-6cac85becc40", + "name": "repos_alaurant_github-api-test", + "request": { + "url": "/repos/Alaurant/github-api-test", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "2-r_a_github-api-test.json", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08: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/\"7e65dfd17dae8b0f5999ecf48b16504e24747c234146f1413401d052558f8f01\"", + "Last-Modified": "Thu, 28 Nov 2024 23:44:55 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4887", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "113", + "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": "AA66:BD623:1925B4:1DAFEE:6749AEC2" + } + }, + "uuid": "ab00ffa1-3b5a-4230-b0c2-6cac85becc40", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/3-r_a_g_autolinks.json new file mode 100644 index 0000000000..3810202097 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/3-r_a_g_autolinks.json @@ -0,0 +1,54 @@ +{ + "id": "f4e4b582-1e9b-4e33-9485-8b034896ebd8", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "body": "{\"id\":6152578,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08: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": "\"7a522d9ee974e1e1c1e353b0f7e15ee6a601dd4516389fc4eb25bcd7e8351240\"", + "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": "4886", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "114", + "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": "AA67:CE235:B76B8:DC397:6749AEC2" + } + }, + "uuid": "f4e4b582-1e9b-4e33-9485-8b034896ebd8", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/4-r_a_g_autolinks_6152578.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/4-r_a_g_autolinks_6152578.json new file mode 100644 index 0000000000..99befe2f6a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/4-r_a_g_autolinks_6152578.json @@ -0,0 +1,47 @@ +{ + "id": "477be2b8-460f-4b93-96af-b9bd1e0e7a13", + "name": "repos_alaurant_github-api-test_autolinks_6152578", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6152578", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "body": "{\"id\":6152578,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08: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": "W/\"7a522d9ee974e1e1c1e353b0f7e15ee6a601dd4516389fc4eb25bcd7e8351240\"", + "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": "4885", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "115", + "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": "AA6B:A1026:42C835:4CCE44:6749AEC3" + } + }, + "uuid": "477be2b8-460f-4b93-96af-b9bd1e0e7a13", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/5-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/5-r_a_g_autolinks.json new file mode 100644 index 0000000000..bf62df7b28 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/5-r_a_g_autolinks.json @@ -0,0 +1,47 @@ +{ + "id": "eb10f07a-6768-4cee-8aeb-efddfd73e0d1", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "body": "[{\"id\":6152578,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}]", + "headers": { + "Date": "Fri, 29 Nov 2024 12:08: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": "W/\"6f678377124328ea46573d437d7649f4e5ad37d2be90305bad7ba4010a2fe5f0\"", + "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": "4884", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "116", + "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": "AA6C:B1D42:2AF7F5:31D141:6749AEC3" + } + }, + "uuid": "eb10f07a-6768-4cee-8aeb-efddfd73e0d1", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/6-r_a_g_autolinks_6152578.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/6-r_a_g_autolinks_6152578.json new file mode 100644 index 0000000000..bd4b7d8605 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/6-r_a_g_autolinks_6152578.json @@ -0,0 +1,43 @@ +{ + "id": "c1bbac38-d91b-43e8-8ced-4b705d8ed5ac", + "name": "repos_alaurant_github-api-test_autolinks_6152578", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6152578", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 204, + "headers": { + "Date": "Fri, 29 Nov 2024 12:08: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": "4883", + "X-RateLimit-Reset": "1732885041", + "X-RateLimit-Used": "117", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "AA6D:9D84C:43B47D:4DBEF5:6749AEC3" + } + }, + "uuid": "c1bbac38-d91b-43e8-8ced-4b705d8ed5ac", + "persistent": true, + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/user_whenProxying_AuthCorrectlyConfigured/__files/1-user.json b/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/user_whenProxying_AuthCorrectlyConfigured/__files/1-user.json new file mode 100644 index 0000000000..56ff784983 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/user_whenProxying_AuthCorrectlyConfigured/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": null, + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 7, + "public_gists": 0, + "followers": 3, + "following": 8, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-11-27T04:01:41Z", + "private_gists": 0, + "total_private_repos": 2, + "owned_private_repos": 2, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/user_whenProxying_AuthCorrectlyConfigured/mappings/1-user.json b/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/user_whenProxying_AuthCorrectlyConfigured/mappings/1-user.json new file mode 100644 index 0000000000..97d97463cf --- /dev/null +++ b/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/user_whenProxying_AuthCorrectlyConfigured/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "64916a9b-5eda-42af-9c98-48ae56c4d534", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Thu, 28 Nov 2024 03:26:34 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"649a1838c989cc406542c8419b31064e1c7a6202454895df13e7b35e43b8653b\"", + "Last-Modified": "Wed, 27 Nov 2024 04:01:41 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4881", + "X-RateLimit-Reset": "1732767344", + "X-RateLimit-Used": "119", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AA1E:348A76:BD20B0:DB5BDF:6747E2EA" + } + }, + "uuid": "64916a9b-5eda-42af-9c98-48ae56c4d534", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/whenSnapshot_EnsureProxy/__files/1-user.json b/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/whenSnapshot_EnsureProxy/__files/1-user.json new file mode 100644 index 0000000000..56ff784983 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/whenSnapshot_EnsureProxy/__files/1-user.json @@ -0,0 +1,48 @@ +{ + "login": "Alaurant", + "id": 41817560, + "node_id": "MDQ6VXNlcjQxODE3NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/41817560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Alaurant", + "html_url": "https://github.com/Alaurant", + "followers_url": "https://api.github.com/users/Alaurant/followers", + "following_url": "https://api.github.com/users/Alaurant/following{/other_user}", + "gists_url": "https://api.github.com/users/Alaurant/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Alaurant/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Alaurant/subscriptions", + "organizations_url": "https://api.github.com/users/Alaurant/orgs", + "repos_url": "https://api.github.com/users/Alaurant/repos", + "events_url": "https://api.github.com/users/Alaurant/events{/privacy}", + "received_events_url": "https://api.github.com/users/Alaurant/received_events", + "type": "User", + "user_view_type": "private", + "site_admin": false, + "name": "Danyang Zhao", + "company": null, + "blog": "", + "location": null, + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "notification_email": null, + "public_repos": 7, + "public_gists": 0, + "followers": 3, + "following": 8, + "created_at": "2018-07-28T07:03:48Z", + "updated_at": "2024-11-27T04:01:41Z", + "private_gists": 0, + "total_private_repos": 2, + "owned_private_repos": 2, + "disk_usage": 7314, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/whenSnapshot_EnsureProxy/mappings/1-user.json b/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/whenSnapshot_EnsureProxy/mappings/1-user.json new file mode 100644 index 0000000000..0d35435e64 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/WireMockStatusReporterTest/wiremock/whenSnapshot_EnsureProxy/mappings/1-user.json @@ -0,0 +1,48 @@ +{ + "id": "7de2b730-9b8e-4691-a676-4458c8cfd026", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "1-user.json", + "headers": { + "Date": "Thu, 28 Nov 2024 03:26:33 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "W/\"649a1838c989cc406542c8419b31064e1c7a6202454895df13e7b35e43b8653b\"", + "Last-Modified": "Wed, 27 Nov 2024 04:01:41 GMT", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4883", + "X-RateLimit-Reset": "1732767344", + "X-RateLimit-Used": "117", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "AA13:3A04E5:529DA2:61BA25:6747E2E9" + } + }, + "uuid": "7de2b730-9b8e-4691-a676-4458c8cfd026", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file From 6574ae20dfdbd0fc66c3ee2a6ba2f74d7e2d0061 Mon Sep 17 00:00:00 2001 From: Alaurant Date: Sat, 30 Nov 2024 00:06:42 +1000 Subject: [PATCH 2/5] add java doc --- src/main/java/org/kohsuke/github/GHAutolink.java | 14 ++++++++++---- .../resources/no-reflect-and-serialization-list | 3 ++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/kohsuke/github/GHAutolink.java b/src/main/java/org/kohsuke/github/GHAutolink.java index 05d0000c9f..481e05257f 100644 --- a/src/main/java/org/kohsuke/github/GHAutolink.java +++ b/src/main/java/org/kohsuke/github/GHAutolink.java @@ -4,22 +4,28 @@ import java.io.IOException; -// TODO: Auto-generated Javadoc /** - * The type Gh autolink. + * Represents a GitHub repository autolink reference. * * @author Alaurant * @see GHAutolinkBuilder - * @see GHRepository#getAutolinks() + * @see GHRepository#getAutolinks() GHRepository#getAutolinks() * @see Repository autolinks API */ public class GHAutolink { + private Integer id; private String key_prefix; private String url_template; private boolean is_alphanumeric; private GHRepository owner; + /** + * Instantiates a new Gh autolink. + */ + public GHAutolink() { + } + /** * Gets the autolink ID * @@ -81,7 +87,7 @@ public void delete() throws IOException { } /** - * Wraps this autolink with its owner repository + * Wraps this autolink with its owner repository. * * @param owner * the repository that owns this autolink diff --git a/src/test/resources/no-reflect-and-serialization-list b/src/test/resources/no-reflect-and-serialization-list index b52cf49423..8e6ceafcdb 100644 --- a/src/test/resources/no-reflect-and-serialization-list +++ b/src/test/resources/no-reflect-and-serialization-list @@ -82,4 +82,5 @@ org.kohsuke.github.internal.DefaultGitHubConnector org.kohsuke.github.internal.EnumUtils org.kohsuke.github.internal.Previews org.kohsuke.github.EnterpriseManagedSupport -org.kohsuke.github.GHAutolink \ No newline at end of file +org.kohsuke.github.GHAutolink +org.kohsuke.github.GHAutolinkBuilder \ No newline at end of file From 2ad3c5b5ab44a1d246096070beb560c55bcaae00 Mon Sep 17 00:00:00 2001 From: Alaurant Date: Tue, 3 Dec 2024 17:02:52 +1000 Subject: [PATCH 3/5] change method names --- .../java/org/kohsuke/github/GHAutolink.java | 2 +- .../java/org/kohsuke/github/GHRepository.java | 8 +- .../org/kohsuke/github/GHAutolinkTest.java | 110 ++++++++++-------- .../__files/2-r_a_github-api-test.json | 2 +- .../testCreateAutolink/mappings/1-user.json | 14 +-- .../mappings/2-r_a_github-api-test.json | 14 +-- .../mappings/3-r_a_g_autolinks.json | 18 +-- .../mappings/4-r_a_g_autolinks_6208102.json} | 18 +-- .../mappings/5-r_a_g_autolinks.json | 18 +-- .../__files/2-r_a_github-api-test.json | 2 +- .../testDeleteAutolink/mappings/1-user.json | 14 +-- .../mappings/2-r_a_github-api-test.json | 14 +-- .../mappings/3-r_a_g_autolinks.json | 18 +-- .../mappings/4-r_a_g_autolinks_6208097.json} | 20 ++-- ...71.json => 5-r_a_g_autolinks_6208097.json} | 18 +-- .../mappings/6-r_a_g_autolinks.json | 18 +-- ...76.json => 7-r_a_g_autolinks_6208098.json} | 18 +-- ...76.json => 8-r_a_g_autolinks_6208098.json} | 18 +-- .../mappings/9-r_a_g_autolinks.json | 14 +-- .../mappings/6-r_a_g_autolinks_6152578.json | 43 ------- .../__files/1-user.json | 0 .../__files/2-r_a_github-api-test.json | 2 +- .../mappings/1-user.json | 14 +-- .../mappings/2-r_a_github-api-test.json | 14 +-- .../mappings/3-r_a_g_autolinks.json | 50 ++++++++ .../mappings/4-r_a_g_autolinks.json} | 20 ++-- .../mappings/5-r_a_g_autolinks.json} | 20 ++-- .../mappings/6-r_a_g_autolinks.json} | 24 ++-- .../mappings/7-r_a_g_autolinks.json} | 22 ++-- .../mappings/8-r_a_g_autolinks_6208099.json} | 18 +-- .../mappings/9-r_a_g_autolinks_6208100.json | 43 +++++++ .../__files/1-user.json | 0 .../__files/2-r_a_github-api-test.json | 2 +- .../mappings/1-user.json | 14 +-- .../mappings/2-r_a_github-api-test.json | 14 +-- .../mappings/3-r_a_g_autolinks.json | 18 +-- .../mappings/4-r_a_g_autolinks_6208101.json} | 22 ++-- .../mappings/5-r_a_g_autolinks_6208101.json} | 18 +-- .../mappings/6-r_a_g_autolinks.json} | 20 ++-- 39 files changed, 401 insertions(+), 335 deletions(-) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testDeleteAutolink/mappings/4-r_a_g_autolinks_6152571.json => testCreateAutolink/mappings/4-r_a_g_autolinks_6208102.json} (77%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testGetAutolink => testCreateAutolink}/mappings/5-r_a_g_autolinks.json (77%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testGetAllAutolinks/mappings/7-r_a_g_autolinks_6152582.json => testDeleteAutolink/mappings/4-r_a_g_autolinks_6208097.json} (76%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/{5-r_a_g_autolinks_6152571.json => 5-r_a_g_autolinks_6208097.json} (80%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/{7-r_a_g_autolinks_6152576.json => 7-r_a_g_autolinks_6208098.json} (77%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/{8-r_a_g_autolinks_6152576.json => 8-r_a_g_autolinks_6208098.json} (80%) delete mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/6-r_a_g_autolinks_6152578.json rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testGetAllAutolinks => testListAllAutolinks}/__files/1-user.json (100%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testGetAllAutolinks => testListAllAutolinks}/__files/2-r_a_github-api-test.json (99%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testGetAutolink => testListAllAutolinks}/mappings/1-user.json (85%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testGetAllAutolinks => testListAllAutolinks}/mappings/2-r_a_github-api-test.json (86%) create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/3-r_a_g_autolinks.json rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testGetAllAutolinks/mappings/3-r_a_g_autolinks.json => testListAllAutolinks/mappings/4-r_a_g_autolinks.json} (81%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testGetAllAutolinks/mappings/4-r_a_g_autolinks.json => testListAllAutolinks/mappings/5-r_a_g_autolinks.json} (81%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testGetAllAutolinks/mappings/5-r_a_g_autolinks.json => testListAllAutolinks/mappings/6-r_a_g_autolinks.json} (76%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testGetAllAutolinks/mappings/6-r_a_g_autolinks.json => testListAllAutolinks/mappings/7-r_a_g_autolinks.json} (78%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testGetAllAutolinks/mappings/8-r_a_g_autolinks_6152583.json => testListAllAutolinks/mappings/8-r_a_g_autolinks_6208099.json} (77%) create mode 100644 src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6208100.json rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testGetAutolink => testReadAutolink}/__files/1-user.json (100%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testGetAutolink => testReadAutolink}/__files/2-r_a_github-api-test.json (99%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testGetAllAutolinks => testReadAutolink}/mappings/1-user.json (85%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testGetAutolink => testReadAutolink}/mappings/2-r_a_github-api-test.json (86%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testGetAutolink => testReadAutolink}/mappings/3-r_a_g_autolinks.json (82%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testGetAutolink/mappings/4-r_a_g_autolinks_6152578.json => testReadAutolink/mappings/4-r_a_g_autolinks_6208101.json} (75%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testCreateAutolink/mappings/5-r_a_g_autolinks_6152588.json => testReadAutolink/mappings/5-r_a_g_autolinks_6208101.json} (77%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/{testCreateAutolink/mappings/4-r_a_g_autolinks.json => testReadAutolink/mappings/6-r_a_g_autolinks.json} (76%) diff --git a/src/main/java/org/kohsuke/github/GHAutolink.java b/src/main/java/org/kohsuke/github/GHAutolink.java index 481e05257f..ca819f9de9 100644 --- a/src/main/java/org/kohsuke/github/GHAutolink.java +++ b/src/main/java/org/kohsuke/github/GHAutolink.java @@ -9,7 +9,7 @@ * * @author Alaurant * @see GHAutolinkBuilder - * @see GHRepository#getAutolinks() GHRepository#getAutolinks() + * @see GHRepository#listAutolinks() GHRepository#listAutolinks() * @see Repository autolinks API */ public class GHAutolink { diff --git a/src/main/java/org/kohsuke/github/GHRepository.java b/src/main/java/org/kohsuke/github/GHRepository.java index a587669207..1b227b3d22 100644 --- a/src/main/java/org/kohsuke/github/GHRepository.java +++ b/src/main/java/org/kohsuke/github/GHRepository.java @@ -3386,14 +3386,14 @@ public GHAutolinkBuilder createAutolink() { } /** - * Gets all autolinks of a repo (admin only). + * List all autolinks of a repo (admin only). * (https://docs.github.com/en/rest/repos/autolinks?apiVersion=2022-11-28#get-all-autolinks-of-a-repository) * * @return the autolinks * @throws IOException * the io exception */ - public PagedIterable getAutolinks() throws IOException { + public PagedIterable listAutolinks() throws IOException { return root().createRequest() .withHeader("Accept", "application/vnd.github+json") .withUrlPath(String.format("/repos/%s/%s/autolinks", getOwnerName(), getName())) @@ -3401,7 +3401,7 @@ public PagedIterable getAutolinks() throws IOException { } /** - * Gets an autolink by ID. + * Read an autolink by ID. * (https://docs.github.com/en/rest/repos/autolinks?apiVersion=2022-11-28#get-an-autolink-reference-of-a-repository) * * @param autolinkId @@ -3410,7 +3410,7 @@ public PagedIterable getAutolinks() throws IOException { * @throws IOException * the io exception */ - public GHAutolink getAutolink(Integer autolinkId) throws IOException { + public GHAutolink readAutolink(Integer autolinkId) throws IOException { return root().createRequest() .withHeader("Accept", "application/vnd.github+json") .withUrlPath(String.format("/repos/%s/%s/autolinks/%d", getOwnerName(), getName(), autolinkId)) diff --git a/src/test/java/org/kohsuke/github/GHAutolinkTest.java b/src/test/java/org/kohsuke/github/GHAutolinkTest.java index 344ec9a30e..5e76c2d7be 100644 --- a/src/test/java/org/kohsuke/github/GHAutolinkTest.java +++ b/src/test/java/org/kohsuke/github/GHAutolinkTest.java @@ -4,6 +4,8 @@ import org.junit.Before; import org.junit.Test; +import java.util.List; + import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; @@ -31,6 +33,9 @@ public GHAutolinkTest() { @Before public void setUp() throws Exception { repo = gitHub.getRepository("Alaurant/github-api-test"); + if (repo == null) { + throw new IllegalStateException("Failed to initialize repository"); + } } /** @@ -57,6 +62,8 @@ public void testCreateAutolink() throws Exception { assertThat(autolink.isAlphanumeric(), equalTo(isAlphanumeric)); assertThat(autolink.getOwner(), equalTo(repo)); + autolink.delete(); + } /** @@ -66,14 +73,14 @@ public void testCreateAutolink() throws Exception { * the exception */ @Test - public void testGetAutolink() throws Exception { + public void testReadAutolink() throws Exception { GHAutolink autolink = repo.createAutolink() .withKeyPrefix("JIRA-") .withUrlTemplate("https://example.com/test/") .withIsAlphanumeric(false) .create(); - GHAutolink fetched = repo.getAutolink(autolink.getId()); + GHAutolink fetched = repo.readAutolink(autolink.getId()); assertThat(fetched.getId(), equalTo(autolink.getId())); assertThat(fetched.getKeyPrefix(), equalTo(autolink.getKeyPrefix())); @@ -81,6 +88,8 @@ public void testGetAutolink() throws Exception { assertThat(fetched.isAlphanumeric(), equalTo(autolink.isAlphanumeric())); assertThat(fetched.getOwner(), equalTo(repo)); + autolink.delete(); + } /** @@ -90,44 +99,48 @@ public void testGetAutolink() throws Exception { * the exception */ @Test - public void testGetAllAutolinks() throws Exception { - GHAutolink autolink1 = repo.createAutolink() - .withKeyPrefix("LIST-") - .withUrlTemplate("https://example.com/list1/") - .withIsAlphanumeric(true) - .create(); - - GHAutolink autolink2 = repo.createAutolink() - .withKeyPrefix("LISTED-") - .withUrlTemplate("https://example.com/list2/") - .withIsAlphanumeric(false) - .create(); - Thread.sleep(1000); + public void testListAllAutolinks() throws Exception { + assertThat("Initial autolinks should be empty", repo.listAutolinks().toList(), is(empty())); - boolean found1 = false; - boolean found2 = false; - - PagedIterable autolinks = repo.getAutolinks(); - - for (GHAutolink autolink : autolinks) { - - if (autolink.getId().equals(autolink1.getId())) { - found1 = true; - assertThat(autolink.getKeyPrefix(), equalTo(autolink1.getKeyPrefix())); - assertThat(autolink.getUrlTemplate(), equalTo(autolink1.getUrlTemplate())); - assertThat(autolink.isAlphanumeric(), equalTo(autolink1.isAlphanumeric())); - } - if (autolink.getId().equals(autolink2.getId())) { - found2 = true; - assertThat(autolink.getKeyPrefix(), equalTo(autolink2.getKeyPrefix())); - assertThat(autolink.getUrlTemplate(), equalTo(autolink2.getUrlTemplate())); - assertThat(autolink.isAlphanumeric(), equalTo(autolink2.isAlphanumeric())); - } + try { + GHAutolink autolink1 = repo.createAutolink() + .withKeyPrefix("LIST-") + .withUrlTemplate("https://example.com/list1/") + .withIsAlphanumeric(true) + .create(); + + GHAutolink autolink2 = repo.createAutolink() + .withKeyPrefix("LISTED-") + .withUrlTemplate("https://example.com/list2/") + .withIsAlphanumeric(false) + .create(); + + List autolinks = repo.listAutolinks().toList(); + assertThat("Should have exactly 2 autolinks", ((List) autolinks).size(), is(2)); + + GHAutolink foundAutolink1 = autolinks.stream() + .filter(a -> a.getId().equals(autolink1.getId())) + .findFirst() + .orElseThrow(() -> new AssertionError("Autolink 1 not found")); + + GHAutolink foundAutolink2 = autolinks.stream() + .filter(a -> a.getId().equals(autolink2.getId())) + .findFirst() + .orElseThrow(() -> new AssertionError("Autolink 2 not found")); + + assertAutolinksEqual(autolink1, foundAutolink1); + assertAutolinksEqual(autolink2, foundAutolink2); + + } catch (Exception e) { + System.err.println("Failed to list autolinks: " + e.getMessage()); } + } - assertThat("First autolink", found1, is(true)); - assertThat("Second autolink", found2, is(true)); - + private void assertAutolinksEqual(GHAutolink expected, GHAutolink actual) { + assertThat(actual.getKeyPrefix(), equalTo(expected.getKeyPrefix())); + assertThat(actual.getUrlTemplate(), equalTo(expected.getUrlTemplate())); + assertThat(actual.isAlphanumeric(), equalTo(expected.isAlphanumeric())); + assertThat(actual.getOwner(), equalTo(expected.getOwner())); } /** @@ -148,7 +161,7 @@ public void testDeleteAutolink() throws Exception { autolink.delete(); try { - repo.getAutolink(autolink.getId()); + repo.readAutolink(autolink.getId()); fail("Expected GHFileNotFoundException"); } catch (GHFileNotFoundException e) { // Expected @@ -164,7 +177,7 @@ public void testDeleteAutolink() throws Exception { repo.deleteAutolink(autolink.getId()); try { - repo.getAutolink(autolink.getId()); + repo.readAutolink(autolink.getId()); fail("Expected GHFileNotFoundException"); } catch (GHFileNotFoundException e) { // Expected @@ -179,16 +192,19 @@ public void testDeleteAutolink() throws Exception { */ @After public void cleanup() throws Exception { - try { - for (GHAutolink autolink : repo.getAutolinks()) { - try { - autolink.delete(); - } catch (GHFileNotFoundException e) { - // Ignore 404 errors during cleanup + if (repo != null) { + try { + PagedIterable autolinks = repo.listAutolinks(); + for (GHAutolink autolink : autolinks) { + try { + autolink.delete(); + } catch (Exception e) { + System.err.println("Failed to delete autolink: " + e.getMessage()); + } } + } catch (Exception e) { + System.err.println("Cleanup failed: " + e.getMessage()); } - } catch (GHFileNotFoundException e) { - // Ignore if no autolinks exist } } } diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json index 611860a229..f66751c5ad 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json @@ -105,7 +105,7 @@ "triage": true, "pull": true }, - "temp_clone_token": "AJ7BLWFPFMVFENAYEGMMQNTHJGX7M", + "temp_clone_token": "AJ7BLWGMBCV4RX4BQQXEBOTHJ2WGQ", "allow_squash_merge": true, "allow_merge_commit": true, "allow_rebase_merge": true, diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json index 27f2192306..950e327801 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json @@ -1,5 +1,5 @@ { - "id": "235d9d84-9cd7-4be8-931c-15eada0775ef", + "id": "a4f46a34-8c81-44e9-bec4-043ba7bdcb10", "name": "user", "request": { "url": "/user", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "1-user.json", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:41 GMT", + "Date": "Tue, 03 Dec 2024 06:54: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", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4873", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "127", + "X-RateLimit-Remaining": "4953", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "47", "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": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA94:CE235:B789E:DC5E1:6749AEC9" + "X-GitHub-Request-Id": "AB78:259AD1:61CD9C:72C698:674EAB3B" } }, - "uuid": "235d9d84-9cd7-4be8-931c-15eada0775ef", + "uuid": "a4f46a34-8c81-44e9-bec4-043ba7bdcb10", "persistent": true, "insertionIndex": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json index f0a0b01ff9..df1a64b58e 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json @@ -1,5 +1,5 @@ { - "id": "a07f11cb-b8ae-4a6a-a486-3b0fae66f3e9", + "id": "ee74a0a7-35fd-4683-a471-587c81678ae3", "name": "repos_alaurant_github-api-test", "request": { "url": "/repos/Alaurant/github-api-test", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "2-r_a_github-api-test.json", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:42 GMT", + "Date": "Tue, 03 Dec 2024 06:54: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", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4871", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "129", + "X-RateLimit-Remaining": "4951", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "49", "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": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA95:BC38C:189764:1D15CD:6749AECA" + "X-GitHub-Request-Id": "ABD3:275BE1:5986ED:681867:674EAB3C" } }, - "uuid": "a07f11cb-b8ae-4a6a-a486-3b0fae66f3e9", + "uuid": "ee74a0a7-35fd-4683-a471-587c81678ae3", "persistent": true, "insertionIndex": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json index a92c528f38..1c5c951d56 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "4bf2d1c6-e598-4e44-b5b5-fd2def41755d", + "id": "e03166d6-8ef7-42ef-9fd9-3c37415b29d8", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6152588,\"key_prefix\":\"EXAMPLE-\",\"url_template\":\"https://example.com/TICKET?q=\",\"is_alphanumeric\":true}", + "body": "{\"id\":6208102,\"key_prefix\":\"EXAMPLE-\",\"url_template\":\"https://example.com/TICKET?q=\",\"is_alphanumeric\":true}", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:42 GMT", + "Date": "Tue, 03 Dec 2024 06:54: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": "\"ec4fdc72dbf3168e39facb1e3952c440b2d78ed7b3e58f12404d3dd5b33ebf42\"", + "ETag": "\"a43aceb24d084ac36cc51df4652c6770f8d169d875ecf46247ac99b589e441fe\"", "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": "4870", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "130", + "X-RateLimit-Remaining": "4950", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "50", "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": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA99:B1D42:2AFA65:31D40E:6749AECA" + "X-GitHub-Request-Id": "ABD4:25E009:63825C:747B1A:674EAB3D" } }, - "uuid": "4bf2d1c6-e598-4e44-b5b5-fd2def41755d", + "uuid": "e03166d6-8ef7-42ef-9fd9-3c37415b29d8", "persistent": true, "insertionIndex": 3 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6152571.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6208102.json similarity index 77% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6152571.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6208102.json index 38edc531b7..afaaced255 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6152571.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6208102.json @@ -1,8 +1,8 @@ { - "id": "5205ba37-5864-448c-bf4a-691045a75beb", - "name": "repos_alaurant_github-api-test_autolinks_6152571", + "id": "5f7726c7-5f1a-4f69-9fee-3d2b34dcc2ee", + "name": "repos_alaurant_github-api-test_autolinks_6208102", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6152571", + "url": "/repos/Alaurant/github-api-test/autolinks/6208102", "method": "DELETE", "headers": { "Accept": { @@ -13,16 +13,16 @@ "response": { "status": 204, "headers": { - "Date": "Fri, 29 Nov 2024 12:08:30 GMT", + "Date": "Tue, 03 Dec 2024 06:54:53 GMT", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4895", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "105", + "X-RateLimit-Remaining": "4949", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "51", "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": "*", @@ -34,10 +34,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AA4F:9D84C:43B2CE:4DBCF0:6749AEBE" + "X-GitHub-Request-Id": "ABD8:25DAE6:6CEF86:7DE85D:674EAB3D" } }, - "uuid": "5205ba37-5864-448c-bf4a-691045a75beb", + "uuid": "5f7726c7-5f1a-4f69-9fee-3d2b34dcc2ee", "persistent": true, "insertionIndex": 4 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/5-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks.json similarity index 77% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/5-r_a_g_autolinks.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks.json index bf62df7b28..6e880036db 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/5-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "eb10f07a-6768-4cee-8aeb-efddfd73e0d1", + "id": "b52b17ed-3b65-49ed-8179-e767d374d15b", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -12,22 +12,22 @@ }, "response": { "status": 200, - "body": "[{\"id\":6152578,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}]", + "body": "[]", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:35 GMT", + "Date": "Tue, 03 Dec 2024 06:54:54 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", - "ETag": "W/\"6f678377124328ea46573d437d7649f4e5ad37d2be90305bad7ba4010a2fe5f0\"", + "ETag": "\"5b744729737bd28d14aeb327919c263d8af99640a7701726d7b2320a638b5c76\"", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4884", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "116", + "X-RateLimit-Remaining": "4948", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "52", "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": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA6C:B1D42:2AF7F5:31D141:6749AEC3" + "X-GitHub-Request-Id": "ABD9:25A8FF:6AF2EB:7BEB98:674EAB3E" } }, - "uuid": "eb10f07a-6768-4cee-8aeb-efddfd73e0d1", + "uuid": "b52b17ed-3b65-49ed-8179-e767d374d15b", "persistent": true, "insertionIndex": 5 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json index 1137e01e70..7beb7b77a6 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json @@ -105,7 +105,7 @@ "triage": true, "pull": true }, - "temp_clone_token": "AJ7BLWGFE5K6FUYWVYPIR6DHJGX6S", + "temp_clone_token": "AJ7BLWE6E7DS3XCFU4IFDJTHJ2WFY", "allow_squash_merge": true, "allow_merge_commit": true, "allow_rebase_merge": true, diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json index 10c0d89b74..ff1c9db598 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json @@ -1,5 +1,5 @@ { - "id": "e675eb73-a20a-4a74-9d64-745c35780b0c", + "id": "6cfc76cf-b384-4455-a987-1a9f887dd595", "name": "user", "request": { "url": "/user", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "1-user.json", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:28 GMT", + "Date": "Tue, 03 Dec 2024 06:54:38 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", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4899", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "101", + "X-RateLimit-Remaining": "4980", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "20", "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": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA45:85433:17F2DD:1C73F3:6749AEBC" + "X-GitHub-Request-Id": "AB83:2377CB:5F7383:6F2BD9:674EAB2E" } }, - "uuid": "e675eb73-a20a-4a74-9d64-745c35780b0c", + "uuid": "6cfc76cf-b384-4455-a987-1a9f887dd595", "persistent": true, "insertionIndex": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json index cb992dcf73..2864fdafaf 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json @@ -1,5 +1,5 @@ { - "id": "36064b71-4b99-4741-b1a9-379922804e29", + "id": "88747512-47c9-4301-9f23-3adc9c7e493e", "name": "repos_alaurant_github-api-test", "request": { "url": "/repos/Alaurant/github-api-test", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "2-r_a_github-api-test.json", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:29 GMT", + "Date": "Tue, 03 Dec 2024 06:54:40 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", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4897", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "103", + "X-RateLimit-Remaining": "4978", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "22", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA4A:BC38C:1892D4:1D107D:6749AEBD" + "X-GitHub-Request-Id": "AB88:275BE1:5982EB:6813A1:674EAB2F" } }, - "uuid": "36064b71-4b99-4741-b1a9-379922804e29", + "uuid": "88747512-47c9-4301-9f23-3adc9c7e493e", "persistent": true, "insertionIndex": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json index ca96da34fd..8eac49ea61 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "20591931-6b01-4b01-9bd1-b6f37c76350c", + "id": "c23f15e6-e9dd-4410-a110-723a43ac7db5", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6152571,\"key_prefix\":\"DELETE-\",\"url_template\":\"https://example.com/delete/\",\"is_alphanumeric\":true}", + "body": "{\"id\":6208097,\"key_prefix\":\"DELETE-\",\"url_template\":\"https://example.com/delete/\",\"is_alphanumeric\":true}", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:29 GMT", + "Date": "Tue, 03 Dec 2024 06:54:40 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": "\"8d9156e63a219370bff6f41952240cfc404ba49b5ae3a52a43a805d56d4e6993\"", + "ETag": "\"35e89a0a53a0a1b441ab8df230e21a09d6f44d65594b11ef6649520aadbd66a4\"", "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": "4896", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "104", + "X-RateLimit-Remaining": "4977", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "23", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA4B:348A76:1660AAE:19F6903:6749AEBD" + "X-GitHub-Request-Id": "AB89:25E009:637E54:747658:674EAB30" } }, - "uuid": "20591931-6b01-4b01-9bd1-b6f37c76350c", + "uuid": "c23f15e6-e9dd-4410-a110-723a43ac7db5", "persistent": true, "insertionIndex": 3 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/7-r_a_g_autolinks_6152582.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6208097.json similarity index 76% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/7-r_a_g_autolinks_6152582.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6208097.json index 2b6f866592..2f8d96f1ee 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/7-r_a_g_autolinks_6152582.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6208097.json @@ -1,8 +1,8 @@ { - "id": "000b1a98-d980-4ea7-94ec-e8b7acdb7949", - "name": "repos_alaurant_github-api-test_autolinks_6152582", + "id": "bedd2380-e90f-4091-aea6-52fe5a202c25", + "name": "repos_alaurant_github-api-test_autolinks_6208097", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6152582", + "url": "/repos/Alaurant/github-api-test/autolinks/6208097", "method": "DELETE", "headers": { "Accept": { @@ -13,16 +13,16 @@ "response": { "status": 204, "headers": { - "Date": "Fri, 29 Nov 2024 12:08:40 GMT", + "Date": "Tue, 03 Dec 2024 06:54:41 GMT", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "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": "4875", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "125", + "X-RateLimit-Remaining": "4976", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "24", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -34,10 +34,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AA88:B44B4:181254:1C9080:6749AEC8" + "X-GitHub-Request-Id": "AB8D:25DAE6:6CEAB0:7DE2C7:674EAB30" } }, - "uuid": "000b1a98-d980-4ea7-94ec-e8b7acdb7949", + "uuid": "bedd2380-e90f-4091-aea6-52fe5a202c25", "persistent": true, - "insertionIndex": 7 + "insertionIndex": 4 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6152571.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6208097.json similarity index 80% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6152571.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6208097.json index 3a53d7feb0..7440247538 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6152571.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6208097.json @@ -1,8 +1,8 @@ { - "id": "553463ef-4e54-4da1-a599-52d196d00b97", - "name": "repos_alaurant_github-api-test_autolinks_6152571", + "id": "7621b1fe-64d2-4935-acee-590445690a72", + "name": "repos_alaurant_github-api-test_autolinks_6208097", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6152571", + "url": "/repos/Alaurant/github-api-test/autolinks/6208097", "method": "GET", "headers": { "Accept": { @@ -14,7 +14,7 @@ "status": 404, "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/rest/repos/autolinks#get-an-autolink-reference-of-a-repository\",\"status\":\"404\"}", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:30 GMT", + "Date": "Tue, 03 Dec 2024 06:54:41 GMT", "Content-Type": "application/json; charset=utf-8", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", @@ -22,9 +22,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4894", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "106", + "X-RateLimit-Remaining": "4975", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "25", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -36,10 +36,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AA50:BAFFD:188FFD:1D114C:6749AEBE" + "X-GitHub-Request-Id": "AB8E:25A8FF:6AEF27:7BE713:674EAB31" } }, - "uuid": "553463ef-4e54-4da1-a599-52d196d00b97", + "uuid": "7621b1fe-64d2-4935-acee-590445690a72", "persistent": true, "insertionIndex": 5 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json index c8fdf1fa62..76e05c14b1 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "0138d5d7-2552-4f7c-9329-9fa9304457f5", + "id": "5a833c9b-b2ab-4876-a714-c9866b3bd276", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6152576,\"key_prefix\":\"DELETED-\",\"url_template\":\"https://example.com/delete2/\",\"is_alphanumeric\":true}", + "body": "{\"id\":6208098,\"key_prefix\":\"DELETED-\",\"url_template\":\"https://example.com/delete2/\",\"is_alphanumeric\":true}", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:31 GMT", + "Date": "Tue, 03 Dec 2024 06:54: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": "\"18f37a6da6441c66be1e696ad1c486144d0ba450a5938fd097b5922079a97bc5\"", + "ETag": "\"7c2b42f96076ca80e50c591b0bbc599ed80f1b7674d580aa68d620e14efb31ac\"", "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": "4893", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "107", + "X-RateLimit-Remaining": "4974", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "26", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA51:39FBFE:FCA8C7:126DA98:6749AEBF" + "X-GitHub-Request-Id": "AB8F:25CB59:628857:738058:674EAB31" } }, - "uuid": "0138d5d7-2552-4f7c-9329-9fa9304457f5", + "uuid": "5a833c9b-b2ab-4876-a714-c9866b3bd276", "persistent": true, "insertionIndex": 6 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6152576.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6208098.json similarity index 77% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6152576.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6208098.json index 51cb79ab61..2925b43e16 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6152576.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6208098.json @@ -1,8 +1,8 @@ { - "id": "f117b38b-e1fe-4e8d-a19e-016e7c71d9ca", - "name": "repos_alaurant_github-api-test_autolinks_6152576", + "id": "514e7c83-08c5-4ebb-b29c-18d729fd2e26", + "name": "repos_alaurant_github-api-test_autolinks_6208098", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6152576", + "url": "/repos/Alaurant/github-api-test/autolinks/6208098", "method": "DELETE", "headers": { "Accept": { @@ -13,16 +13,16 @@ "response": { "status": 204, "headers": { - "Date": "Fri, 29 Nov 2024 12:08:31 GMT", + "Date": "Tue, 03 Dec 2024 06:54: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": "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": "4892", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "108", + "X-RateLimit-Remaining": "4973", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "27", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -34,10 +34,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AA55:A0F7E:3E1D22:482016:6749AEBF" + "X-GitHub-Request-Id": "AB93:260E1D:6514BC:760CC5:674EAB32" } }, - "uuid": "f117b38b-e1fe-4e8d-a19e-016e7c71d9ca", + "uuid": "514e7c83-08c5-4ebb-b29c-18d729fd2e26", "persistent": true, "insertionIndex": 7 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6152576.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6208098.json similarity index 80% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6152576.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6208098.json index 23b362775e..918b44f761 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6152576.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6208098.json @@ -1,8 +1,8 @@ { - "id": "e3d28f43-08a6-4ea0-871f-d05b808c8c43", - "name": "repos_alaurant_github-api-test_autolinks_6152576", + "id": "1c0f41ec-1f18-4070-8fb3-81fe4e305b27", + "name": "repos_alaurant_github-api-test_autolinks_6208098", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6152576", + "url": "/repos/Alaurant/github-api-test/autolinks/6208098", "method": "GET", "headers": { "Accept": { @@ -14,7 +14,7 @@ "status": 404, "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/rest/repos/autolinks#get-an-autolink-reference-of-a-repository\",\"status\":\"404\"}", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:32 GMT", + "Date": "Tue, 03 Dec 2024 06:54:43 GMT", "Content-Type": "application/json; charset=utf-8", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", @@ -22,9 +22,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4891", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "109", + "X-RateLimit-Remaining": "4972", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "28", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -36,10 +36,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AA56:C0E92:17F7BB:1C7335:6749AEBF" + "X-GitHub-Request-Id": "AB94:2616CE:687F1B:797734:674EAB32" } }, - "uuid": "e3d28f43-08a6-4ea0-871f-d05b808c8c43", + "uuid": "1c0f41ec-1f18-4070-8fb3-81fe4e305b27", "persistent": true, "insertionIndex": 8 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json index 43ce48f2ea..8a2fd7b037 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "cc1427a5-e6ee-40de-ab73-dadb2e2f7204", + "id": "1aa929ba-72a4-4713-b608-a1ed2f9d9de8", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -14,7 +14,7 @@ "status": 200, "body": "[]", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:32 GMT", + "Date": "Tue, 03 Dec 2024 06:54: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", @@ -25,9 +25,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4890", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "110", + "X-RateLimit-Remaining": "4971", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "29", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA57:BD623:19252C:1DAF47:6749AEC0" + "X-GitHub-Request-Id": "AB98:25E009:637F4C:747775:674EAB33" } }, - "uuid": "cc1427a5-e6ee-40de-ab73-dadb2e2f7204", + "uuid": "1aa929ba-72a4-4713-b608-a1ed2f9d9de8", "persistent": true, "insertionIndex": 9 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/6-r_a_g_autolinks_6152578.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/6-r_a_g_autolinks_6152578.json deleted file mode 100644 index bd4b7d8605..0000000000 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/6-r_a_g_autolinks_6152578.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "id": "c1bbac38-d91b-43e8-8ced-4b705d8ed5ac", - "name": "repos_alaurant_github-api-test_autolinks_6152578", - "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6152578", - "method": "DELETE", - "headers": { - "Accept": { - "equalTo": "application/vnd.github+json" - } - } - }, - "response": { - "status": 204, - "headers": { - "Date": "Fri, 29 Nov 2024 12:08: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": "4883", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "117", - "X-RateLimit-Resource": "core", - "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", - "Access-Control-Allow-Origin": "*", - "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", - "X-Frame-Options": "deny", - "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "0", - "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", - "Content-Security-Policy": "default-src 'none'", - "Vary": "Accept-Encoding, Accept, X-Requested-With", - "Server": "github.com", - "X-GitHub-Request-Id": "AA6D:9D84C:43B47D:4DBEF5:6749AEC3" - } - }, - "uuid": "c1bbac38-d91b-43e8-8ced-4b705d8ed5ac", - "persistent": true, - "insertionIndex": 6 -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/1-user.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/__files/1-user.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/1-user.json diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/2-r_a_github-api-test.json similarity index 99% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/__files/2-r_a_github-api-test.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/2-r_a_github-api-test.json index fd8931c285..13961ad824 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/__files/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/2-r_a_github-api-test.json @@ -105,7 +105,7 @@ "triage": true, "pull": true }, - "temp_clone_token": "AJ7BLWAUVGDG2AWRT3BGNMDHJGX7C", + "temp_clone_token": "AJ7BLWFP6LL2ZYEKTDYDKHTHJ2WGC", "allow_squash_merge": true, "allow_merge_commit": true, "allow_rebase_merge": true, diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/1-user.json similarity index 85% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/1-user.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/1-user.json index 5d8ad625bc..3c33bb0ca5 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/1-user.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/1-user.json @@ -1,5 +1,5 @@ { - "id": "a7f46e4b-e5c6-4909-8919-086127a448cd", + "id": "33b2f345-3716-4e63-b3fd-64f642f5cf44", "name": "user", "request": { "url": "/user", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "1-user.json", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:33 GMT", + "Date": "Tue, 03 Dec 2024 06:54: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", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4889", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "111", + "X-RateLimit-Remaining": "4970", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "30", "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": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA62:9BA56:40EB4D:4AEEB2:6749AEC1" + "X-GitHub-Request-Id": "ABA0:271404:54198B:62A384:674EAB34" } }, - "uuid": "a7f46e4b-e5c6-4909-8919-086127a448cd", + "uuid": "33b2f345-3716-4e63-b3fd-64f642f5cf44", "persistent": true, "insertionIndex": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/2-r_a_github-api-test.json similarity index 86% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/2-r_a_github-api-test.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/2-r_a_github-api-test.json index 6c59240a58..cd7a131b03 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/2-r_a_github-api-test.json @@ -1,5 +1,5 @@ { - "id": "183fe5a6-6e2e-4c57-8b75-d1826e094a8b", + "id": "ba308c92-2fea-472c-9436-9c4410ccb299", "name": "repos_alaurant_github-api-test", "request": { "url": "/repos/Alaurant/github-api-test", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "2-r_a_github-api-test.json", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:37 GMT", + "Date": "Tue, 03 Dec 2024 06:54:45 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4880", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "120", + "X-RateLimit-Remaining": "4968", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "32", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA79:B44B4:181143:1C8F4E:6749AEC5" + "X-GitHub-Request-Id": "ABA4:25D2D0:675695:784EDE:674EAB35" } }, - "uuid": "183fe5a6-6e2e-4c57-8b75-d1826e094a8b", + "uuid": "ba308c92-2fea-472c-9436-9c4410ccb299", "persistent": true, "insertionIndex": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/3-r_a_g_autolinks.json new file mode 100644 index 0000000000..019a1b2402 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/3-r_a_g_autolinks.json @@ -0,0 +1,50 @@ +{ + "id": "eb473e69-9e44-432a-ae9e-fad5d4bc3cde", + "name": "repos_alaurant_github-api-test_autolinks", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 200, + "body": "[]", + "headers": { + "Date": "Tue, 03 Dec 2024 06:54:45 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "ETag": "\"5b744729737bd28d14aeb327919c263d8af99640a7701726d7b2320a638b5c76\"", + "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "x-github-api-version-selected": "2022-11-28", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4967", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "33", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Server": "github.com", + "X-GitHub-Request-Id": "ABA5:259AD1:61CBB4:72C3EE:674EAB35" + } + }, + "uuid": "eb473e69-9e44-432a-ae9e-fad5d4bc3cde", + "persistent": true, + "scenarioName": "scenario-1-repos-Alaurant-github-api-test-autolinks", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-Alaurant-github-api-test-autolinks-2", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/4-r_a_g_autolinks.json similarity index 81% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/3-r_a_g_autolinks.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/4-r_a_g_autolinks.json index adef8f0ae6..0f73b73a17 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/3-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/4-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "6ddc045f-2be3-451c-92f0-447177ab2e7d", + "id": "7e65d78b-6c47-4bda-b792-8bee46940dfa", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6152582,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true}", + "body": "{\"id\":6208099,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true}", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:37 GMT", + "Date": "Tue, 03 Dec 2024 06:54: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": "\"ab4ac5ab17a6323d45fe3fdba72aed69d6acf1eb0cea20688d8540ab5e2a16b8\"", + "ETag": "\"2314ffdb64a38ba1fbc4122d2766f10c7448210410700da49af8b39f4e97997c\"", "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": "4879", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "121", + "X-RateLimit-Remaining": "4966", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "34", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA7E:39FBFE:FCAAD9:126DD24:6749AEC5" + "X-GitHub-Request-Id": "ABA9:261CA8:640F26:750764:674EAB36" } }, - "uuid": "6ddc045f-2be3-451c-92f0-447177ab2e7d", + "uuid": "7e65d78b-6c47-4bda-b792-8bee46940dfa", "persistent": true, - "insertionIndex": 3 + "insertionIndex": 4 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/4-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/5-r_a_g_autolinks.json similarity index 81% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/4-r_a_g_autolinks.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/5-r_a_g_autolinks.json index fea09f7fc5..7abb1f5cee 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/4-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/5-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "0cc88e84-c2da-4957-a7be-413babe73ed6", + "id": "964978fc-cf9f-48d1-9749-9871051b957a", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6152583,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}", + "body": "{\"id\":6208100,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:38 GMT", + "Date": "Tue, 03 Dec 2024 06:54: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": "\"78d132df03415dc37356f59db0f25f0fc85435eefdf6fa003e74f3012dfe2100\"", + "ETag": "\"18c35b8fe301b6c9e0bd56dcd1ec6f253f1c6312f2a0f471bf6072dec3159f84\"", "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": "4878", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "122", + "X-RateLimit-Remaining": "4965", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "35", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA7F:BC84B:18766D:1CF775:6749AEC6" + "X-GitHub-Request-Id": "ABAA:25FB34:6467D7:756032:674EAB36" } }, - "uuid": "0cc88e84-c2da-4957-a7be-413babe73ed6", + "uuid": "964978fc-cf9f-48d1-9749-9871051b957a", "persistent": true, - "insertionIndex": 4 + "insertionIndex": 5 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/5-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/6-r_a_g_autolinks.json similarity index 76% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/5-r_a_g_autolinks.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/6-r_a_g_autolinks.json index c17ac0e767..3105260ee0 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/5-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/6-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "5352de4b-7621-453d-b6a6-2a7a40221323", + "id": "b84876ca-abf9-4911-8593-b550ac6712d1", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -12,22 +12,22 @@ }, "response": { "status": 200, - "body": "[{\"id\":6152582,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true},{\"id\":6152583,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}]", + "body": "[{\"id\":6208099,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true},{\"id\":6208100,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}]", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:40 GMT", + "Date": "Tue, 03 Dec 2024 06:54:47 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", - "ETag": "W/\"fdc76d59b5589224e9a8f8196f0013adb2472c81c3bd1f1515076811f4dda34c\"", + "ETag": "W/\"99534cf1ccacf6077fecfd3f588c74cb6a9c595c33fd76593fb6433ecedb7a65\"", "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": "4877", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "123", + "X-RateLimit-Remaining": "4964", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "36", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -38,13 +38,13 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA83:C0E92:17FA36:1C7633:6749AEC7" + "X-GitHub-Request-Id": "ABAB:25DAE6:6CED1E:7DE5AF:674EAB36" } }, - "uuid": "5352de4b-7621-453d-b6a6-2a7a40221323", + "uuid": "b84876ca-abf9-4911-8593-b550ac6712d1", "persistent": true, "scenarioName": "scenario-1-repos-Alaurant-github-api-test-autolinks", - "requiredScenarioState": "Started", - "newScenarioState": "scenario-1-repos-Alaurant-github-api-test-autolinks-2", - "insertionIndex": 5 + "requiredScenarioState": "scenario-1-repos-Alaurant-github-api-test-autolinks-2", + "newScenarioState": "scenario-1-repos-Alaurant-github-api-test-autolinks-3", + "insertionIndex": 6 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/6-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/7-r_a_g_autolinks.json similarity index 78% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/6-r_a_g_autolinks.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/7-r_a_g_autolinks.json index fe5cd9ccd5..e970a59b02 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/6-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/7-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "7a9a6d30-2355-4ffc-ba4b-9e95525f71a3", + "id": "f3a40454-30e8-4c11-9318-4bea625bb71a", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -12,22 +12,22 @@ }, "response": { "status": 200, - "body": "[{\"id\":6152582,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true},{\"id\":6152583,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}]", + "body": "[{\"id\":6208099,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true},{\"id\":6208100,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}]", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:40 GMT", + "Date": "Tue, 03 Dec 2024 06:54:47 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", - "ETag": "W/\"fdc76d59b5589224e9a8f8196f0013adb2472c81c3bd1f1515076811f4dda34c\"", + "ETag": "W/\"99534cf1ccacf6077fecfd3f588c74cb6a9c595c33fd76593fb6433ecedb7a65\"", "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": "4876", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "124", + "X-RateLimit-Remaining": "4963", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "37", "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": "*", @@ -38,12 +38,12 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA87:348A76:1660DEC:19F6CED:6749AEC8" + "X-GitHub-Request-Id": "ABAF:271404:541AA2:62A4DD:674EAB37" } }, - "uuid": "7a9a6d30-2355-4ffc-ba4b-9e95525f71a3", + "uuid": "f3a40454-30e8-4c11-9318-4bea625bb71a", "persistent": true, "scenarioName": "scenario-1-repos-Alaurant-github-api-test-autolinks", - "requiredScenarioState": "scenario-1-repos-Alaurant-github-api-test-autolinks-2", - "insertionIndex": 6 + "requiredScenarioState": "scenario-1-repos-Alaurant-github-api-test-autolinks-3", + "insertionIndex": 7 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/8-r_a_g_autolinks_6152583.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6208099.json similarity index 77% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/8-r_a_g_autolinks_6152583.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6208099.json index 4d790cb503..a67bf65e6a 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/8-r_a_g_autolinks_6152583.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6208099.json @@ -1,8 +1,8 @@ { - "id": "48d63973-1b3c-4d84-a5af-88cb182f7f58", - "name": "repos_alaurant_github-api-test_autolinks_6152583", + "id": "b99d99a0-2268-4a2b-8a96-72d2439eca41", + "name": "repos_alaurant_github-api-test_autolinks_6208099", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6152583", + "url": "/repos/Alaurant/github-api-test/autolinks/6208099", "method": "DELETE", "headers": { "Accept": { @@ -13,16 +13,16 @@ "response": { "status": 204, "headers": { - "Date": "Fri, 29 Nov 2024 12:08:41 GMT", + "Date": "Tue, 03 Dec 2024 06:54:47 GMT", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4874", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "126", + "X-RateLimit-Remaining": "4962", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "38", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -34,10 +34,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AA89:A1026:42C9FD:4CD074:6749AEC9" + "X-GitHub-Request-Id": "ABB0:2377CB:5F772F:6F3000:674EAB37" } }, - "uuid": "48d63973-1b3c-4d84-a5af-88cb182f7f58", + "uuid": "b99d99a0-2268-4a2b-8a96-72d2439eca41", "persistent": true, "insertionIndex": 8 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6208100.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6208100.json new file mode 100644 index 0000000000..8c3d2253b5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6208100.json @@ -0,0 +1,43 @@ +{ + "id": "883b62a6-ba7a-4b6b-bdac-6a39266b7e97", + "name": "repos_alaurant_github-api-test_autolinks_6208100", + "request": { + "url": "/repos/Alaurant/github-api-test/autolinks/6208100", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github+json" + } + } + }, + "response": { + "status": 204, + "headers": { + "Date": "Tue, 03 Dec 2024 06:54: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": "4961", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "39", + "X-RateLimit-Resource": "core", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "Server": "github.com", + "X-GitHub-Request-Id": "ABB1:260E1D:6516F1:760F56:674EAB38" + } + }, + "uuid": "883b62a6-ba7a-4b6b-bdac-6a39266b7e97", + "persistent": true, + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/1-user.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/__files/1-user.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/1-user.json diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/2-r_a_github-api-test.json similarity index 99% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/__files/2-r_a_github-api-test.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/2-r_a_github-api-test.json index e93ced287f..7c3d4b4f65 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/__files/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/2-r_a_github-api-test.json @@ -105,7 +105,7 @@ "triage": true, "pull": true }, - "temp_clone_token": "AJ7BLWEHS5V3ECCFWNDRQDTHJGX64", + "temp_clone_token": "AJ7BLWE3ZVPFE5JRNKZRQJTHJ2WGK", "allow_squash_merge": true, "allow_merge_commit": true, "allow_rebase_merge": true, diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/1-user.json similarity index 85% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/1-user.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/1-user.json index 398f401086..4c9a31dc26 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAllAutolinks/mappings/1-user.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/1-user.json @@ -1,5 +1,5 @@ { - "id": "a645c520-c716-4c18-b3ee-8569c890487f", + "id": "99afe21f-5825-4385-a350-16b518e6db55", "name": "user", "request": { "url": "/user", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "1-user.json", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:36 GMT", + "Date": "Tue, 03 Dec 2024 06:54:48 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", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4882", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "118", + "X-RateLimit-Remaining": "4960", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "40", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA78:348A76:1660CBB:19F6B6E:6749AEC4" + "X-GitHub-Request-Id": "ABBC:25CB59:628A6B:7382DC:674EAB38" } }, - "uuid": "a645c520-c716-4c18-b3ee-8569c890487f", + "uuid": "99afe21f-5825-4385-a350-16b518e6db55", "persistent": true, "insertionIndex": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/2-r_a_github-api-test.json similarity index 86% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/2-r_a_github-api-test.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/2-r_a_github-api-test.json index 1b3eba4a56..176476066e 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/2-r_a_github-api-test.json @@ -1,5 +1,5 @@ { - "id": "ab00ffa1-3b5a-4230-b0c2-6cac85becc40", + "id": "2ee7cc1d-ca3c-4fe0-aa52-db592c09839a", "name": "repos_alaurant_github-api-test", "request": { "url": "/repos/Alaurant/github-api-test", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "2-r_a_github-api-test.json", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:34 GMT", + "Date": "Tue, 03 Dec 2024 06:54: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", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4887", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "113", + "X-RateLimit-Remaining": "4958", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "42", "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": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA66:BD623:1925B4:1DAFEE:6749AEC2" + "X-GitHub-Request-Id": "ABBD:25C9E5:64E1B6:75DA32:674EAB39" } }, - "uuid": "ab00ffa1-3b5a-4230-b0c2-6cac85becc40", + "uuid": "2ee7cc1d-ca3c-4fe0-aa52-db592c09839a", "persistent": true, "insertionIndex": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/3-r_a_g_autolinks.json similarity index 82% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/3-r_a_g_autolinks.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/3-r_a_g_autolinks.json index 3810202097..75eaaf5b03 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/3-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/3-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "f4e4b582-1e9b-4e33-9485-8b034896ebd8", + "id": "089121ed-3a09-445b-b7fc-79ef1d3dfb8f", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6152578,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", + "body": "{\"id\":6208101,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:34 GMT", + "Date": "Tue, 03 Dec 2024 06:54: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": "\"7a522d9ee974e1e1c1e353b0f7e15ee6a601dd4516389fc4eb25bcd7e8351240\"", + "ETag": "\"eb3e3b9135d54ce2e86f57ee73a6e0faf0335556def466b09d7c1132f45cf161\"", "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": "4886", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "114", + "X-RateLimit-Remaining": "4957", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "43", "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": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA67:CE235:B76B8:DC397:6749AEC2" + "X-GitHub-Request-Id": "ABC1:2616CE:6881FF:797A95:674EAB39" } }, - "uuid": "f4e4b582-1e9b-4e33-9485-8b034896ebd8", + "uuid": "089121ed-3a09-445b-b7fc-79ef1d3dfb8f", "persistent": true, "insertionIndex": 3 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/4-r_a_g_autolinks_6152578.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6208101.json similarity index 75% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/4-r_a_g_autolinks_6152578.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6208101.json index 99befe2f6a..627328701f 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testGetAutolink/mappings/4-r_a_g_autolinks_6152578.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6208101.json @@ -1,8 +1,8 @@ { - "id": "477be2b8-460f-4b93-96af-b9bd1e0e7a13", - "name": "repos_alaurant_github-api-test_autolinks_6152578", + "id": "50e40ff8-9699-487a-9b3c-9c9ad0950351", + "name": "repos_alaurant_github-api-test_autolinks_6208101", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6152578", + "url": "/repos/Alaurant/github-api-test/autolinks/6208101", "method": "GET", "headers": { "Accept": { @@ -12,22 +12,22 @@ }, "response": { "status": 200, - "body": "{\"id\":6152578,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", + "body": "{\"id\":6208101,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:35 GMT", + "Date": "Tue, 03 Dec 2024 06:54: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/\"7a522d9ee974e1e1c1e353b0f7e15ee6a601dd4516389fc4eb25bcd7e8351240\"", + "ETag": "W/\"eb3e3b9135d54ce2e86f57ee73a6e0faf0335556def466b09d7c1132f45cf161\"", "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": "4885", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "115", + "X-RateLimit-Remaining": "4956", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "44", "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": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA6B:A1026:42C835:4CCE44:6749AEC3" + "X-GitHub-Request-Id": "ABC2:25D2D0:67588E:78511F:674EAB3A" } }, - "uuid": "477be2b8-460f-4b93-96af-b9bd1e0e7a13", + "uuid": "50e40ff8-9699-487a-9b3c-9c9ad0950351", "persistent": true, "insertionIndex": 4 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks_6152588.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6208101.json similarity index 77% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks_6152588.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6208101.json index 0910d9239d..2c891758c3 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks_6152588.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6208101.json @@ -1,8 +1,8 @@ { - "id": "fb9e2a36-6367-424d-b7bb-8609e11de82a", - "name": "repos_alaurant_github-api-test_autolinks_6152588", + "id": "27891073-8620-4911-b0f9-a90d4aa1fe08", + "name": "repos_alaurant_github-api-test_autolinks_6208101", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6152588", + "url": "/repos/Alaurant/github-api-test/autolinks/6208101", "method": "DELETE", "headers": { "Accept": { @@ -13,16 +13,16 @@ "response": { "status": 204, "headers": { - "Date": "Fri, 29 Nov 2024 12:08:43 GMT", + "Date": "Tue, 03 Dec 2024 06:54:51 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": "4868", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "132", + "X-RateLimit-Remaining": "4955", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "45", "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": "*", @@ -34,10 +34,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AA9B:BAFFD:1893D5:1D15E9:6749AECB" + "X-GitHub-Request-Id": "ABC6:253D9C:6592B8:768B52:674EAB3A" } }, - "uuid": "fb9e2a36-6367-424d-b7bb-8609e11de82a", + "uuid": "27891073-8620-4911-b0f9-a90d4aa1fe08", "persistent": true, "insertionIndex": 5 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/6-r_a_g_autolinks.json similarity index 76% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/6-r_a_g_autolinks.json index b0446fea0d..9fac1e27a2 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/6-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "b79bb883-abb9-42ad-8b5a-a36b9080b1d4", + "id": "17324ee3-4605-43a5-b1ab-2a18bae6cd3a", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -12,22 +12,22 @@ }, "response": { "status": 200, - "body": "[{\"id\":6152588,\"key_prefix\":\"EXAMPLE-\",\"url_template\":\"https://example.com/TICKET?q=\",\"is_alphanumeric\":true}]", + "body": "[]", "headers": { - "Date": "Fri, 29 Nov 2024 12:08:43 GMT", + "Date": "Tue, 03 Dec 2024 06:54: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": "W/\"035218fb6a57fab7a72f21d71239bfcdee1def9903d9e85c0a252f30b5c6af8d\"", + "ETag": "\"5b744729737bd28d14aeb327919c263d8af99640a7701726d7b2320a638b5c76\"", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4869", - "X-RateLimit-Reset": "1732885041", - "X-RateLimit-Used": "131", + "X-RateLimit-Remaining": "4954", + "X-RateLimit-Reset": "1733209471", + "X-RateLimit-Used": "46", "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": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA9A:9D84C:43B6C0:4DC18D:6749AECA" + "X-GitHub-Request-Id": "ABC7:261CA8:6410D0:75096B:674EAB3B" } }, - "uuid": "b79bb883-abb9-42ad-8b5a-a36b9080b1d4", + "uuid": "17324ee3-4605-43a5-b1ab-2a18bae6cd3a", "persistent": true, - "insertionIndex": 4 + "insertionIndex": 6 } \ No newline at end of file From a83d0814c451763a4f227a63c0d9d7cb17ee1456 Mon Sep 17 00:00:00 2001 From: Alaurant Date: Tue, 3 Dec 2024 18:43:13 +1000 Subject: [PATCH 4/5] fixed test issues --- .../org/kohsuke/github/GHAutolinkTest.java | 78 +++++++++---------- .../__files/2-r_a_github-api-test.json | 2 +- .../testCreateAutolink/mappings/1-user.json | 14 ++-- .../mappings/2-r_a_github-api-test.json | 14 ++-- .../mappings/3-r_a_g_autolinks.json | 18 ++--- ...02.json => 4-r_a_g_autolinks_6208157.json} | 18 ++--- .../mappings/5-r_a_g_autolinks.json | 14 ++-- .../__files/2-r_a_github-api-test.json | 2 +- .../testDeleteAutolink/mappings/1-user.json | 14 ++-- .../mappings/2-r_a_github-api-test.json | 14 ++-- .../mappings/3-r_a_g_autolinks.json | 18 ++--- ...97.json => 4-r_a_g_autolinks_6208152.json} | 18 ++--- ...97.json => 5-r_a_g_autolinks_6208152.json} | 18 ++--- .../mappings/6-r_a_g_autolinks.json | 18 ++--- ...98.json => 7-r_a_g_autolinks_6208153.json} | 18 ++--- ...98.json => 8-r_a_g_autolinks_6208153.json} | 18 ++--- .../mappings/9-r_a_g_autolinks.json | 14 ++-- .../__files/2-r_a_github-api-test.json | 2 +- .../testListAllAutolinks/mappings/1-user.json | 14 ++-- .../mappings/2-r_a_github-api-test.json | 14 ++-- .../mappings/3-r_a_g_autolinks.json | 14 ++-- .../mappings/4-r_a_g_autolinks.json | 18 ++--- .../mappings/5-r_a_g_autolinks.json | 18 ++--- .../mappings/6-r_a_g_autolinks.json | 18 ++--- .../mappings/7-r_a_g_autolinks.json | 18 ++--- ...99.json => 8-r_a_g_autolinks_6208154.json} | 18 ++--- ...00.json => 9-r_a_g_autolinks_6208155.json} | 18 ++--- .../__files/2-r_a_github-api-test.json | 2 +- .../testReadAutolink/mappings/1-user.json | 14 ++-- .../mappings/2-r_a_github-api-test.json | 14 ++-- .../mappings/3-r_a_g_autolinks.json | 18 ++--- ...01.json => 4-r_a_g_autolinks_6208156.json} | 22 +++--- ...01.json => 5-r_a_g_autolinks_6208156.json} | 18 ++--- .../mappings/6-r_a_g_autolinks.json | 14 ++-- 34 files changed, 281 insertions(+), 283 deletions(-) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/{4-r_a_g_autolinks_6208102.json => 4-r_a_g_autolinks_6208157.json} (78%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/{4-r_a_g_autolinks_6208097.json => 4-r_a_g_autolinks_6208152.json} (78%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/{5-r_a_g_autolinks_6208097.json => 5-r_a_g_autolinks_6208152.json} (80%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/{7-r_a_g_autolinks_6208098.json => 7-r_a_g_autolinks_6208153.json} (78%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/{8-r_a_g_autolinks_6208098.json => 8-r_a_g_autolinks_6208153.json} (80%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/{8-r_a_g_autolinks_6208099.json => 8-r_a_g_autolinks_6208154.json} (78%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/{9-r_a_g_autolinks_6208100.json => 9-r_a_g_autolinks_6208155.json} (78%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/{4-r_a_g_autolinks_6208101.json => 4-r_a_g_autolinks_6208156.json} (75%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/{5-r_a_g_autolinks_6208101.json => 5-r_a_g_autolinks_6208156.json} (78%) diff --git a/src/test/java/org/kohsuke/github/GHAutolinkTest.java b/src/test/java/org/kohsuke/github/GHAutolinkTest.java index 5e76c2d7be..ff8300d38d 100644 --- a/src/test/java/org/kohsuke/github/GHAutolinkTest.java +++ b/src/test/java/org/kohsuke/github/GHAutolinkTest.java @@ -7,8 +7,6 @@ import java.util.List; import static org.hamcrest.Matchers.*; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; // TODO: Auto-generated Javadoc /** @@ -100,47 +98,47 @@ public void testReadAutolink() throws Exception { */ @Test public void testListAllAutolinks() throws Exception { - assertThat("Initial autolinks should be empty", repo.listAutolinks().toList(), is(empty())); + assertThat("Initial autolinks list", repo.listAutolinks().toList(), is(empty())); - try { - GHAutolink autolink1 = repo.createAutolink() - .withKeyPrefix("LIST-") - .withUrlTemplate("https://example.com/list1/") - .withIsAlphanumeric(true) - .create(); - - GHAutolink autolink2 = repo.createAutolink() - .withKeyPrefix("LISTED-") - .withUrlTemplate("https://example.com/list2/") - .withIsAlphanumeric(false) - .create(); - - List autolinks = repo.listAutolinks().toList(); - assertThat("Should have exactly 2 autolinks", ((List) autolinks).size(), is(2)); - - GHAutolink foundAutolink1 = autolinks.stream() - .filter(a -> a.getId().equals(autolink1.getId())) - .findFirst() - .orElseThrow(() -> new AssertionError("Autolink 1 not found")); - - GHAutolink foundAutolink2 = autolinks.stream() - .filter(a -> a.getId().equals(autolink2.getId())) - .findFirst() - .orElseThrow(() -> new AssertionError("Autolink 2 not found")); - - assertAutolinksEqual(autolink1, foundAutolink1); - assertAutolinksEqual(autolink2, foundAutolink2); - - } catch (Exception e) { - System.err.println("Failed to list autolinks: " + e.getMessage()); + GHAutolink autolink1 = repo.createAutolink() + .withKeyPrefix("LIST-") + .withUrlTemplate("https://example.com/list1/") + .withIsAlphanumeric(true) + .create(); + + GHAutolink autolink2 = repo.createAutolink() + .withKeyPrefix("LISTED-") + .withUrlTemplate("https://example.com/list2/") + .withIsAlphanumeric(false) + .create(); + + boolean found1 = false; + boolean found2 = false; + + PagedIterable autolinks = repo.listAutolinks(); + + List autolinkList = autolinks.toList(); + assertThat("Number of autolinks", autolinkList.size(), is(2)); + + for (GHAutolink autolink : autolinkList) { + + if (autolink.getId().equals(autolink1.getId())) { + found1 = true; + assertThat(autolink.getKeyPrefix(), equalTo(autolink1.getKeyPrefix())); + assertThat(autolink.getUrlTemplate(), equalTo(autolink1.getUrlTemplate())); + assertThat(autolink.isAlphanumeric(), equalTo(autolink1.isAlphanumeric())); + } + if (autolink.getId().equals(autolink2.getId())) { + found2 = true; + assertThat(autolink.getKeyPrefix(), equalTo(autolink2.getKeyPrefix())); + assertThat(autolink.getUrlTemplate(), equalTo(autolink2.getUrlTemplate())); + assertThat(autolink.isAlphanumeric(), equalTo(autolink2.isAlphanumeric())); + } } - } - private void assertAutolinksEqual(GHAutolink expected, GHAutolink actual) { - assertThat(actual.getKeyPrefix(), equalTo(expected.getKeyPrefix())); - assertThat(actual.getUrlTemplate(), equalTo(expected.getUrlTemplate())); - assertThat(actual.isAlphanumeric(), equalTo(expected.isAlphanumeric())); - assertThat(actual.getOwner(), equalTo(expected.getOwner())); + assertThat("First autolink", found1, is(true)); + assertThat("Second autolink", found2, is(true)); + } /** diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json index f66751c5ad..0474c395a4 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json @@ -105,7 +105,7 @@ "triage": true, "pull": true }, - "temp_clone_token": "AJ7BLWGMBCV4RX4BQQXEBOTHJ2WGQ", + "temp_clone_token": "AJ7BLWBKSYTW3I62UR7LF2DHJ23LK", "allow_squash_merge": true, "allow_merge_commit": true, "allow_rebase_merge": true, diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json index 950e327801..518e4728b3 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json @@ -1,5 +1,5 @@ { - "id": "a4f46a34-8c81-44e9-bec4-043ba7bdcb10", + "id": "98d81ba5-ebd3-49e4-84f2-75f985bc47cc", "name": "user", "request": { "url": "/user", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "1-user.json", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:51 GMT", + "Date": "Tue, 03 Dec 2024 07:38:48 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", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4953", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "47", + "X-RateLimit-Remaining": "4972", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "28", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AB78:259AD1:61CD9C:72C698:674EAB3B" + "X-GitHub-Request-Id": "AA46:260E1D:699639:7B2A52:674EB588" } }, - "uuid": "a4f46a34-8c81-44e9-bec4-043ba7bdcb10", + "uuid": "98d81ba5-ebd3-49e4-84f2-75f985bc47cc", "persistent": true, "insertionIndex": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json index df1a64b58e..5483c49f15 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json @@ -1,5 +1,5 @@ { - "id": "ee74a0a7-35fd-4683-a471-587c81678ae3", + "id": "2fcf27db-2e76-4f6f-a79f-c9519c5d91ca", "name": "repos_alaurant_github-api-test", "request": { "url": "/repos/Alaurant/github-api-test", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "2-r_a_github-api-test.json", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:52 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4951", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "49", + "X-RateLimit-Remaining": "4970", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "30", "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": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "ABD3:275BE1:5986ED:681867:674EAB3C" + "X-GitHub-Request-Id": "AA4A:275BE1:5DAE86:6CDB96:674EB589" } }, - "uuid": "ee74a0a7-35fd-4683-a471-587c81678ae3", + "uuid": "2fcf27db-2e76-4f6f-a79f-c9519c5d91ca", "persistent": true, "insertionIndex": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json index 1c5c951d56..7bc2fc94a4 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "e03166d6-8ef7-42ef-9fd9-3c37415b29d8", + "id": "8347f3dd-5be0-4a28-b01e-9e1405b46087", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6208102,\"key_prefix\":\"EXAMPLE-\",\"url_template\":\"https://example.com/TICKET?q=\",\"is_alphanumeric\":true}", + "body": "{\"id\":6208157,\"key_prefix\":\"EXAMPLE-\",\"url_template\":\"https://example.com/TICKET?q=\",\"is_alphanumeric\":true}", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:53 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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": "\"a43aceb24d084ac36cc51df4652c6770f8d169d875ecf46247ac99b589e441fe\"", + "ETag": "\"a36001f0fa64730b7452b1bc25ccdf888f1db06d9933656b99e2cff7b4e48b3a\"", "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": "4950", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "50", + "X-RateLimit-Remaining": "4969", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "31", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "ABD4:25E009:63825C:747B1A:674EAB3D" + "X-GitHub-Request-Id": "AA4D:261CA8:67BCCF:795107:674EB589" } }, - "uuid": "e03166d6-8ef7-42ef-9fd9-3c37415b29d8", + "uuid": "8347f3dd-5be0-4a28-b01e-9e1405b46087", "persistent": true, "insertionIndex": 3 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6208102.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6208157.json similarity index 78% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6208102.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6208157.json index afaaced255..7c7226e891 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6208102.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6208157.json @@ -1,8 +1,8 @@ { - "id": "5f7726c7-5f1a-4f69-9fee-3d2b34dcc2ee", - "name": "repos_alaurant_github-api-test_autolinks_6208102", + "id": "e3c2362c-a973-4ad6-91fa-5efe8aa8c05c", + "name": "repos_alaurant_github-api-test_autolinks_6208157", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208102", + "url": "/repos/Alaurant/github-api-test/autolinks/6208157", "method": "DELETE", "headers": { "Accept": { @@ -13,16 +13,16 @@ "response": { "status": 204, "headers": { - "Date": "Tue, 03 Dec 2024 06:54:53 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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": "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": "4949", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "51", + "X-RateLimit-Remaining": "4968", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "32", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -34,10 +34,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "ABD8:25DAE6:6CEF86:7DE85D:674EAB3D" + "X-GitHub-Request-Id": "AA51:25CB59:664A36:77DE74:674EB589" } }, - "uuid": "5f7726c7-5f1a-4f69-9fee-3d2b34dcc2ee", + "uuid": "e3c2362c-a973-4ad6-91fa-5efe8aa8c05c", "persistent": true, "insertionIndex": 4 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks.json index 6e880036db..4948102df3 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "b52b17ed-3b65-49ed-8179-e767d374d15b", + "id": "46498eb6-0cf4-48a7-ae76-a13a64665a7d", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -14,7 +14,7 @@ "status": 200, "body": "[]", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:54 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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", @@ -25,9 +25,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4948", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "52", + "X-RateLimit-Remaining": "4967", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "33", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "ABD9:25A8FF:6AF2EB:7BEB98:674EAB3E" + "X-GitHub-Request-Id": "AA52:25C9E5:68E849:7A7C9A:674EB58A" } }, - "uuid": "b52b17ed-3b65-49ed-8179-e767d374d15b", + "uuid": "46498eb6-0cf4-48a7-ae76-a13a64665a7d", "persistent": true, "insertionIndex": 5 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json index 7beb7b77a6..1d9ee8a01f 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json @@ -105,7 +105,7 @@ "triage": true, "pull": true }, - "temp_clone_token": "AJ7BLWE6E7DS3XCFU4IFDJTHJ2WFY", + "temp_clone_token": "AJ7BLWEMCYWAPCY2SLWSCG3HJ23KQ", "allow_squash_merge": true, "allow_merge_commit": true, "allow_rebase_merge": true, diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json index ff1c9db598..d1a1f220e5 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json @@ -1,5 +1,5 @@ { - "id": "6cfc76cf-b384-4455-a987-1a9f887dd595", + "id": "8c382a42-5cba-408a-8e99-638371421c93", "name": "user", "request": { "url": "/user", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "1-user.json", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:38 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4980", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "20", + "X-RateLimit-Remaining": "4999", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "1", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AB83:2377CB:5F7383:6F2BD9:674EAB2E" + "X-GitHub-Request-Id": "ABFA:271404:583EF4:676428:674EB57B" } }, - "uuid": "6cfc76cf-b384-4455-a987-1a9f887dd595", + "uuid": "8c382a42-5cba-408a-8e99-638371421c93", "persistent": true, "insertionIndex": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json index 2864fdafaf..da6052f307 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json @@ -1,5 +1,5 @@ { - "id": "88747512-47c9-4301-9f23-3adc9c7e493e", + "id": "c0edf83b-b9ad-4ffa-a223-1d3ec93b2b52", "name": "repos_alaurant_github-api-test", "request": { "url": "/repos/Alaurant/github-api-test", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "2-r_a_github-api-test.json", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:40 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4978", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "22", + "X-RateLimit-Remaining": "4997", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "3", "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": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AB88:275BE1:5982EB:6813A1:674EAB2F" + "X-GitHub-Request-Id": "A9FF:261CA8:67B882:794BED:674EB57C" } }, - "uuid": "88747512-47c9-4301-9f23-3adc9c7e493e", + "uuid": "c0edf83b-b9ad-4ffa-a223-1d3ec93b2b52", "persistent": true, "insertionIndex": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json index 8eac49ea61..3cbc543543 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "c23f15e6-e9dd-4410-a110-723a43ac7db5", + "id": "c00247ee-05d0-4136-8c83-2c42f0e9db88", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6208097,\"key_prefix\":\"DELETE-\",\"url_template\":\"https://example.com/delete/\",\"is_alphanumeric\":true}", + "body": "{\"id\":6208152,\"key_prefix\":\"DELETE-\",\"url_template\":\"https://example.com/delete/\",\"is_alphanumeric\":true}", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:40 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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": "\"35e89a0a53a0a1b441ab8df230e21a09d6f44d65594b11ef6649520aadbd66a4\"", + "ETag": "\"6bebc860eff6db9585b7a6749c2e0d12e326bebe505dc3b52b416cd9640bdee3\"", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4977", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "23", + "X-RateLimit-Remaining": "4996", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "4", "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": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AB89:25E009:637E54:747658:674EAB30" + "X-GitHub-Request-Id": "AA00:25E009:674BDB:78DF65:674EB57C" } }, - "uuid": "c23f15e6-e9dd-4410-a110-723a43ac7db5", + "uuid": "c00247ee-05d0-4136-8c83-2c42f0e9db88", "persistent": true, "insertionIndex": 3 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6208097.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6208152.json similarity index 78% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6208097.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6208152.json index 2f8d96f1ee..a44c87e414 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6208097.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6208152.json @@ -1,8 +1,8 @@ { - "id": "bedd2380-e90f-4091-aea6-52fe5a202c25", - "name": "repos_alaurant_github-api-test_autolinks_6208097", + "id": "c6cab082-a929-432a-8dab-f499867db1e0", + "name": "repos_alaurant_github-api-test_autolinks_6208152", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208097", + "url": "/repos/Alaurant/github-api-test/autolinks/6208152", "method": "DELETE", "headers": { "Accept": { @@ -13,16 +13,16 @@ "response": { "status": 204, "headers": { - "Date": "Tue, 03 Dec 2024 06:54:41 GMT", + "Date": "Tue, 03 Dec 2024 07:38:37 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": "4976", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "24", + "X-RateLimit-Remaining": "4995", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "5", "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": "*", @@ -34,10 +34,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AB8D:25DAE6:6CEAB0:7DE2C7:674EAB30" + "X-GitHub-Request-Id": "AA04:25DAE6:711932:82ACC8:674EB57D" } }, - "uuid": "bedd2380-e90f-4091-aea6-52fe5a202c25", + "uuid": "c6cab082-a929-432a-8dab-f499867db1e0", "persistent": true, "insertionIndex": 4 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6208097.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6208152.json similarity index 80% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6208097.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6208152.json index 7440247538..f99fbb9405 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6208097.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6208152.json @@ -1,8 +1,8 @@ { - "id": "7621b1fe-64d2-4935-acee-590445690a72", - "name": "repos_alaurant_github-api-test_autolinks_6208097", + "id": "b91dfefd-ce2f-4e9b-b72c-f10d9a17a683", + "name": "repos_alaurant_github-api-test_autolinks_6208152", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208097", + "url": "/repos/Alaurant/github-api-test/autolinks/6208152", "method": "GET", "headers": { "Accept": { @@ -14,7 +14,7 @@ "status": 404, "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/rest/repos/autolinks#get-an-autolink-reference-of-a-repository\",\"status\":\"404\"}", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:41 GMT", + "Date": "Tue, 03 Dec 2024 07:38:38 GMT", "Content-Type": "application/json; charset=utf-8", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", @@ -22,9 +22,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4975", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "25", + "X-RateLimit-Remaining": "4994", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "6", "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": "*", @@ -36,10 +36,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AB8E:25A8FF:6AEF27:7BE713:674EAB31" + "X-GitHub-Request-Id": "AA05:25A8FF:6EC1D8:80554B:674EB57E" } }, - "uuid": "7621b1fe-64d2-4935-acee-590445690a72", + "uuid": "b91dfefd-ce2f-4e9b-b72c-f10d9a17a683", "persistent": true, "insertionIndex": 5 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json index 76e05c14b1..a337cbcee9 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "5a833c9b-b2ab-4876-a714-c9866b3bd276", + "id": "9618dcf2-84ca-4d7c-a7e9-c47f1892dc77", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6208098,\"key_prefix\":\"DELETED-\",\"url_template\":\"https://example.com/delete2/\",\"is_alphanumeric\":true}", + "body": "{\"id\":6208153,\"key_prefix\":\"DELETED-\",\"url_template\":\"https://example.com/delete2/\",\"is_alphanumeric\":true}", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:42 GMT", + "Date": "Tue, 03 Dec 2024 07:38:38 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": "\"7c2b42f96076ca80e50c591b0bbc599ed80f1b7674d580aa68d620e14efb31ac\"", + "ETag": "\"18b06b68fe5151289037ab9bd59f5547a941f21b44fb52df5d8743c1771baf1d\"", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4974", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "26", + "X-RateLimit-Remaining": "4993", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "7", "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": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AB8F:25CB59:628857:738058:674EAB31" + "X-GitHub-Request-Id": "AA09:2377CB:63CABD:741EC4:674EB57E" } }, - "uuid": "5a833c9b-b2ab-4876-a714-c9866b3bd276", + "uuid": "9618dcf2-84ca-4d7c-a7e9-c47f1892dc77", "persistent": true, "insertionIndex": 6 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6208098.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6208153.json similarity index 78% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6208098.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6208153.json index 2925b43e16..d188055dff 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6208098.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6208153.json @@ -1,8 +1,8 @@ { - "id": "514e7c83-08c5-4ebb-b29c-18d729fd2e26", - "name": "repos_alaurant_github-api-test_autolinks_6208098", + "id": "8063b253-0f76-4356-9efe-740b7c0ca968", + "name": "repos_alaurant_github-api-test_autolinks_6208153", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208098", + "url": "/repos/Alaurant/github-api-test/autolinks/6208153", "method": "DELETE", "headers": { "Accept": { @@ -13,16 +13,16 @@ "response": { "status": 204, "headers": { - "Date": "Tue, 03 Dec 2024 06:54:42 GMT", + "Date": "Tue, 03 Dec 2024 07:38:39 GMT", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4973", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "27", + "X-RateLimit-Remaining": "4992", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "8", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -34,10 +34,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AB93:260E1D:6514BC:760CC5:674EAB32" + "X-GitHub-Request-Id": "AA0A:260E1D:6992A9:7B2629:674EB57F" } }, - "uuid": "514e7c83-08c5-4ebb-b29c-18d729fd2e26", + "uuid": "8063b253-0f76-4356-9efe-740b7c0ca968", "persistent": true, "insertionIndex": 7 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6208098.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6208153.json similarity index 80% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6208098.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6208153.json index 918b44f761..1764659a02 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6208098.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6208153.json @@ -1,8 +1,8 @@ { - "id": "1c0f41ec-1f18-4070-8fb3-81fe4e305b27", - "name": "repos_alaurant_github-api-test_autolinks_6208098", + "id": "322df042-2623-4516-ba69-da9fad6594ac", + "name": "repos_alaurant_github-api-test_autolinks_6208153", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208098", + "url": "/repos/Alaurant/github-api-test/autolinks/6208153", "method": "GET", "headers": { "Accept": { @@ -14,7 +14,7 @@ "status": 404, "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/rest/repos/autolinks#get-an-autolink-reference-of-a-repository\",\"status\":\"404\"}", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:43 GMT", + "Date": "Tue, 03 Dec 2024 07:38:39 GMT", "Content-Type": "application/json; charset=utf-8", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", @@ -22,9 +22,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4972", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "28", + "X-RateLimit-Remaining": "4991", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "9", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -36,10 +36,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AB94:2616CE:687F1B:797734:674EAB32" + "X-GitHub-Request-Id": "AA0E:275BE1:5DAA7A:6CD6EB:674EB57F" } }, - "uuid": "1c0f41ec-1f18-4070-8fb3-81fe4e305b27", + "uuid": "322df042-2623-4516-ba69-da9fad6594ac", "persistent": true, "insertionIndex": 8 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json index 8a2fd7b037..9d73da7ee3 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "1aa929ba-72a4-4713-b608-a1ed2f9d9de8", + "id": "26b0759e-8de9-4545-ae87-0731204c81ec", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -14,7 +14,7 @@ "status": 200, "body": "[]", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:43 GMT", + "Date": "Tue, 03 Dec 2024 07:38:40 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", @@ -25,9 +25,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4971", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "29", + "X-RateLimit-Remaining": "4990", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "10", "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": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AB98:25E009:637F4C:747775:674EAB33" + "X-GitHub-Request-Id": "AA0F:25E009:674D8A:78E146:674EB57F" } }, - "uuid": "1aa929ba-72a4-4713-b608-a1ed2f9d9de8", + "uuid": "26b0759e-8de9-4545-ae87-0731204c81ec", "persistent": true, "insertionIndex": 9 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/2-r_a_github-api-test.json index 13961ad824..31de4f60e2 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/2-r_a_github-api-test.json @@ -105,7 +105,7 @@ "triage": true, "pull": true }, - "temp_clone_token": "AJ7BLWFP6LL2ZYEKTDYDKHTHJ2WGC", + "temp_clone_token": "AJ7BLWENEDJGOSRZZWVLLX3HJ23K2", "allow_squash_merge": true, "allow_merge_commit": true, "allow_rebase_merge": true, diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/1-user.json index 3c33bb0ca5..6182104dfe 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/1-user.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/1-user.json @@ -1,5 +1,5 @@ { - "id": "33b2f345-3716-4e63-b3fd-64f642f5cf44", + "id": "4cb980ae-7b79-4189-9409-9d2ae9919c2f", "name": "user", "request": { "url": "/user", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "1-user.json", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:44 GMT", + "Date": "Tue, 03 Dec 2024 07:38:40 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", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4970", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "30", + "X-RateLimit-Remaining": "4989", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "11", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "ABA0:271404:54198B:62A384:674EAB34" + "X-GitHub-Request-Id": "AA17:271404:5840C0:676640:674EB580" } }, - "uuid": "33b2f345-3716-4e63-b3fd-64f642f5cf44", + "uuid": "4cb980ae-7b79-4189-9409-9d2ae9919c2f", "persistent": true, "insertionIndex": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/2-r_a_github-api-test.json index cd7a131b03..018594c4ff 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/2-r_a_github-api-test.json @@ -1,5 +1,5 @@ { - "id": "ba308c92-2fea-472c-9436-9c4410ccb299", + "id": "a420e293-d74a-4974-ac10-a1dd9755d676", "name": "repos_alaurant_github-api-test", "request": { "url": "/repos/Alaurant/github-api-test", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "2-r_a_github-api-test.json", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:45 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4968", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "32", + "X-RateLimit-Remaining": "4987", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "13", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "ABA4:25D2D0:675695:784EDE:674EAB35" + "X-GitHub-Request-Id": "AA1B:25D2D0:6B1F6A:7CB329:674EB581" } }, - "uuid": "ba308c92-2fea-472c-9436-9c4410ccb299", + "uuid": "a420e293-d74a-4974-ac10-a1dd9755d676", "persistent": true, "insertionIndex": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/3-r_a_g_autolinks.json index 019a1b2402..552821f0a3 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/3-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/3-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "eb473e69-9e44-432a-ae9e-fad5d4bc3cde", + "id": "316f4849-5f4f-4bd6-9d28-8fd52f3b210a", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -14,7 +14,7 @@ "status": 200, "body": "[]", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:45 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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", @@ -25,9 +25,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4967", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "33", + "X-RateLimit-Remaining": "4986", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "14", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "ABA5:259AD1:61CBB4:72C3EE:674EAB35" + "X-GitHub-Request-Id": "AA1C:259AD1:65779A:770B59:674EB581" } }, - "uuid": "eb473e69-9e44-432a-ae9e-fad5d4bc3cde", + "uuid": "316f4849-5f4f-4bd6-9d28-8fd52f3b210a", "persistent": true, "scenarioName": "scenario-1-repos-Alaurant-github-api-test-autolinks", "requiredScenarioState": "Started", diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/4-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/4-r_a_g_autolinks.json index 0f73b73a17..4e4b3dad0d 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/4-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/4-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "7e65d78b-6c47-4bda-b792-8bee46940dfa", + "id": "4b5f30eb-92d4-4d62-8873-500ac95e5c60", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6208099,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true}", + "body": "{\"id\":6208154,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true}", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:46 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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": "\"2314ffdb64a38ba1fbc4122d2766f10c7448210410700da49af8b39f4e97997c\"", + "ETag": "\"480b2462acc348a4544429284864809049c99d8a662ea8c903055902013871c5\"", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4966", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "34", + "X-RateLimit-Remaining": "4985", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "15", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "ABA9:261CA8:640F26:750764:674EAB36" + "X-GitHub-Request-Id": "AA20:261CA8:67BA3E:794E06:674EB582" } }, - "uuid": "7e65d78b-6c47-4bda-b792-8bee46940dfa", + "uuid": "4b5f30eb-92d4-4d62-8873-500ac95e5c60", "persistent": true, "insertionIndex": 4 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/5-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/5-r_a_g_autolinks.json index 7abb1f5cee..1d62d7f93a 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/5-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/5-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "964978fc-cf9f-48d1-9749-9871051b957a", + "id": "777a1fbd-e363-40d6-95ae-cc23181efdea", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6208100,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}", + "body": "{\"id\":6208155,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:46 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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": "\"18c35b8fe301b6c9e0bd56dcd1ec6f253f1c6312f2a0f471bf6072dec3159f84\"", + "ETag": "\"9e23ef50e6efc5f6ba3cec78cd2b6b596ea570978cb111cf990d5decee971c5e\"", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4965", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "35", + "X-RateLimit-Remaining": "4984", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "16", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "ABAA:25FB34:6467D7:756032:674EAB36" + "X-GitHub-Request-Id": "AA21:25FB34:684282:79D65B:674EB583" } }, - "uuid": "964978fc-cf9f-48d1-9749-9871051b957a", + "uuid": "777a1fbd-e363-40d6-95ae-cc23181efdea", "persistent": true, "insertionIndex": 5 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/6-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/6-r_a_g_autolinks.json index 3105260ee0..26c4728bf5 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/6-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/6-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "b84876ca-abf9-4911-8593-b550ac6712d1", + "id": "2592a12d-edb8-40d8-81d1-f2b6e1ecaca4", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -12,22 +12,22 @@ }, "response": { "status": 200, - "body": "[{\"id\":6208099,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true},{\"id\":6208100,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}]", + "body": "[{\"id\":6208154,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true},{\"id\":6208155,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}]", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:47 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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/\"99534cf1ccacf6077fecfd3f588c74cb6a9c595c33fd76593fb6433ecedb7a65\"", + "ETag": "W/\"de622157cf3668fbc5d7b08276e49e368f326a91de6df815ae054c56b58640dd\"", "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": "4964", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "36", + "X-RateLimit-Remaining": "4983", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "17", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "ABAB:25DAE6:6CED1E:7DE5AF:674EAB36" + "X-GitHub-Request-Id": "AA25:25C9E5:68E57F:7A7949:674EB583" } }, - "uuid": "b84876ca-abf9-4911-8593-b550ac6712d1", + "uuid": "2592a12d-edb8-40d8-81d1-f2b6e1ecaca4", "persistent": true, "scenarioName": "scenario-1-repos-Alaurant-github-api-test-autolinks", "requiredScenarioState": "scenario-1-repos-Alaurant-github-api-test-autolinks-2", diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/7-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/7-r_a_g_autolinks.json index e970a59b02..ef85cff171 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/7-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/7-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "f3a40454-30e8-4c11-9318-4bea625bb71a", + "id": "144e875f-a2f2-46a2-b693-267caa327a90", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -12,22 +12,22 @@ }, "response": { "status": 200, - "body": "[{\"id\":6208099,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true},{\"id\":6208100,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}]", + "body": "[{\"id\":6208154,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true},{\"id\":6208155,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}]", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:47 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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/\"99534cf1ccacf6077fecfd3f588c74cb6a9c595c33fd76593fb6433ecedb7a65\"", + "ETag": "W/\"de622157cf3668fbc5d7b08276e49e368f326a91de6df815ae054c56b58640dd\"", "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": "4963", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "37", + "X-RateLimit-Remaining": "4982", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "18", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "ABAF:271404:541AA2:62A4DD:674EAB37" + "X-GitHub-Request-Id": "AA26:271404:5841D5:676785:674EB583" } }, - "uuid": "f3a40454-30e8-4c11-9318-4bea625bb71a", + "uuid": "144e875f-a2f2-46a2-b693-267caa327a90", "persistent": true, "scenarioName": "scenario-1-repos-Alaurant-github-api-test-autolinks", "requiredScenarioState": "scenario-1-repos-Alaurant-github-api-test-autolinks-3", diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6208099.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6208154.json similarity index 78% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6208099.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6208154.json index a67bf65e6a..bded25a16c 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6208099.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6208154.json @@ -1,8 +1,8 @@ { - "id": "b99d99a0-2268-4a2b-8a96-72d2439eca41", - "name": "repos_alaurant_github-api-test_autolinks_6208099", + "id": "3c8eddcf-46f0-439d-a045-8ff010e0881b", + "name": "repos_alaurant_github-api-test_autolinks_6208154", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208099", + "url": "/repos/Alaurant/github-api-test/autolinks/6208154", "method": "DELETE", "headers": { "Accept": { @@ -13,16 +13,16 @@ "response": { "status": 204, "headers": { - "Date": "Tue, 03 Dec 2024 06:54:47 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4962", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "38", + "X-RateLimit-Remaining": "4981", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "19", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -34,10 +34,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "ABB0:2377CB:5F772F:6F3000:674EAB37" + "X-GitHub-Request-Id": "AA27:2377CB:63CC8E:7420EE:674EB584" } }, - "uuid": "b99d99a0-2268-4a2b-8a96-72d2439eca41", + "uuid": "3c8eddcf-46f0-439d-a045-8ff010e0881b", "persistent": true, "insertionIndex": 8 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6208100.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6208155.json similarity index 78% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6208100.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6208155.json index 8c3d2253b5..d80953700d 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6208100.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6208155.json @@ -1,8 +1,8 @@ { - "id": "883b62a6-ba7a-4b6b-bdac-6a39266b7e97", - "name": "repos_alaurant_github-api-test_autolinks_6208100", + "id": "a0c1de58-d753-4847-ba04-0325e8ba3a93", + "name": "repos_alaurant_github-api-test_autolinks_6208155", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208100", + "url": "/repos/Alaurant/github-api-test/autolinks/6208155", "method": "DELETE", "headers": { "Accept": { @@ -13,16 +13,16 @@ "response": { "status": 204, "headers": { - "Date": "Tue, 03 Dec 2024 06:54:48 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4961", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "39", + "X-RateLimit-Remaining": "4980", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "20", "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": "*", @@ -34,10 +34,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "ABB1:260E1D:6516F1:760F56:674EAB38" + "X-GitHub-Request-Id": "AA2B:259AD1:657850:770C35:674EB584" } }, - "uuid": "883b62a6-ba7a-4b6b-bdac-6a39266b7e97", + "uuid": "a0c1de58-d753-4847-ba04-0325e8ba3a93", "persistent": true, "insertionIndex": 9 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/2-r_a_github-api-test.json index 7c3d4b4f65..3b27fc4f53 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/2-r_a_github-api-test.json @@ -105,7 +105,7 @@ "triage": true, "pull": true }, - "temp_clone_token": "AJ7BLWE3ZVPFE5JRNKZRQJTHJ2WGK", + "temp_clone_token": "AJ7BLWFELFUHR4TI6YIYMQ3HJ23LE", "allow_squash_merge": true, "allow_merge_commit": true, "allow_rebase_merge": true, diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/1-user.json index 4c9a31dc26..a3571e1faf 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/1-user.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/1-user.json @@ -1,5 +1,5 @@ { - "id": "99afe21f-5825-4385-a350-16b518e6db55", + "id": "75bfc2fd-5226-4f0a-9cfa-2123ed1fb263", "name": "user", "request": { "url": "/user", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "1-user.json", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:48 GMT", + "Date": "Tue, 03 Dec 2024 07:38:45 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4960", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "40", + "X-RateLimit-Remaining": "4979", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "21", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "ABBC:25CB59:628A6B:7382DC:674EAB38" + "X-GitHub-Request-Id": "AA33:25CB59:6648A6:77DC83:674EB585" } }, - "uuid": "99afe21f-5825-4385-a350-16b518e6db55", + "uuid": "75bfc2fd-5226-4f0a-9cfa-2123ed1fb263", "persistent": true, "insertionIndex": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/2-r_a_github-api-test.json index 176476066e..ce17154a9c 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/2-r_a_github-api-test.json @@ -1,5 +1,5 @@ { - "id": "2ee7cc1d-ca3c-4fe0-aa52-db592c09839a", + "id": "31b3208b-5fb6-40dd-a48d-997096745c6e", "name": "repos_alaurant_github-api-test", "request": { "url": "/repos/Alaurant/github-api-test", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "2-r_a_github-api-test.json", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:49 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4958", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "42", + "X-RateLimit-Remaining": "4977", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "23", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "ABBD:25C9E5:64E1B6:75DA32:674EAB39" + "X-GitHub-Request-Id": "AA37:260E1D:699594:7B298D:674EB585" } }, - "uuid": "2ee7cc1d-ca3c-4fe0-aa52-db592c09839a", + "uuid": "31b3208b-5fb6-40dd-a48d-997096745c6e", "persistent": true, "insertionIndex": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/3-r_a_g_autolinks.json index 75eaaf5b03..c494217c94 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/3-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/3-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "089121ed-3a09-445b-b7fc-79ef1d3dfb8f", + "id": "1406dd41-9106-4023-9b56-3154069280ac", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6208101,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", + "body": "{\"id\":6208156,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:50 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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": "\"eb3e3b9135d54ce2e86f57ee73a6e0faf0335556def466b09d7c1132f45cf161\"", + "ETag": "\"f182c04e2eecd0667658564e0628c8067be98cd7a990c69bcf03f2af961421a1\"", "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": "4957", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "43", + "X-RateLimit-Remaining": "4976", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "24", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "ABC1:2616CE:6881FF:797A95:674EAB39" + "X-GitHub-Request-Id": "AA38:2616CE:6C7454:7E086D:674EB586" } }, - "uuid": "089121ed-3a09-445b-b7fc-79ef1d3dfb8f", + "uuid": "1406dd41-9106-4023-9b56-3154069280ac", "persistent": true, "insertionIndex": 3 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6208101.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6208156.json similarity index 75% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6208101.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6208156.json index 627328701f..f84a404907 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6208101.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6208156.json @@ -1,8 +1,8 @@ { - "id": "50e40ff8-9699-487a-9b3c-9c9ad0950351", - "name": "repos_alaurant_github-api-test_autolinks_6208101", + "id": "b286f327-6a31-477c-bdc8-312101de5705", + "name": "repos_alaurant_github-api-test_autolinks_6208156", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208101", + "url": "/repos/Alaurant/github-api-test/autolinks/6208156", "method": "GET", "headers": { "Accept": { @@ -12,22 +12,22 @@ }, "response": { "status": 200, - "body": "{\"id\":6208101,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", + "body": "{\"id\":6208156,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:50 GMT", + "Date": "Tue, 03 Dec 2024 07:38: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/\"eb3e3b9135d54ce2e86f57ee73a6e0faf0335556def466b09d7c1132f45cf161\"", + "ETag": "W/\"f182c04e2eecd0667658564e0628c8067be98cd7a990c69bcf03f2af961421a1\"", "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": "4956", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "44", + "X-RateLimit-Remaining": "4975", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "25", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "ABC2:25D2D0:67588E:78511F:674EAB3A" + "X-GitHub-Request-Id": "AA39:25D2D0:6B211A:7CB527:674EB586" } }, - "uuid": "50e40ff8-9699-487a-9b3c-9c9ad0950351", + "uuid": "b286f327-6a31-477c-bdc8-312101de5705", "persistent": true, "insertionIndex": 4 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6208101.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6208156.json similarity index 78% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6208101.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6208156.json index 2c891758c3..e5172fb35a 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6208101.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6208156.json @@ -1,8 +1,8 @@ { - "id": "27891073-8620-4911-b0f9-a90d4aa1fe08", - "name": "repos_alaurant_github-api-test_autolinks_6208101", + "id": "021b08d9-0275-467e-bb5f-1e8b3dc4d44e", + "name": "repos_alaurant_github-api-test_autolinks_6208156", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208101", + "url": "/repos/Alaurant/github-api-test/autolinks/6208156", "method": "DELETE", "headers": { "Accept": { @@ -13,16 +13,16 @@ "response": { "status": 204, "headers": { - "Date": "Tue, 03 Dec 2024 06:54:51 GMT", + "Date": "Tue, 03 Dec 2024 07:38:47 GMT", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4955", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "45", + "X-RateLimit-Remaining": "4974", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "26", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -34,10 +34,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "ABC6:253D9C:6592B8:768B52:674EAB3A" + "X-GitHub-Request-Id": "AA3D:253D9C:69D586:7B6998:674EB587" } }, - "uuid": "27891073-8620-4911-b0f9-a90d4aa1fe08", + "uuid": "021b08d9-0275-467e-bb5f-1e8b3dc4d44e", "persistent": true, "insertionIndex": 5 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/6-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/6-r_a_g_autolinks.json index 9fac1e27a2..b282bb9b84 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/6-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/6-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "17324ee3-4605-43a5-b1ab-2a18bae6cd3a", + "id": "efbd3941-9860-48d9-9c53-4883122928a5", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -14,7 +14,7 @@ "status": 200, "body": "[]", "headers": { - "Date": "Tue, 03 Dec 2024 06:54:51 GMT", + "Date": "Tue, 03 Dec 2024 07:38:47 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", @@ -25,9 +25,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4954", - "X-RateLimit-Reset": "1733209471", - "X-RateLimit-Used": "46", + "X-RateLimit-Remaining": "4973", + "X-RateLimit-Reset": "1733215115", + "X-RateLimit-Used": "27", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "ABC7:261CA8:6410D0:75096B:674EAB3B" + "X-GitHub-Request-Id": "AA3E:261CA8:67BC11:795017:674EB587" } }, - "uuid": "17324ee3-4605-43a5-b1ab-2a18bae6cd3a", + "uuid": "efbd3941-9860-48d9-9c53-4883122928a5", "persistent": true, "insertionIndex": 6 } \ No newline at end of file From 83cd72306299e1545ea1d990358b4699d93f458e Mon Sep 17 00:00:00 2001 From: Alaurant Date: Wed, 4 Dec 2024 10:16:42 +1000 Subject: [PATCH 5/5] convert Integer to int and wrap to latebind --- .../java/org/kohsuke/github/GHAutolink.java | 6 ++--- .../org/kohsuke/github/GHAutolinkBuilder.java | 2 +- .../java/org/kohsuke/github/GHRepository.java | 10 ++++----- .../org/kohsuke/github/GHAutolinkTest.java | 4 ++-- .../__files/2-r_a_github-api-test.json | 6 ++--- .../testCreateAutolink/mappings/1-user.json | 14 ++++++------ .../mappings/2-r_a_github-api-test.json | 16 +++++++------- .../mappings/3-r_a_g_autolinks.json | 18 +++++++-------- ...57.json => 4-r_a_g_autolinks_6214215.json} | 18 +++++++-------- .../mappings/5-r_a_g_autolinks.json | 14 ++++++------ .../__files/2-r_a_github-api-test.json | 6 ++--- .../testDeleteAutolink/mappings/1-user.json | 14 ++++++------ .../mappings/2-r_a_github-api-test.json | 16 +++++++------- .../mappings/3-r_a_g_autolinks.json | 18 +++++++-------- ...52.json => 4-r_a_g_autolinks_6214199.json} | 18 +++++++-------- ...52.json => 5-r_a_g_autolinks_6214199.json} | 18 +++++++-------- .../mappings/6-r_a_g_autolinks.json | 18 +++++++-------- ...53.json => 7-r_a_g_autolinks_6214204.json} | 18 +++++++-------- ...53.json => 8-r_a_g_autolinks_6214204.json} | 18 +++++++-------- .../mappings/9-r_a_g_autolinks.json | 14 ++++++------ .../__files/2-r_a_github-api-test.json | 6 ++--- .../testListAllAutolinks/mappings/1-user.json | 14 ++++++------ .../mappings/2-r_a_github-api-test.json | 16 +++++++------- .../mappings/3-r_a_g_autolinks.json | 14 ++++++------ .../mappings/4-r_a_g_autolinks.json | 18 +++++++-------- .../mappings/5-r_a_g_autolinks.json | 18 +++++++-------- .../mappings/6-r_a_g_autolinks.json | 18 +++++++-------- .../mappings/7-r_a_g_autolinks.json | 18 +++++++-------- ...54.json => 8-r_a_g_autolinks_6214208.json} | 18 +++++++-------- ...55.json => 9-r_a_g_autolinks_6214209.json} | 18 +++++++-------- .../__files/2-r_a_github-api-test.json | 6 ++--- .../testReadAutolink/mappings/1-user.json | 14 ++++++------ .../mappings/2-r_a_github-api-test.json | 16 +++++++------- .../mappings/3-r_a_g_autolinks.json | 18 +++++++-------- ...56.json => 4-r_a_g_autolinks_6214212.json} | 22 +++++++++---------- ...56.json => 5-r_a_g_autolinks_6214212.json} | 18 +++++++-------- .../mappings/6-r_a_g_autolinks.json | 14 ++++++------ 37 files changed, 266 insertions(+), 266 deletions(-) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/{4-r_a_g_autolinks_6208157.json => 4-r_a_g_autolinks_6214215.json} (78%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/{4-r_a_g_autolinks_6208152.json => 4-r_a_g_autolinks_6214199.json} (78%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/{5-r_a_g_autolinks_6208152.json => 5-r_a_g_autolinks_6214199.json} (80%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/{7-r_a_g_autolinks_6208153.json => 7-r_a_g_autolinks_6214204.json} (78%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/{8-r_a_g_autolinks_6208153.json => 8-r_a_g_autolinks_6214204.json} (80%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/{8-r_a_g_autolinks_6208154.json => 8-r_a_g_autolinks_6214208.json} (78%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/{9-r_a_g_autolinks_6208155.json => 9-r_a_g_autolinks_6214209.json} (78%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/{4-r_a_g_autolinks_6208156.json => 4-r_a_g_autolinks_6214212.json} (75%) rename src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/{5-r_a_g_autolinks_6208156.json => 5-r_a_g_autolinks_6214212.json} (78%) diff --git a/src/main/java/org/kohsuke/github/GHAutolink.java b/src/main/java/org/kohsuke/github/GHAutolink.java index ca819f9de9..841f1d0f65 100644 --- a/src/main/java/org/kohsuke/github/GHAutolink.java +++ b/src/main/java/org/kohsuke/github/GHAutolink.java @@ -14,7 +14,7 @@ */ public class GHAutolink { - private Integer id; + private int id; private String key_prefix; private String url_template; private boolean is_alphanumeric; @@ -31,7 +31,7 @@ public GHAutolink() { * * @return the id */ - public Integer getId() { + public int getId() { return id; } @@ -93,7 +93,7 @@ public void delete() throws IOException { * the repository that owns this autolink * @return this instance */ - GHAutolink wrap(GHRepository owner) { + GHAutolink lateBind(GHRepository owner) { this.owner = owner; return this; } diff --git a/src/main/java/org/kohsuke/github/GHAutolinkBuilder.java b/src/main/java/org/kohsuke/github/GHAutolinkBuilder.java index 22a9ea5bd0..3082d9487d 100644 --- a/src/main/java/org/kohsuke/github/GHAutolinkBuilder.java +++ b/src/main/java/org/kohsuke/github/GHAutolinkBuilder.java @@ -84,7 +84,7 @@ public GHAutolink create() throws IOException { .withUrlPath(getApiTail()) .fetch(GHAutolink.class); - return autolink.wrap(repo); + return autolink.lateBind(repo); } } diff --git a/src/main/java/org/kohsuke/github/GHRepository.java b/src/main/java/org/kohsuke/github/GHRepository.java index 1b227b3d22..ab60eafb86 100644 --- a/src/main/java/org/kohsuke/github/GHRepository.java +++ b/src/main/java/org/kohsuke/github/GHRepository.java @@ -3389,7 +3389,7 @@ public GHAutolinkBuilder createAutolink() { * List all autolinks of a repo (admin only). * (https://docs.github.com/en/rest/repos/autolinks?apiVersion=2022-11-28#get-all-autolinks-of-a-repository) * - * @return the autolinks + * @return all autolinks in the repo * @throws IOException * the io exception */ @@ -3397,7 +3397,7 @@ public PagedIterable listAutolinks() throws IOException { return root().createRequest() .withHeader("Accept", "application/vnd.github+json") .withUrlPath(String.format("/repos/%s/%s/autolinks", getOwnerName(), getName())) - .toIterable(GHAutolink[].class, item -> item.wrap(this)); + .toIterable(GHAutolink[].class, item -> item.lateBind(this)); } /** @@ -3410,12 +3410,12 @@ public PagedIterable listAutolinks() throws IOException { * @throws IOException * the io exception */ - public GHAutolink readAutolink(Integer autolinkId) throws IOException { + public GHAutolink readAutolink(int autolinkId) throws IOException { return root().createRequest() .withHeader("Accept", "application/vnd.github+json") .withUrlPath(String.format("/repos/%s/%s/autolinks/%d", getOwnerName(), getName(), autolinkId)) .fetch(GHAutolink.class) - .wrap(this); + .lateBind(this); } /** @@ -3427,7 +3427,7 @@ public GHAutolink readAutolink(Integer autolinkId) throws IOException { * @throws IOException * the io exception */ - public void deleteAutolink(Integer autolinkId) throws IOException { + public void deleteAutolink(int autolinkId) throws IOException { root().createRequest() .method("DELETE") .withHeader("Accept", "application/vnd.github+json") diff --git a/src/test/java/org/kohsuke/github/GHAutolinkTest.java b/src/test/java/org/kohsuke/github/GHAutolinkTest.java index ff8300d38d..8a09e5b22d 100644 --- a/src/test/java/org/kohsuke/github/GHAutolinkTest.java +++ b/src/test/java/org/kohsuke/github/GHAutolinkTest.java @@ -122,13 +122,13 @@ public void testListAllAutolinks() throws Exception { for (GHAutolink autolink : autolinkList) { - if (autolink.getId().equals(autolink1.getId())) { + if (autolink.getId() == autolink1.getId()) { found1 = true; assertThat(autolink.getKeyPrefix(), equalTo(autolink1.getKeyPrefix())); assertThat(autolink.getUrlTemplate(), equalTo(autolink1.getUrlTemplate())); assertThat(autolink.isAlphanumeric(), equalTo(autolink1.isAlphanumeric())); } - if (autolink.getId().equals(autolink2.getId())) { + if (autolink.getId() == autolink2.getId()) { found2 = true; assertThat(autolink.getKeyPrefix(), equalTo(autolink2.getKeyPrefix())); assertThat(autolink.getUrlTemplate(), equalTo(autolink2.getUrlTemplate())); diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json index 0474c395a4..00da15691e 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/__files/2-r_a_github-api-test.json @@ -87,7 +87,7 @@ "mirror_url": null, "archived": false, "disabled": false, - "open_issues_count": 0, + "open_issues_count": 3, "license": null, "allow_forking": true, "is_template": false, @@ -95,7 +95,7 @@ "topics": [], "visibility": "private", "forks": 0, - "open_issues": 0, + "open_issues": 3, "watchers": 0, "default_branch": "main", "permissions": { @@ -105,7 +105,7 @@ "triage": true, "pull": true }, - "temp_clone_token": "AJ7BLWBKSYTW3I62UR7LF2DHJ23LK", + "temp_clone_token": "AJ7BLWEW6YP5EUIYTPGKLMDHJ6O5M", "allow_squash_merge": true, "allow_merge_commit": true, "allow_rebase_merge": true, diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json index 518e4728b3..dcaa3400f1 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/1-user.json @@ -1,5 +1,5 @@ { - "id": "98d81ba5-ebd3-49e4-84f2-75f985bc47cc", + "id": "5efad309-8a6e-4bea-b5d3-f558468cde2f", "name": "user", "request": { "url": "/user", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "1-user.json", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:48 GMT", + "Date": "Wed, 04 Dec 2024 00:04:58 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4972", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "28", + "X-RateLimit-Remaining": "4964", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "36", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA46:260E1D:699639:7B2A52:674EB588" + "X-GitHub-Request-Id": "AB4B:259AD1:AD6A0A:CCA3BA:674F9CA9" } }, - "uuid": "98d81ba5-ebd3-49e4-84f2-75f985bc47cc", + "uuid": "5efad309-8a6e-4bea-b5d3-f558468cde2f", "persistent": true, "insertionIndex": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json index 5483c49f15..b3799cfac2 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/2-r_a_github-api-test.json @@ -1,5 +1,5 @@ { - "id": "2fcf27db-2e76-4f6f-a79f-c9519c5d91ca", + "id": "7b4379d6-4382-4589-a8de-6c179a3b878e", "name": "repos_alaurant_github-api-test", "request": { "url": "/repos/Alaurant/github-api-test", @@ -14,11 +14,11 @@ "status": 200, "bodyFileName": "2-r_a_github-api-test.json", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:49 GMT", + "Date": "Wed, 04 Dec 2024 00:04:58 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", - "ETag": "W/\"7e65dfd17dae8b0f5999ecf48b16504e24747c234146f1413401d052558f8f01\"", + "ETag": "W/\"94ad6f4d71086bda8c2640d1ba979adc705c9465218c4ca1e55dc20011962ee7\"", "Last-Modified": "Thu, 28 Nov 2024 23:44:55 GMT", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4970", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "30", + "X-RateLimit-Remaining": "4962", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "38", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA4A:275BE1:5DAE86:6CDB96:674EB589" + "X-GitHub-Request-Id": "AB4F:261CA8:B9F4DA:D92EA2:674F9CAA" } }, - "uuid": "2fcf27db-2e76-4f6f-a79f-c9519c5d91ca", + "uuid": "7b4379d6-4382-4589-a8de-6c179a3b878e", "persistent": true, "insertionIndex": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json index 7bc2fc94a4..882605d3e0 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/3-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "8347f3dd-5be0-4a28-b01e-9e1405b46087", + "id": "72c0b399-ca4c-4934-bb37-204fb2eee65c", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6208157,\"key_prefix\":\"EXAMPLE-\",\"url_template\":\"https://example.com/TICKET?q=\",\"is_alphanumeric\":true}", + "body": "{\"id\":6214215,\"key_prefix\":\"EXAMPLE-\",\"url_template\":\"https://example.com/TICKET?q=\",\"is_alphanumeric\":true}", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:49 GMT", + "Date": "Wed, 04 Dec 2024 00:04:59 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", - "ETag": "\"a36001f0fa64730b7452b1bc25ccdf888f1db06d9933656b99e2cff7b4e48b3a\"", + "ETag": "\"5957fc62ce793c3c3f204807841c0322d186ec5693b11e746a2a773ff4814345\"", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4969", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "31", + "X-RateLimit-Remaining": "4961", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "39", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA4D:261CA8:67BCCF:795107:674EB589" + "X-GitHub-Request-Id": "AB50:25FB34:AFAC50:CEE61E:674F9CAB" } }, - "uuid": "8347f3dd-5be0-4a28-b01e-9e1405b46087", + "uuid": "72c0b399-ca4c-4934-bb37-204fb2eee65c", "persistent": true, "insertionIndex": 3 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6208157.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6214215.json similarity index 78% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6208157.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6214215.json index 7c7226e891..e3e2b0ee75 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6208157.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/4-r_a_g_autolinks_6214215.json @@ -1,8 +1,8 @@ { - "id": "e3c2362c-a973-4ad6-91fa-5efe8aa8c05c", - "name": "repos_alaurant_github-api-test_autolinks_6208157", + "id": "e6f3b690-7bba-4fca-af09-bb9c36c226c2", + "name": "repos_alaurant_github-api-test_autolinks_6214215", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208157", + "url": "/repos/Alaurant/github-api-test/autolinks/6214215", "method": "DELETE", "headers": { "Accept": { @@ -13,16 +13,16 @@ "response": { "status": 204, "headers": { - "Date": "Tue, 03 Dec 2024 07:38:50 GMT", + "Date": "Wed, 04 Dec 2024 00:05:00 GMT", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4968", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "32", + "X-RateLimit-Remaining": "4960", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "40", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -34,10 +34,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AA51:25CB59:664A36:77DE74:674EB589" + "X-GitHub-Request-Id": "AB54:25C9E5:B594DE:D4CE98:674F9CAC" } }, - "uuid": "e3c2362c-a973-4ad6-91fa-5efe8aa8c05c", + "uuid": "e6f3b690-7bba-4fca-af09-bb9c36c226c2", "persistent": true, "insertionIndex": 4 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks.json index 4948102df3..3205f0a148 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testCreateAutolink/mappings/5-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "46498eb6-0cf4-48a7-ae76-a13a64665a7d", + "id": "4e99e7cf-51c0-42eb-aac3-11c71370da7d", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -14,7 +14,7 @@ "status": 200, "body": "[]", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:50 GMT", + "Date": "Wed, 04 Dec 2024 00:05:00 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", @@ -25,9 +25,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4967", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "33", + "X-RateLimit-Remaining": "4959", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "41", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA52:25C9E5:68E849:7A7C9A:674EB58A" + "X-GitHub-Request-Id": "AB58:2616CE:B40D89:D3475B:674F9CAC" } }, - "uuid": "46498eb6-0cf4-48a7-ae76-a13a64665a7d", + "uuid": "4e99e7cf-51c0-42eb-aac3-11c71370da7d", "persistent": true, "insertionIndex": 5 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json index 1d9ee8a01f..f105aebb35 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/__files/2-r_a_github-api-test.json @@ -87,7 +87,7 @@ "mirror_url": null, "archived": false, "disabled": false, - "open_issues_count": 0, + "open_issues_count": 3, "license": null, "allow_forking": true, "is_template": false, @@ -95,7 +95,7 @@ "topics": [], "visibility": "private", "forks": 0, - "open_issues": 0, + "open_issues": 3, "watchers": 0, "default_branch": "main", "permissions": { @@ -105,7 +105,7 @@ "triage": true, "pull": true }, - "temp_clone_token": "AJ7BLWEMCYWAPCY2SLWSCG3HJ23KQ", + "temp_clone_token": "AJ7BLWHAAPA4X3QOA36CYTLHJ6O4S", "allow_squash_merge": true, "allow_merge_commit": true, "allow_rebase_merge": true, diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json index d1a1f220e5..c37d3842de 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/1-user.json @@ -1,5 +1,5 @@ { - "id": "8c382a42-5cba-408a-8e99-638371421c93", + "id": "cb401d70-c07b-4a80-9333-fd2598ce4873", "name": "user", "request": { "url": "/user", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "1-user.json", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:35 GMT", + "Date": "Wed, 04 Dec 2024 00:04:44 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4999", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "1", + "X-RateLimit-Remaining": "4991", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "9", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "ABFA:271404:583EF4:676428:674EB57B" + "X-GitHub-Request-Id": "AAFC:32381D:19A4CC:1E52E3:674F9C9C" } }, - "uuid": "8c382a42-5cba-408a-8e99-638371421c93", + "uuid": "cb401d70-c07b-4a80-9333-fd2598ce4873", "persistent": true, "insertionIndex": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json index da6052f307..c9bb698e1c 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/2-r_a_github-api-test.json @@ -1,5 +1,5 @@ { - "id": "c0edf83b-b9ad-4ffa-a223-1d3ec93b2b52", + "id": "b4bf2f34-49d5-4aae-9962-b72cc46196c9", "name": "repos_alaurant_github-api-test", "request": { "url": "/repos/Alaurant/github-api-test", @@ -14,11 +14,11 @@ "status": 200, "bodyFileName": "2-r_a_github-api-test.json", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:36 GMT", + "Date": "Wed, 04 Dec 2024 00:04:45 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", - "ETag": "W/\"7e65dfd17dae8b0f5999ecf48b16504e24747c234146f1413401d052558f8f01\"", + "ETag": "W/\"94ad6f4d71086bda8c2640d1ba979adc705c9465218c4ca1e55dc20011962ee7\"", "Last-Modified": "Thu, 28 Nov 2024 23:44:55 GMT", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4997", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "3", + "X-RateLimit-Remaining": "4989", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "11", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "A9FF:261CA8:67B882:794BED:674EB57C" + "X-GitHub-Request-Id": "AB01:275BE1:A9865C:C65840:674F9C9D" } }, - "uuid": "c0edf83b-b9ad-4ffa-a223-1d3ec93b2b52", + "uuid": "b4bf2f34-49d5-4aae-9962-b72cc46196c9", "persistent": true, "insertionIndex": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json index 3cbc543543..d09a8054a3 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/3-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "c00247ee-05d0-4136-8c83-2c42f0e9db88", + "id": "9a5172dd-9af1-4543-9140-8ca5aeaa4aaa", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6208152,\"key_prefix\":\"DELETE-\",\"url_template\":\"https://example.com/delete/\",\"is_alphanumeric\":true}", + "body": "{\"id\":6214199,\"key_prefix\":\"DELETE-\",\"url_template\":\"https://example.com/delete/\",\"is_alphanumeric\":true}", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:37 GMT", + "Date": "Wed, 04 Dec 2024 00:04:45 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", - "ETag": "\"6bebc860eff6db9585b7a6749c2e0d12e326bebe505dc3b52b416cd9640bdee3\"", + "ETag": "\"a956fdb6994525df51a1d05464cca2bbfcfddd6b16580a60ebed7bee5c481b1c\"", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4996", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "4", + "X-RateLimit-Remaining": "4988", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "12", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA00:25E009:674BDB:78DF65:674EB57C" + "X-GitHub-Request-Id": "AB05:25FB34:AFA666:CEDF6C:674F9C9D" } }, - "uuid": "c00247ee-05d0-4136-8c83-2c42f0e9db88", + "uuid": "9a5172dd-9af1-4543-9140-8ca5aeaa4aaa", "persistent": true, "insertionIndex": 3 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6208152.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6214199.json similarity index 78% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6208152.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6214199.json index a44c87e414..6a7c9a740c 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6208152.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/4-r_a_g_autolinks_6214199.json @@ -1,8 +1,8 @@ { - "id": "c6cab082-a929-432a-8dab-f499867db1e0", - "name": "repos_alaurant_github-api-test_autolinks_6208152", + "id": "cb5eb0d7-aa5f-4dec-8e47-8443c7b5eb2b", + "name": "repos_alaurant_github-api-test_autolinks_6214199", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208152", + "url": "/repos/Alaurant/github-api-test/autolinks/6214199", "method": "DELETE", "headers": { "Accept": { @@ -13,16 +13,16 @@ "response": { "status": 204, "headers": { - "Date": "Tue, 03 Dec 2024 07:38:37 GMT", + "Date": "Wed, 04 Dec 2024 00:04:46 GMT", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4995", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "5", + "X-RateLimit-Remaining": "4987", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "13", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -34,10 +34,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AA04:25DAE6:711932:82ACC8:674EB57D" + "X-GitHub-Request-Id": "AB06:25DAE6:BD28AF:DC61D9:674F9C9E" } }, - "uuid": "c6cab082-a929-432a-8dab-f499867db1e0", + "uuid": "cb5eb0d7-aa5f-4dec-8e47-8443c7b5eb2b", "persistent": true, "insertionIndex": 4 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6208152.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6214199.json similarity index 80% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6208152.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6214199.json index f99fbb9405..5f8cdf41c6 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6208152.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/5-r_a_g_autolinks_6214199.json @@ -1,8 +1,8 @@ { - "id": "b91dfefd-ce2f-4e9b-b72c-f10d9a17a683", - "name": "repos_alaurant_github-api-test_autolinks_6208152", + "id": "bf5f8e71-e7c3-4fd9-a76e-8dcda49d68f0", + "name": "repos_alaurant_github-api-test_autolinks_6214199", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208152", + "url": "/repos/Alaurant/github-api-test/autolinks/6214199", "method": "GET", "headers": { "Accept": { @@ -14,7 +14,7 @@ "status": 404, "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/rest/repos/autolinks#get-an-autolink-reference-of-a-repository\",\"status\":\"404\"}", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:38 GMT", + "Date": "Wed, 04 Dec 2024 00:04:46 GMT", "Content-Type": "application/json; charset=utf-8", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", @@ -22,9 +22,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4994", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "6", + "X-RateLimit-Remaining": "4986", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "14", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -36,10 +36,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AA05:25A8FF:6EC1D8:80554B:674EB57E" + "X-GitHub-Request-Id": "AB07:25A8FF:B72F38:D66845:674F9C9E" } }, - "uuid": "b91dfefd-ce2f-4e9b-b72c-f10d9a17a683", + "uuid": "bf5f8e71-e7c3-4fd9-a76e-8dcda49d68f0", "persistent": true, "insertionIndex": 5 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json index a337cbcee9..a11816818d 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/6-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "9618dcf2-84ca-4d7c-a7e9-c47f1892dc77", + "id": "c5607014-5b7d-4cf5-9970-c1c5751cdf9c", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6208153,\"key_prefix\":\"DELETED-\",\"url_template\":\"https://example.com/delete2/\",\"is_alphanumeric\":true}", + "body": "{\"id\":6214204,\"key_prefix\":\"DELETED-\",\"url_template\":\"https://example.com/delete2/\",\"is_alphanumeric\":true}", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:38 GMT", + "Date": "Wed, 04 Dec 2024 00:04:47 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", - "ETag": "\"18b06b68fe5151289037ab9bd59f5547a941f21b44fb52df5d8743c1771baf1d\"", + "ETag": "\"b344c6f9525e0a7606c9736c32b24c4bb94a746a58a0918a467d874462159497\"", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4993", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "7", + "X-RateLimit-Remaining": "4985", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "15", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA09:2377CB:63CABD:741EC4:674EB57E" + "X-GitHub-Request-Id": "AB0B:2377CB:ADCDF0:CBC78F:674F9C9F" } }, - "uuid": "9618dcf2-84ca-4d7c-a7e9-c47f1892dc77", + "uuid": "c5607014-5b7d-4cf5-9970-c1c5751cdf9c", "persistent": true, "insertionIndex": 6 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6208153.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6214204.json similarity index 78% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6208153.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6214204.json index d188055dff..5e7e325c90 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6208153.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/7-r_a_g_autolinks_6214204.json @@ -1,8 +1,8 @@ { - "id": "8063b253-0f76-4356-9efe-740b7c0ca968", - "name": "repos_alaurant_github-api-test_autolinks_6208153", + "id": "82bde32d-073f-4740-9cca-06e6ad4ca563", + "name": "repos_alaurant_github-api-test_autolinks_6214204", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208153", + "url": "/repos/Alaurant/github-api-test/autolinks/6214204", "method": "DELETE", "headers": { "Accept": { @@ -13,16 +13,16 @@ "response": { "status": 204, "headers": { - "Date": "Tue, 03 Dec 2024 07:38:39 GMT", + "Date": "Wed, 04 Dec 2024 00:04:47 GMT", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4992", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "8", + "X-RateLimit-Remaining": "4984", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "16", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -34,10 +34,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AA0A:260E1D:6992A9:7B2629:674EB57F" + "X-GitHub-Request-Id": "AB0C:321638:1E70D8:241378:674F9C9F" } }, - "uuid": "8063b253-0f76-4356-9efe-740b7c0ca968", + "uuid": "82bde32d-073f-4740-9cca-06e6ad4ca563", "persistent": true, "insertionIndex": 7 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6208153.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6214204.json similarity index 80% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6208153.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6214204.json index 1764659a02..d8e8b74f51 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6208153.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/8-r_a_g_autolinks_6214204.json @@ -1,8 +1,8 @@ { - "id": "322df042-2623-4516-ba69-da9fad6594ac", - "name": "repos_alaurant_github-api-test_autolinks_6208153", + "id": "f41b31b6-2e5d-48f9-881b-0f96caab4c70", + "name": "repos_alaurant_github-api-test_autolinks_6214204", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208153", + "url": "/repos/Alaurant/github-api-test/autolinks/6214204", "method": "GET", "headers": { "Accept": { @@ -14,7 +14,7 @@ "status": 404, "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/rest/repos/autolinks#get-an-autolink-reference-of-a-repository\",\"status\":\"404\"}", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:39 GMT", + "Date": "Wed, 04 Dec 2024 00:04:48 GMT", "Content-Type": "application/json; charset=utf-8", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", @@ -22,9 +22,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4991", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "9", + "X-RateLimit-Remaining": "4983", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "17", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -36,10 +36,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AA0E:275BE1:5DAA7A:6CD6EB:674EB57F" + "X-GitHub-Request-Id": "AB10:275BE1:A987C7:C659CB:674F9CA0" } }, - "uuid": "322df042-2623-4516-ba69-da9fad6594ac", + "uuid": "f41b31b6-2e5d-48f9-881b-0f96caab4c70", "persistent": true, "insertionIndex": 8 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json index 9d73da7ee3..84c8a5d76a 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testDeleteAutolink/mappings/9-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "26b0759e-8de9-4545-ae87-0731204c81ec", + "id": "dd326434-5694-4484-80e4-d2a63d84daf0", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -14,7 +14,7 @@ "status": 200, "body": "[]", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:40 GMT", + "Date": "Wed, 04 Dec 2024 00:04:49 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", @@ -25,9 +25,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4990", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "10", + "X-RateLimit-Remaining": "4982", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "18", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA0F:25E009:674D8A:78E146:674EB57F" + "X-GitHub-Request-Id": "AB11:25E009:B3D920:D3125C:674F9CA0" } }, - "uuid": "26b0759e-8de9-4545-ae87-0731204c81ec", + "uuid": "dd326434-5694-4484-80e4-d2a63d84daf0", "persistent": true, "insertionIndex": 9 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/2-r_a_github-api-test.json index 31de4f60e2..aea5d9d6e3 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/__files/2-r_a_github-api-test.json @@ -87,7 +87,7 @@ "mirror_url": null, "archived": false, "disabled": false, - "open_issues_count": 0, + "open_issues_count": 3, "license": null, "allow_forking": true, "is_template": false, @@ -95,7 +95,7 @@ "topics": [], "visibility": "private", "forks": 0, - "open_issues": 0, + "open_issues": 3, "watchers": 0, "default_branch": "main", "permissions": { @@ -105,7 +105,7 @@ "triage": true, "pull": true }, - "temp_clone_token": "AJ7BLWENEDJGOSRZZWVLLX3HJ23K2", + "temp_clone_token": "AJ7BLWDDUCRCEJ6FDF6I2MDHJ6O44", "allow_squash_merge": true, "allow_merge_commit": true, "allow_rebase_merge": true, diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/1-user.json index 6182104dfe..27b9001e4c 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/1-user.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/1-user.json @@ -1,5 +1,5 @@ { - "id": "4cb980ae-7b79-4189-9409-9d2ae9919c2f", + "id": "e37bea15-a992-490d-abd4-9b62de05c88e", "name": "user", "request": { "url": "/user", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "1-user.json", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:40 GMT", + "Date": "Wed, 04 Dec 2024 00:04:49 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4989", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "11", + "X-RateLimit-Remaining": "4981", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "19", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA17:271404:5840C0:676640:674EB580" + "X-GitHub-Request-Id": "AB1C:2616CE:B40940:D3426D:674F9CA1" } }, - "uuid": "4cb980ae-7b79-4189-9409-9d2ae9919c2f", + "uuid": "e37bea15-a992-490d-abd4-9b62de05c88e", "persistent": true, "insertionIndex": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/2-r_a_github-api-test.json index 018594c4ff..71b82fd4e4 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/2-r_a_github-api-test.json @@ -1,5 +1,5 @@ { - "id": "a420e293-d74a-4974-ac10-a1dd9755d676", + "id": "6e30ba43-5316-46d1-9b80-53c527a53846", "name": "repos_alaurant_github-api-test", "request": { "url": "/repos/Alaurant/github-api-test", @@ -14,11 +14,11 @@ "status": 200, "bodyFileName": "2-r_a_github-api-test.json", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:41 GMT", + "Date": "Wed, 04 Dec 2024 00:04:50 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", - "ETag": "W/\"7e65dfd17dae8b0f5999ecf48b16504e24747c234146f1413401d052558f8f01\"", + "ETag": "W/\"94ad6f4d71086bda8c2640d1ba979adc705c9465218c4ca1e55dc20011962ee7\"", "Last-Modified": "Thu, 28 Nov 2024 23:44:55 GMT", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4987", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "13", + "X-RateLimit-Remaining": "4979", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "21", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA1B:25D2D0:6B1F6A:7CB329:674EB581" + "X-GitHub-Request-Id": "AB1D:32381D:19A7EC:1E5668:674F9CA2" } }, - "uuid": "a420e293-d74a-4974-ac10-a1dd9755d676", + "uuid": "6e30ba43-5316-46d1-9b80-53c527a53846", "persistent": true, "insertionIndex": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/3-r_a_g_autolinks.json index 552821f0a3..20ae14a08b 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/3-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/3-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "316f4849-5f4f-4bd6-9d28-8fd52f3b210a", + "id": "bf0df31e-be26-4067-9a91-8f4c1e918c1c", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -14,7 +14,7 @@ "status": 200, "body": "[]", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:42 GMT", + "Date": "Wed, 04 Dec 2024 00:04:51 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", @@ -25,9 +25,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4986", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "14", + "X-RateLimit-Remaining": "4978", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "22", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA1C:259AD1:65779A:770B59:674EB581" + "X-GitHub-Request-Id": "AB21:253D9C:B16E05:D0A746:674F9CA3" } }, - "uuid": "316f4849-5f4f-4bd6-9d28-8fd52f3b210a", + "uuid": "bf0df31e-be26-4067-9a91-8f4c1e918c1c", "persistent": true, "scenarioName": "scenario-1-repos-Alaurant-github-api-test-autolinks", "requiredScenarioState": "Started", diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/4-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/4-r_a_g_autolinks.json index 4e4b3dad0d..c5bda9edcc 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/4-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/4-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "4b5f30eb-92d4-4d62-8873-500ac95e5c60", + "id": "1c15b670-f893-4111-8f40-7e6843b3f3de", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6208154,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true}", + "body": "{\"id\":6214208,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true}", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:42 GMT", + "Date": "Wed, 04 Dec 2024 00:04:51 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", - "ETag": "\"480b2462acc348a4544429284864809049c99d8a662ea8c903055902013871c5\"", + "ETag": "\"c9b6db3f807e7bc4bb09f6a2cff12454fad030e7b1bf5c73df256d1203c86438\"", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4985", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "15", + "X-RateLimit-Remaining": "4977", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "23", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA20:261CA8:67BA3E:794E06:674EB582" + "X-GitHub-Request-Id": "AB22:261CA8:B9F17C:D92AD4:674F9CA3" } }, - "uuid": "4b5f30eb-92d4-4d62-8873-500ac95e5c60", + "uuid": "1c15b670-f893-4111-8f40-7e6843b3f3de", "persistent": true, "insertionIndex": 4 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/5-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/5-r_a_g_autolinks.json index 1d62d7f93a..0cc310c4be 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/5-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/5-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "777a1fbd-e363-40d6-95ae-cc23181efdea", + "id": "7b65f4bc-bc7a-4fd9-92dd-9b0685cc61cd", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6208155,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}", + "body": "{\"id\":6214209,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:43 GMT", + "Date": "Wed, 04 Dec 2024 00:04:52 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", - "ETag": "\"9e23ef50e6efc5f6ba3cec78cd2b6b596ea570978cb111cf990d5decee971c5e\"", + "ETag": "\"afdd2654330781c9949511c99bff15109b2730f99b857072c555012912bbcd8b\"", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4984", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "16", + "X-RateLimit-Remaining": "4976", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "24", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA21:25FB34:684282:79D65B:674EB583" + "X-GitHub-Request-Id": "AB26:25CB59:B00C2A:CF4583:674F9CA3" } }, - "uuid": "777a1fbd-e363-40d6-95ae-cc23181efdea", + "uuid": "7b65f4bc-bc7a-4fd9-92dd-9b0685cc61cd", "persistent": true, "insertionIndex": 5 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/6-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/6-r_a_g_autolinks.json index 26c4728bf5..f122ac898e 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/6-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/6-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "2592a12d-edb8-40d8-81d1-f2b6e1ecaca4", + "id": "6b46543e-8784-4c36-970a-ed779fd6899b", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -12,22 +12,22 @@ }, "response": { "status": 200, - "body": "[{\"id\":6208154,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true},{\"id\":6208155,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}]", + "body": "[{\"id\":6214208,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true},{\"id\":6214209,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}]", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:43 GMT", + "Date": "Wed, 04 Dec 2024 00:04:52 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", - "ETag": "W/\"de622157cf3668fbc5d7b08276e49e368f326a91de6df815ae054c56b58640dd\"", + "ETag": "W/\"fe94434b76cb272acea19e422afda92332aae93faf10354bc617a3360716a141\"", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4983", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "17", + "X-RateLimit-Remaining": "4975", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "25", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA25:25C9E5:68E57F:7A7949:674EB583" + "X-GitHub-Request-Id": "AA38:2616CE:B40A4C:D3439E:674F9CA4" } }, - "uuid": "2592a12d-edb8-40d8-81d1-f2b6e1ecaca4", + "uuid": "6b46543e-8784-4c36-970a-ed779fd6899b", "persistent": true, "scenarioName": "scenario-1-repos-Alaurant-github-api-test-autolinks", "requiredScenarioState": "scenario-1-repos-Alaurant-github-api-test-autolinks-2", diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/7-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/7-r_a_g_autolinks.json index ef85cff171..42ce6b3388 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/7-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/7-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "144e875f-a2f2-46a2-b693-267caa327a90", + "id": "e1029d4b-a07c-4f57-a043-97e49164bf5a", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -12,22 +12,22 @@ }, "response": { "status": 200, - "body": "[{\"id\":6208154,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true},{\"id\":6208155,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}]", + "body": "[{\"id\":6214208,\"key_prefix\":\"LIST-\",\"url_template\":\"https://example.com/list1/\",\"is_alphanumeric\":true},{\"id\":6214209,\"key_prefix\":\"LISTED-\",\"url_template\":\"https://example.com/list2/\",\"is_alphanumeric\":false}]", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:43 GMT", + "Date": "Wed, 04 Dec 2024 00:04:53 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", - "ETag": "W/\"de622157cf3668fbc5d7b08276e49e368f326a91de6df815ae054c56b58640dd\"", + "ETag": "W/\"fe94434b76cb272acea19e422afda92332aae93faf10354bc617a3360716a141\"", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4982", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "18", + "X-RateLimit-Remaining": "4974", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "26", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA26:271404:5841D5:676785:674EB583" + "X-GitHub-Request-Id": "AB28:271404:A4AC9F:C177E4:674F9CA4" } }, - "uuid": "144e875f-a2f2-46a2-b693-267caa327a90", + "uuid": "e1029d4b-a07c-4f57-a043-97e49164bf5a", "persistent": true, "scenarioName": "scenario-1-repos-Alaurant-github-api-test-autolinks", "requiredScenarioState": "scenario-1-repos-Alaurant-github-api-test-autolinks-3", diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6208154.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6214208.json similarity index 78% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6208154.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6214208.json index bded25a16c..524bb8a8dc 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6208154.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/8-r_a_g_autolinks_6214208.json @@ -1,8 +1,8 @@ { - "id": "3c8eddcf-46f0-439d-a045-8ff010e0881b", - "name": "repos_alaurant_github-api-test_autolinks_6208154", + "id": "affffb27-b98a-4457-9ea5-3c7c952d9bfb", + "name": "repos_alaurant_github-api-test_autolinks_6214208", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208154", + "url": "/repos/Alaurant/github-api-test/autolinks/6214208", "method": "DELETE", "headers": { "Accept": { @@ -13,16 +13,16 @@ "response": { "status": 204, "headers": { - "Date": "Tue, 03 Dec 2024 07:38:44 GMT", + "Date": "Wed, 04 Dec 2024 00:04:53 GMT", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4981", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "19", + "X-RateLimit-Remaining": "4973", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "27", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -34,10 +34,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AA27:2377CB:63CC8E:7420EE:674EB584" + "X-GitHub-Request-Id": "AB2C:32381D:19A924:1E57CD:674F9CA5" } }, - "uuid": "3c8eddcf-46f0-439d-a045-8ff010e0881b", + "uuid": "affffb27-b98a-4457-9ea5-3c7c952d9bfb", "persistent": true, "insertionIndex": 8 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6208155.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6214209.json similarity index 78% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6208155.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6214209.json index d80953700d..b5cf4ec9de 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6208155.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testListAllAutolinks/mappings/9-r_a_g_autolinks_6214209.json @@ -1,8 +1,8 @@ { - "id": "a0c1de58-d753-4847-ba04-0325e8ba3a93", - "name": "repos_alaurant_github-api-test_autolinks_6208155", + "id": "b4141f4b-4ca3-4a1c-b507-08a861c87340", + "name": "repos_alaurant_github-api-test_autolinks_6214209", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208155", + "url": "/repos/Alaurant/github-api-test/autolinks/6214209", "method": "DELETE", "headers": { "Accept": { @@ -13,16 +13,16 @@ "response": { "status": 204, "headers": { - "Date": "Tue, 03 Dec 2024 07:38:44 GMT", + "Date": "Wed, 04 Dec 2024 00:04:53 GMT", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4980", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "20", + "X-RateLimit-Remaining": "4972", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "28", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -34,10 +34,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AA2B:259AD1:657850:770C35:674EB584" + "X-GitHub-Request-Id": "AB2D:259AD1:AD6833:CCA19E:674F9CA5" } }, - "uuid": "a0c1de58-d753-4847-ba04-0325e8ba3a93", + "uuid": "b4141f4b-4ca3-4a1c-b507-08a861c87340", "persistent": true, "insertionIndex": 9 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/2-r_a_github-api-test.json index 3b27fc4f53..5e34f49aad 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/__files/2-r_a_github-api-test.json @@ -87,7 +87,7 @@ "mirror_url": null, "archived": false, "disabled": false, - "open_issues_count": 0, + "open_issues_count": 3, "license": null, "allow_forking": true, "is_template": false, @@ -95,7 +95,7 @@ "topics": [], "visibility": "private", "forks": 0, - "open_issues": 0, + "open_issues": 3, "watchers": 0, "default_branch": "main", "permissions": { @@ -105,7 +105,7 @@ "triage": true, "pull": true }, - "temp_clone_token": "AJ7BLWFELFUHR4TI6YIYMQ3HJ23LE", + "temp_clone_token": "AJ7BLWH4VOGNQPWHKJHLRCTHJ6O5G", "allow_squash_merge": true, "allow_merge_commit": true, "allow_rebase_merge": true, diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/1-user.json index a3571e1faf..9d91294677 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/1-user.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/1-user.json @@ -1,5 +1,5 @@ { - "id": "75bfc2fd-5226-4f0a-9cfa-2123ed1fb263", + "id": "a1c0eb19-f0f1-4359-b22a-832a141db3e7", "name": "user", "request": { "url": "/user", @@ -14,7 +14,7 @@ "status": 200, "bodyFileName": "1-user.json", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:45 GMT", + "Date": "Wed, 04 Dec 2024 00:04:54 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4979", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "21", + "X-RateLimit-Remaining": "4971", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "29", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA33:25CB59:6648A6:77DC83:674EB585" + "X-GitHub-Request-Id": "AB35:25CB59:B00D25:CF469E:674F9CA6" } }, - "uuid": "75bfc2fd-5226-4f0a-9cfa-2123ed1fb263", + "uuid": "a1c0eb19-f0f1-4359-b22a-832a141db3e7", "persistent": true, "insertionIndex": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/2-r_a_github-api-test.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/2-r_a_github-api-test.json index ce17154a9c..c1437c1acf 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/2-r_a_github-api-test.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/2-r_a_github-api-test.json @@ -1,5 +1,5 @@ { - "id": "31b3208b-5fb6-40dd-a48d-997096745c6e", + "id": "9c9e2a60-aeb2-4314-8c97-3263084ed857", "name": "repos_alaurant_github-api-test", "request": { "url": "/repos/Alaurant/github-api-test", @@ -14,11 +14,11 @@ "status": 200, "bodyFileName": "2-r_a_github-api-test.json", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:46 GMT", + "Date": "Wed, 04 Dec 2024 00:04:55 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", - "ETag": "W/\"7e65dfd17dae8b0f5999ecf48b16504e24747c234146f1413401d052558f8f01\"", + "ETag": "W/\"94ad6f4d71086bda8c2640d1ba979adc705c9465218c4ca1e55dc20011962ee7\"", "Last-Modified": "Thu, 28 Nov 2024 23:44:55 GMT", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", @@ -26,9 +26,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4977", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "23", + "X-RateLimit-Remaining": "4969", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "31", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -39,10 +39,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA37:260E1D:699594:7B298D:674EB585" + "X-GitHub-Request-Id": "AB39:321638:1E7483:24179C:674F9CA7" } }, - "uuid": "31b3208b-5fb6-40dd-a48d-997096745c6e", + "uuid": "9c9e2a60-aeb2-4314-8c97-3263084ed857", "persistent": true, "insertionIndex": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/3-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/3-r_a_g_autolinks.json index c494217c94..608e6c0ffd 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/3-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/3-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "1406dd41-9106-4023-9b56-3154069280ac", + "id": "6b66e6e7-8c08-4fd9-b644-90b84f8f5bf8", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -19,22 +19,22 @@ }, "response": { "status": 201, - "body": "{\"id\":6208156,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", + "body": "{\"id\":6214212,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:46 GMT", + "Date": "Wed, 04 Dec 2024 00:04:56 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", - "ETag": "\"f182c04e2eecd0667658564e0628c8067be98cd7a990c69bcf03f2af961421a1\"", + "ETag": "\"dd07a13b3219e53d610f3dc3c3f3261e0f56b5b9e02c03bef2c21659e19c8875\"", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4976", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "24", + "X-RateLimit-Remaining": "4968", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "32", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -45,10 +45,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA38:2616CE:6C7454:7E086D:674EB586" + "X-GitHub-Request-Id": "AB3D:275BE1:A98B5B:C65DE1:674F9CA7" } }, - "uuid": "1406dd41-9106-4023-9b56-3154069280ac", + "uuid": "6b66e6e7-8c08-4fd9-b644-90b84f8f5bf8", "persistent": true, "insertionIndex": 3 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6208156.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6214212.json similarity index 75% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6208156.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6214212.json index f84a404907..20eee37749 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6208156.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/4-r_a_g_autolinks_6214212.json @@ -1,8 +1,8 @@ { - "id": "b286f327-6a31-477c-bdc8-312101de5705", - "name": "repos_alaurant_github-api-test_autolinks_6208156", + "id": "3c2a5120-9645-4bbf-9645-ee04be962ae2", + "name": "repos_alaurant_github-api-test_autolinks_6214212", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208156", + "url": "/repos/Alaurant/github-api-test/autolinks/6214212", "method": "GET", "headers": { "Accept": { @@ -12,22 +12,22 @@ }, "response": { "status": 200, - "body": "{\"id\":6208156,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", + "body": "{\"id\":6214212,\"key_prefix\":\"JIRA-\",\"url_template\":\"https://example.com/test/\",\"is_alphanumeric\":false}", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:46 GMT", + "Date": "Wed, 04 Dec 2024 00:04:56 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", - "ETag": "W/\"f182c04e2eecd0667658564e0628c8067be98cd7a990c69bcf03f2af961421a1\"", + "ETag": "W/\"dd07a13b3219e53d610f3dc3c3f3261e0f56b5b9e02c03bef2c21659e19c8875\"", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4975", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "25", + "X-RateLimit-Remaining": "4967", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "33", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA39:25D2D0:6B211A:7CB527:674EB586" + "X-GitHub-Request-Id": "AB3E:25E009:B3DC62:D3161D:674F9CA8" } }, - "uuid": "b286f327-6a31-477c-bdc8-312101de5705", + "uuid": "3c2a5120-9645-4bbf-9645-ee04be962ae2", "persistent": true, "insertionIndex": 4 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6208156.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6214212.json similarity index 78% rename from src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6208156.json rename to src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6214212.json index e5172fb35a..b72ed1961f 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6208156.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/5-r_a_g_autolinks_6214212.json @@ -1,8 +1,8 @@ { - "id": "021b08d9-0275-467e-bb5f-1e8b3dc4d44e", - "name": "repos_alaurant_github-api-test_autolinks_6208156", + "id": "3ed2b3a2-3cc1-4382-86a8-251d4791104b", + "name": "repos_alaurant_github-api-test_autolinks_6214212", "request": { - "url": "/repos/Alaurant/github-api-test/autolinks/6208156", + "url": "/repos/Alaurant/github-api-test/autolinks/6214212", "method": "DELETE", "headers": { "Accept": { @@ -13,16 +13,16 @@ "response": { "status": 204, "headers": { - "Date": "Tue, 03 Dec 2024 07:38:47 GMT", + "Date": "Wed, 04 Dec 2024 00:04:57 GMT", "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, project, read:packages, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "github-authentication-token-expiration": "2025-02-25 04:28:56 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4974", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "26", + "X-RateLimit-Remaining": "4966", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "34", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -34,10 +34,10 @@ "Content-Security-Policy": "default-src 'none'", "Vary": "Accept-Encoding, Accept, X-Requested-With", "Server": "github.com", - "X-GitHub-Request-Id": "AA3D:253D9C:69D586:7B6998:674EB587" + "X-GitHub-Request-Id": "AB42:25DAE6:BD2DEF:DC679E:674F9CA9" } }, - "uuid": "021b08d9-0275-467e-bb5f-1e8b3dc4d44e", + "uuid": "3ed2b3a2-3cc1-4382-86a8-251d4791104b", "persistent": true, "insertionIndex": 5 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/6-r_a_g_autolinks.json b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/6-r_a_g_autolinks.json index b282bb9b84..ce3fe6adc9 100644 --- a/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/6-r_a_g_autolinks.json +++ b/src/test/resources/org/kohsuke/github/GHAutolinkTest/wiremock/testReadAutolink/mappings/6-r_a_g_autolinks.json @@ -1,5 +1,5 @@ { - "id": "efbd3941-9860-48d9-9c53-4883122928a5", + "id": "db9e25ad-fa61-44a4-ab74-c430bd85d6bb", "name": "repos_alaurant_github-api-test_autolinks", "request": { "url": "/repos/Alaurant/github-api-test/autolinks", @@ -14,7 +14,7 @@ "status": 200, "body": "[]", "headers": { - "Date": "Tue, 03 Dec 2024 07:38:47 GMT", + "Date": "Wed, 04 Dec 2024 00:04:57 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", @@ -25,9 +25,9 @@ "X-GitHub-Media-Type": "github.v3; format=json", "x-github-api-version-selected": "2022-11-28", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4973", - "X-RateLimit-Reset": "1733215115", - "X-RateLimit-Used": "27", + "X-RateLimit-Remaining": "4965", + "X-RateLimit-Reset": "1733273750", + "X-RateLimit-Used": "35", "X-RateLimit-Resource": "core", "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", "Access-Control-Allow-Origin": "*", @@ -38,10 +38,10 @@ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", "Server": "github.com", - "X-GitHub-Request-Id": "AA3E:261CA8:67BC11:795017:674EB587" + "X-GitHub-Request-Id": "AB43:25A8FF:B7347B:D66E29:674F9CA9" } }, - "uuid": "efbd3941-9860-48d9-9c53-4883122928a5", + "uuid": "db9e25ad-fa61-44a4-ab74-c430bd85d6bb", "persistent": true, "insertionIndex": 6 } \ No newline at end of file