diff --git a/src/test/java/org/kohsuke/github/AppTest.java b/src/test/java/org/kohsuke/github/AppTest.java index b1b43fbabc..ab111d95d4 100755 --- a/src/test/java/org/kohsuke/github/AppTest.java +++ b/src/test/java/org/kohsuke/github/AppTest.java @@ -4,6 +4,7 @@ import com.google.common.collect.Iterables; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.SystemUtils; +import org.junit.Assert; import org.junit.Assume; import org.junit.Ignore; import org.junit.Test; @@ -620,8 +621,8 @@ public void testCreateCommitComment() throws Exception { @Test public void tryHook() throws Exception { - GHOrganization o = gitHub.getOrganization(GITHUB_API_TEST_ORG); - GHRepository r = o.getRepository("github-api"); + final GHOrganization o = gitHub.getOrganization(GITHUB_API_TEST_ORG); + final GHRepository r = o.getRepository("github-api"); try { GHHook hook = r.createWebHook(new URL("http://www.google.com/")); assertThat(hook.getName(), equalTo("web")); @@ -637,6 +638,13 @@ public void tryHook() throws Exception { assertThat(hook2.getConfig().size(), equalTo(3)); assertThat(hook2.isActive(), equalTo(true)); hook2.ping(); + hook2.delete(); + final GHHook finalRepoHook = hook; + GHFileNotFoundException e = Assert.assertThrows(GHFileNotFoundException.class, () -> r.getHook((int) finalRepoHook.getId())); + assertThat(e.getMessage(), containsString("repos/hub4j-test-org/github-api/hooks/" + finalRepoHook.getId())); + assertThat(e.getMessage(), containsString("rest/reference/repos#get-a-repository-webhook")); + + hook = r.createWebHook(new URL("http://www.google.com/")); r.deleteHook((int) hook.getId()); hook = o.createWebHook(new URL("http://www.google.com/")); @@ -653,13 +661,21 @@ public void tryHook() throws Exception { assertThat(hook2.getConfig().size(), equalTo(3)); assertThat(hook2.isActive(), equalTo(true)); hook2.ping(); + hook2.delete(); + + final GHHook finalOrgHook = hook; + GHFileNotFoundException e2 = Assert.assertThrows(GHFileNotFoundException.class, () -> o.getHook((int) finalOrgHook.getId())); + assertThat(e2.getMessage(), containsString("orgs/hub4j-test-org/hooks/" + finalOrgHook.getId())); + assertThat(e2.getMessage(), containsString("rest/reference/orgs#get-an-organization-webhook")); + + hook = o.createWebHook(new URL("http://www.google.com/")); o.deleteHook((int) hook.getId()); // System.out.println(hook); } finally { if (mockGitHub.isUseProxy()) { - r = getNonRecordingGitHub().getOrganization(GITHUB_API_TEST_ORG).getRepository("github-api"); - for (GHHook h : r.getHooks()) { + GHRepository cleanupRepo = getNonRecordingGitHub().getOrganization(GITHUB_API_TEST_ORG).getRepository("github-api"); + for (GHHook h : cleanupRepo.getHooks()) { h.delete(); } } diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org-2.json index a97e080b15..6a53d8b196 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org-2.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org-2.json @@ -20,7 +20,7 @@ "is_verified": false, "has_organization_projects": true, "has_repository_projects": true, - "public_repos": 13, + "public_repos": 19, "public_gists": 0, "followers": 0, "following": 0, @@ -31,7 +31,7 @@ "total_private_repos": 2, "owned_private_repos": 2, "private_gists": 0, - "disk_usage": 152, + "disk_usage": 11979, "collaborators": 0, "billing_email": "kk@kohsuke.org", "default_repository_permission": "none", @@ -44,7 +44,7 @@ "name": "free", "space": 976562499, "private_repos": 10000, - "filled_seats": 22, + "filled_seats": 26, "seats": 3 } } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org_hooks-11.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org_hooks-11.json new file mode 100644 index 0000000000..6bff11fa23 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org_hooks-11.json @@ -0,0 +1,19 @@ +{ + "type": "Organization", + "id": 319833954, + "name": "web", + "active": true, + "events": [ + "push" + ], + "config": { + "url": "http://www.google.com/", + "insecure_ssl": "0", + "content_type": "form" + }, + "updated_at": "2021-09-24T05:58:39Z", + "created_at": "2021-09-24T05:58:39Z", + "url": "https://api.github.com/orgs/hub4j-test-org/hooks/319833954", + "ping_url": "https://api.github.com/orgs/hub4j-test-org/hooks/319833954/pings", + "deliveries_url": "https://api.github.com/orgs/hub4j-test-org/hooks/319833954/deliveries" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org_hooks-16.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org_hooks-16.json new file mode 100644 index 0000000000..ac57ae302b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org_hooks-16.json @@ -0,0 +1,19 @@ +{ + "type": "Organization", + "id": 319833957, + "name": "web", + "active": true, + "events": [ + "push" + ], + "config": { + "url": "http://www.google.com/", + "insecure_ssl": "0", + "content_type": "form" + }, + "updated_at": "2021-09-24T05:58:40Z", + "created_at": "2021-09-24T05:58:40Z", + "url": "https://api.github.com/orgs/hub4j-test-org/hooks/319833957", + "ping_url": "https://api.github.com/orgs/hub4j-test-org/hooks/319833957/pings", + "deliveries_url": "https://api.github.com/orgs/hub4j-test-org/hooks/319833957/deliveries" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org_hooks-8.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org_hooks-8.json deleted file mode 100644 index 990f80ee2d..0000000000 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org_hooks-8.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "type": "Organization", - "id": 276991250, - "name": "web", - "active": true, - "events": [ - "push" - ], - "config": { - "url": "http://www.google.com/", - "insecure_ssl": "0", - "content_type": "form" - }, - "updated_at": "2021-01-22T21:07:50Z", - "created_at": "2021-01-22T21:07:50Z", - "url": "https://api.github.com/orgs/hub4j-test-org/hooks/276991250", - "ping_url": "https://api.github.com/orgs/hub4j-test-org/hooks/276991250/pings" -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org_hooks_276991250-9.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org_hooks_276991250-9.json deleted file mode 100644 index 990f80ee2d..0000000000 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org_hooks_276991250-9.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "type": "Organization", - "id": 276991250, - "name": "web", - "active": true, - "events": [ - "push" - ], - "config": { - "url": "http://www.google.com/", - "insecure_ssl": "0", - "content_type": "form" - }, - "updated_at": "2021-01-22T21:07:50Z", - "created_at": "2021-01-22T21:07:50Z", - "url": "https://api.github.com/orgs/hub4j-test-org/hooks/276991250", - "ping_url": "https://api.github.com/orgs/hub4j-test-org/hooks/276991250/pings" -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org_hooks_319833954-12.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org_hooks_319833954-12.json new file mode 100644 index 0000000000..6bff11fa23 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/orgs_hub4j-test-org_hooks_319833954-12.json @@ -0,0 +1,19 @@ +{ + "type": "Organization", + "id": 319833954, + "name": "web", + "active": true, + "events": [ + "push" + ], + "config": { + "url": "http://www.google.com/", + "insecure_ssl": "0", + "content_type": "form" + }, + "updated_at": "2021-09-24T05:58:39Z", + "created_at": "2021-09-24T05:58:39Z", + "url": "https://api.github.com/orgs/hub4j-test-org/hooks/319833954", + "ping_url": "https://api.github.com/orgs/hub4j-test-org/hooks/319833954/pings", + "deliveries_url": "https://api.github.com/orgs/hub4j-test-org/hooks/319833954/deliveries" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/repos_hub4j-test-org_github-api-3.json index 75d8bd558d..3d20b124a6 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/repos_hub4j-test-org_github-api-3.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/repos_hub4j-test-org_github-api-3.json @@ -25,7 +25,7 @@ "site_admin": false }, "html_url": "https://github.com/hub4j-test-org/github-api", - "description": "Resetting", + "description": "Tricky", "fork": true, "url": "https://api.github.com/repos/hub4j-test-org/github-api", "forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks", @@ -65,14 +65,14 @@ "releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}", "deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments", "created_at": "2019-09-06T23:26:04Z", - "updated_at": "2021-01-22T03:50:37Z", - "pushed_at": "2020-09-03T19:05:17Z", + "updated_at": "2021-04-19T20:09:00Z", + "pushed_at": "2021-07-24T20:28:27Z", "git_url": "git://github.com/hub4j-test-org/github-api.git", "ssh_url": "git@github.com:hub4j-test-org/github-api.git", "clone_url": "https://github.com/hub4j-test-org/github-api.git", "svn_url": "https://github.com/hub4j-test-org/github-api", "homepage": "http://github-api.kohsuke.org/", - "size": 19052, + "size": 19045, "stargazers_count": 0, "watchers_count": 0, "language": "Java", @@ -85,7 +85,7 @@ "mirror_url": null, "archived": false, "disabled": false, - "open_issues_count": 5, + "open_issues_count": 7, "license": { "key": "mit", "name": "MIT License", @@ -93,19 +93,23 @@ "url": "https://api.github.com/licenses/mit", "node_id": "MDc6TGljZW5zZTEz" }, + "allow_forking": true, "forks": 0, - "open_issues": 5, + "open_issues": 7, "watchers": 0, "default_branch": "main", "permissions": { "admin": true, + "maintain": true, "push": true, + "triage": true, "pull": true }, "temp_clone_token": "", "allow_squash_merge": true, "allow_merge_commit": true, "allow_rebase_merge": true, + "allow_auto_merge": false, "delete_branch_on_merge": false, "organization": { "login": "hub4j-test-org", @@ -194,27 +198,27 @@ "releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", "deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", "created_at": "2010-04-19T04:13:03Z", - "updated_at": "2021-01-22T01:29:15Z", - "pushed_at": "2021-01-15T04:14:15Z", + "updated_at": "2021-09-23T17:58:12Z", + "pushed_at": "2021-09-24T05:33:24Z", "git_url": "git://github.com/hub4j/github-api.git", "ssh_url": "git@github.com:hub4j/github-api.git", "clone_url": "https://github.com/hub4j/github-api.git", "svn_url": "https://github.com/hub4j/github-api", "homepage": "https://github-api.kohsuke.org/", - "size": 26826, - "stargazers_count": 728, - "watchers_count": 728, + "size": 36382, + "stargazers_count": 810, + "watchers_count": 810, "language": "Java", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, - "forks_count": 520, + "forks_count": 563, "mirror_url": null, "archived": false, "disabled": false, - "open_issues_count": 77, + "open_issues_count": 85, "license": { "key": "mit", "name": "MIT License", @@ -222,9 +226,10 @@ "url": "https://api.github.com/licenses/mit", "node_id": "MDc6TGljZW5zZTEz" }, - "forks": 520, - "open_issues": 77, - "watchers": 728, + "allow_forking": true, + "forks": 563, + "open_issues": 85, + "watchers": 810, "default_branch": "main" }, "source": { @@ -294,27 +299,27 @@ "releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", "deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", "created_at": "2010-04-19T04:13:03Z", - "updated_at": "2021-01-22T01:29:15Z", - "pushed_at": "2021-01-15T04:14:15Z", + "updated_at": "2021-09-23T17:58:12Z", + "pushed_at": "2021-09-24T05:33:24Z", "git_url": "git://github.com/hub4j/github-api.git", "ssh_url": "git@github.com:hub4j/github-api.git", "clone_url": "https://github.com/hub4j/github-api.git", "svn_url": "https://github.com/hub4j/github-api", "homepage": "https://github-api.kohsuke.org/", - "size": 26826, - "stargazers_count": 728, - "watchers_count": 728, + "size": 36382, + "stargazers_count": 810, + "watchers_count": 810, "language": "Java", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, - "forks_count": 520, + "forks_count": 563, "mirror_url": null, "archived": false, "disabled": false, - "open_issues_count": 77, + "open_issues_count": 85, "license": { "key": "mit", "name": "MIT License", @@ -322,11 +327,12 @@ "url": "https://api.github.com/licenses/mit", "node_id": "MDc6TGljZW5zZTEz" }, - "forks": 520, - "open_issues": 77, - "watchers": 728, + "allow_forking": true, + "forks": 563, + "open_issues": 85, + "watchers": 810, "default_branch": "main" }, - "network_count": 520, - "subscribers_count": 0 + "network_count": 563, + "subscribers_count": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/repos_hub4j-test-org_github-api_hooks-4.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/repos_hub4j-test-org_github-api_hooks-4.json index 718c25c39a..b66ea94eda 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/repos_hub4j-test-org_github-api_hooks-4.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/repos_hub4j-test-org_github-api_hooks-4.json @@ -1,6 +1,6 @@ { "type": "Repository", - "id": 276991249, + "id": 319833951, "name": "web", "active": true, "events": [ @@ -11,11 +11,12 @@ "insecure_ssl": "0", "content_type": "form" }, - "updated_at": "2021-01-22T21:07:49Z", - "created_at": "2021-01-22T21:07:49Z", - "url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/276991249", - "test_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/276991249/test", - "ping_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/276991249/pings", + "updated_at": "2021-09-24T05:58:37Z", + "created_at": "2021-09-24T05:58:37Z", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/319833951", + "test_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/319833951/test", + "ping_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/319833951/pings", + "deliveries_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/319833951/deliveries", "last_response": { "code": null, "status": "unused", diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/repos_hub4j-test-org_github-api_hooks_276991249-5.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/repos_hub4j-test-org_github-api_hooks-9.json similarity index 62% rename from src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/repos_hub4j-test-org_github-api_hooks_276991249-5.json rename to src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/repos_hub4j-test-org_github-api_hooks-9.json index 718c25c39a..fac0e166e9 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/repos_hub4j-test-org_github-api_hooks_276991249-5.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/repos_hub4j-test-org_github-api_hooks-9.json @@ -1,6 +1,6 @@ { "type": "Repository", - "id": 276991249, + "id": 319833953, "name": "web", "active": true, "events": [ @@ -11,11 +11,12 @@ "insecure_ssl": "0", "content_type": "form" }, - "updated_at": "2021-01-22T21:07:49Z", - "created_at": "2021-01-22T21:07:49Z", - "url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/276991249", - "test_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/276991249/test", - "ping_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/276991249/pings", + "updated_at": "2021-09-24T05:58:38Z", + "created_at": "2021-09-24T05:58:38Z", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/319833953", + "test_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/319833953/test", + "ping_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/319833953/pings", + "deliveries_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/319833953/deliveries", "last_response": { "code": null, "status": "unused", diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/repos_hub4j-test-org_github-api_hooks_319833951-5.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/repos_hub4j-test-org_github-api_hooks_319833951-5.json new file mode 100644 index 0000000000..38a4ffd295 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/repos_hub4j-test-org_github-api_hooks_319833951-5.json @@ -0,0 +1,25 @@ +{ + "type": "Repository", + "id": 319833951, + "name": "web", + "active": true, + "events": [ + "push" + ], + "config": { + "url": "http://www.google.com/", + "insecure_ssl": "0", + "content_type": "form" + }, + "updated_at": "2021-09-24T05:58:37Z", + "created_at": "2021-09-24T05:58:37Z", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/319833951", + "test_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/319833951/test", + "ping_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/319833951/pings", + "deliveries_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/319833951/deliveries", + "last_response": { + "code": 413, + "status": null, + "message": "Invalid HTTP Response: 413" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/user-1.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/user-1.json index 80823e137a..e57ae5c795 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/user-1.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/__files/user-1.json @@ -25,14 +25,14 @@ "hireable": null, "bio": null, "twitter_username": "bitwiseman", - "public_repos": 201, - "public_gists": 7, - "followers": 176, - "following": 11, + "public_repos": 212, + "public_gists": 8, + "followers": 199, + "following": 12, "created_at": "2012-07-11T20:38:33Z", - "updated_at": "2021-01-22T16:38:42Z", + "updated_at": "2021-09-24T03:32:31Z", "private_gists": 19, - "total_private_repos": 17, + "total_private_repos": 22, "owned_private_repos": 0, "disk_usage": 33700, "collaborators": 0, diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org-2.json index b84c3bc81e..84db184ce0 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org-2.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org-2.json @@ -1,5 +1,5 @@ { - "id": "13bed34b-5e75-4888-b6e0-2737b4bd95a8", + "id": "ad3c362d-6521-4067-a860-8191664935be", "name": "orgs_hub4j-test-org", "request": { "url": "/orgs/hub4j-test-org", @@ -14,35 +14,34 @@ "status": 200, "bodyFileName": "orgs_hub4j-test-org-2.json", "headers": { - "Date": "Fri, 22 Jan 2021 21:07:48 GMT", - "Content-Type": "application/json; charset=utf-8", "Server": "GitHub.com", - "Status": "200 OK", + "Date": "Fri, 24 Sep 2021 05:58: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", - "Accept-Encoding" + "Accept-Encoding, Accept, X-Requested-With" ], - "ETag": "W/\"c062f331dfbc4af616476fa3cc4b0e5bbb2ed899c9511d5844ce4bd5274c4c5a\"", - "last-modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "ETag": "W/\"e9f639cd8af8a2d7ebcaecf51127929bbd54efb425c02083f50c16b565bd5f60\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", "X-GitHub-Media-Type": "unknown, github.v3", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4874", - "X-RateLimit-Reset": "1611350375", - "x-ratelimit-used": "126", + "X-RateLimit-Remaining": "4838", + "X-RateLimit-Reset": "1632465781", + "X-RateLimit-Used": "162", + "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", + "X-XSS-Protection": "0", "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "C912:2DA2:50C30D:5DB8E6:600B3EA4" + "X-GitHub-Request-Id": "DBC0:837E:1AA1E0A:1BF6C9B:614D690D" } }, - "uuid": "13bed34b-5e75-4888-b6e0-2737b4bd95a8", + "uuid": "ad3c362d-6521-4067-a860-8191664935be", "persistent": true, "insertionIndex": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks-11.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks-11.json new file mode 100644 index 0000000000..4d8678563d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks-11.json @@ -0,0 +1,57 @@ +{ + "id": "67e03f91-e9bb-4826-bd20-1ae74a98cf18", + "name": "orgs_hub4j-test-org_hooks", + "request": { + "url": "/orgs/hub4j-test-org/hooks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"name\":\"web\",\"active\":true,\"config\":{\"url\":\"http://www.google.com/\"}}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "orgs_hub4j-test-org_hooks-11.json", + "headers": { + "Server": "GitHub.com", + "Date": "Fri, 24 Sep 2021 05:58:39 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": "\"1b803f825d25ef0d21fbc97b07778148c9c864f6f2ef72afb9b701cd34e66b1c\"", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "admin:org_hook", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4829", + "X-RateLimit-Reset": "1632465781", + "X-RateLimit-Used": "171", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "DBD2:7E9B:1739765:186B261:614D690F", + "Location": "https://api.github.com/orgs/hub4j-test-org/hooks/319833954" + } + }, + "uuid": "67e03f91-e9bb-4826-bd20-1ae74a98cf18", + "persistent": true, + "scenarioName": "scenario-3-orgs-hub4j-test-org-hooks", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-3-orgs-hub4j-test-org-hooks-2", + "insertionIndex": 11 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks-8.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks-16.json similarity index 65% rename from src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks-8.json rename to src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks-16.json index c1b9b33e3f..60812bd9e5 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks-8.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks-16.json @@ -1,5 +1,5 @@ { - "id": "67d396af-7085-48aa-961c-2c7cd3977744", + "id": "684608d7-77a7-4a67-942e-17a211f405c9", "name": "orgs_hub4j-test-org_hooks", "request": { "url": "/orgs/hub4j-test-org/hooks", @@ -19,37 +19,38 @@ }, "response": { "status": 201, - "bodyFileName": "orgs_hub4j-test-org_hooks-8.json", + "bodyFileName": "orgs_hub4j-test-org_hooks-16.json", "headers": { - "Date": "Fri, 22 Jan 2021 21:07:50 GMT", - "Content-Type": "application/json; charset=utf-8", "Server": "GitHub.com", - "Status": "201 Created", + "Date": "Fri, 24 Sep 2021 05:58: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", - "Accept-Encoding" + "Accept-Encoding, Accept, X-Requested-With" ], - "ETag": "\"ed33789e95d8d9fc5f7c43f007c195db28911a05c717bab6c08607b2e1827510\"", + "ETag": "\"9994b0b99b97094891bcbf6e9cb3000a85264226343e50aeba17f928a61e0d34\"", "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "admin:org_hook", - "Location": "https://api.github.com/orgs/hub4j-test-org/hooks/276991250", "X-GitHub-Media-Type": "unknown, github.v3", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4868", - "X-RateLimit-Reset": "1611350375", - "x-ratelimit-used": "132", + "X-RateLimit-Remaining": "4824", + "X-RateLimit-Reset": "1632465781", + "X-RateLimit-Used": "176", + "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", + "X-XSS-Protection": "0", "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "C912:2DA2:50C373:5DB98D:600B3EA6" + "X-GitHub-Request-Id": "DBDC:7B63:CB934:200B45:614D6910", + "Location": "https://api.github.com/orgs/hub4j-test-org/hooks/319833957" } }, - "uuid": "67d396af-7085-48aa-961c-2c7cd3977744", + "uuid": "684608d7-77a7-4a67-942e-17a211f405c9", "persistent": true, - "insertionIndex": 8 + "scenarioName": "scenario-3-orgs-hub4j-test-org-hooks", + "requiredScenarioState": "scenario-3-orgs-hub4j-test-org-hooks-2", + "insertionIndex": 16 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_276991250-9.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_319833954-12.json similarity index 52% rename from src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_276991250-9.json rename to src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_319833954-12.json index 317db11470..e88fa63b62 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_276991250-9.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_319833954-12.json @@ -1,8 +1,8 @@ { - "id": "1a48207c-8673-4136-867d-b13961044ffb", - "name": "orgs_hub4j-test-org_hooks_276991250", + "id": "bbd8deb6-4710-4ff1-86e4-58d4ef107510", + "name": "orgs_hub4j-test-org_hooks_319833954", "request": { - "url": "/orgs/hub4j-test-org/hooks/276991250", + "url": "/orgs/hub4j-test-org/hooks/319833954", "method": "GET", "headers": { "Accept": { @@ -12,37 +12,39 @@ }, "response": { "status": 200, - "bodyFileName": "orgs_hub4j-test-org_hooks_276991250-9.json", + "bodyFileName": "orgs_hub4j-test-org_hooks_319833954-12.json", "headers": { - "Date": "Fri, 22 Jan 2021 21:07:50 GMT", - "Content-Type": "application/json; charset=utf-8", "Server": "GitHub.com", - "Status": "200 OK", + "Date": "Fri, 24 Sep 2021 05:58:39 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", - "Accept-Encoding" + "Accept-Encoding, Accept, X-Requested-With" ], - "ETag": "W/\"ed33789e95d8d9fc5f7c43f007c195db28911a05c717bab6c08607b2e1827510\"", - "last-modified": "Fri, 22 Jan 2021 21:07:50 GMT", + "ETag": "W/\"1b803f825d25ef0d21fbc97b07778148c9c864f6f2ef72afb9b701cd34e66b1c\"", + "Last-Modified": "Fri, 24 Sep 2021 05:58:39 GMT", "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "admin:org_hook", "X-GitHub-Media-Type": "unknown, github.v3", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4867", - "X-RateLimit-Reset": "1611350375", - "x-ratelimit-used": "133", + "X-RateLimit-Remaining": "4828", + "X-RateLimit-Reset": "1632465781", + "X-RateLimit-Used": "172", + "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", + "X-XSS-Protection": "0", "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "C912:2DA2:50C381:5DB9A1:600B3EA6" + "X-GitHub-Request-Id": "DBD4:2F29:184F82D:1982119:614D690F" } }, - "uuid": "1a48207c-8673-4136-867d-b13961044ffb", + "uuid": "bbd8deb6-4710-4ff1-86e4-58d4ef107510", "persistent": true, - "insertionIndex": 9 + "scenarioName": "scenario-4-orgs-hub4j-test-org-hooks-319833954", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-4-orgs-hub4j-test-org-hooks-319833954-2", + "insertionIndex": 12 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_276991250-11.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_319833954-14.json similarity index 58% rename from src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_276991250-11.json rename to src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_319833954-14.json index 9301c0bff3..5de2d3e62a 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_276991250-11.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_319833954-14.json @@ -1,8 +1,8 @@ { - "id": "770bb8ef-5639-4c65-bd95-966dcebbeaab", - "name": "orgs_hub4j-test-org_hooks_276991250", + "id": "625aa52d-abfe-494d-b9fd-1384ba625a90", + "name": "orgs_hub4j-test-org_hooks_319833954", "request": { - "url": "/orgs/hub4j-test-org/hooks/276991250", + "url": "/orgs/hub4j-test-org/hooks/319833954", "method": "DELETE", "headers": { "Accept": { @@ -13,30 +13,27 @@ "response": { "status": 204, "headers": { - "Date": "Fri, 22 Jan 2021 21:07:50 GMT", "Server": "GitHub.com", - "Status": "204 No Content", + "Date": "Fri, 24 Sep 2021 05:58:39 GMT", "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "admin:org_hook", "X-GitHub-Media-Type": "unknown, github.v3", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4865", - "X-RateLimit-Reset": "1611350375", - "x-ratelimit-used": "135", + "X-RateLimit-Remaining": "4826", + "X-RateLimit-Reset": "1632465781", + "X-RateLimit-Used": "174", + "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", + "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", - "Accept-Encoding" - ], - "X-GitHub-Request-Id": "C912:2DA2:50C39F:5DB9C4:600B3EA6" + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "X-GitHub-Request-Id": "DBD8:7E9B:1739795:186B290:614D690F" } }, - "uuid": "770bb8ef-5639-4c65-bd95-966dcebbeaab", + "uuid": "625aa52d-abfe-494d-b9fd-1384ba625a90", "persistent": true, - "insertionIndex": 11 + "insertionIndex": 14 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_319833954-15.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_319833954-15.json new file mode 100644 index 0000000000..1ac78f851e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_319833954-15.json @@ -0,0 +1,43 @@ +{ + "id": "da24cd13-8ec1-4393-9391-d0c070733fc2", + "name": "orgs_hub4j-test-org_hooks_319833954", + "request": { + "url": "/orgs/hub4j-test-org/hooks/319833954", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 404, + "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/rest/reference/orgs#get-an-organization-webhook\"}", + "headers": { + "Server": "GitHub.com", + "Date": "Fri, 24 Sep 2021 05:58:40 GMT", + "Content-Type": "application/json; charset=utf-8", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "admin:org_hook", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4825", + "X-RateLimit-Reset": "1632465781", + "X-RateLimit-Used": "175", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "X-GitHub-Request-Id": "DBDA:5827:AFE3B9:C5D3D4:614D690F" + } + }, + "uuid": "da24cd13-8ec1-4393-9391-d0c070733fc2", + "persistent": true, + "scenarioName": "scenario-4-orgs-hub4j-test-org-hooks-319833954", + "requiredScenarioState": "scenario-4-orgs-hub4j-test-org-hooks-319833954-2", + "insertionIndex": 15 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_276991250_pings-10.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_319833954_pings-13.json similarity index 61% rename from src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_276991250_pings-10.json rename to src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_319833954_pings-13.json index 36b30a3b57..903cc8f77e 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_276991250_pings-10.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_319833954_pings-13.json @@ -1,8 +1,8 @@ { - "id": "fc6ef30e-ad13-4e15-b0d6-8982a1434a8c", - "name": "orgs_hub4j-test-org_hooks_276991250_pings", + "id": "8f68dbbe-f256-4030-9349-1ce9f0d449ed", + "name": "orgs_hub4j-test-org_hooks_319833954_pings", "request": { - "url": "/orgs/hub4j-test-org/hooks/276991250/pings", + "url": "/orgs/hub4j-test-org/hooks/319833954/pings", "method": "POST", "headers": { "Accept": { @@ -20,30 +20,27 @@ "response": { "status": 204, "headers": { - "Date": "Fri, 22 Jan 2021 21:07:50 GMT", "Server": "GitHub.com", - "Status": "204 No Content", + "Date": "Fri, 24 Sep 2021 05:58:39 GMT", "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "admin:org_hook", "X-GitHub-Media-Type": "unknown, github.v3", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4866", - "X-RateLimit-Reset": "1611350375", - "x-ratelimit-used": "134", + "X-RateLimit-Remaining": "4827", + "X-RateLimit-Reset": "1632465781", + "X-RateLimit-Used": "173", + "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", + "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", - "Accept-Encoding" - ], - "X-GitHub-Request-Id": "C912:2DA2:50C38E:5DB9B0:600B3EA6" + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "X-GitHub-Request-Id": "DBD6:2F22:24356C:319259:614D690F" } }, - "uuid": "fc6ef30e-ad13-4e15-b0d6-8982a1434a8c", + "uuid": "8f68dbbe-f256-4030-9349-1ce9f0d449ed", "persistent": true, - "insertionIndex": 10 + "insertionIndex": 13 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_319833957-17.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_319833957-17.json new file mode 100644 index 0000000000..a1872215b7 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/orgs_hub4j-test-org_hooks_319833957-17.json @@ -0,0 +1,39 @@ +{ + "id": "1d1ef579-8c76-49ac-b72f-40de1f7d368a", + "name": "orgs_hub4j-test-org_hooks_319833957", + "request": { + "url": "/orgs/hub4j-test-org/hooks/319833957", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 204, + "headers": { + "Server": "GitHub.com", + "Date": "Fri, 24 Sep 2021 05:58:40 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "admin:org_hook", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4823", + "X-RateLimit-Reset": "1632465781", + "X-RateLimit-Used": "177", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "X-GitHub-Request-Id": "DBDE:8AA1:13C21BF:14F6189:614D6910" + } + }, + "uuid": "1d1ef579-8c76-49ac-b72f-40de1f7d368a", + "persistent": true, + "insertionIndex": 17 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api-3.json index 33c61ed9df..28988d03b7 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api-3.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api-3.json @@ -1,5 +1,5 @@ { - "id": "2b7a8c8b-d0b5-4b1a-9f8f-0f38608ab9f3", + "id": "29fce8e9-b25c-4eba-86bc-7ef50d25bc75", "name": "repos_hub4j-test-org_github-api", "request": { "url": "/repos/hub4j-test-org/github-api", @@ -14,35 +14,34 @@ "status": 200, "bodyFileName": "repos_hub4j-test-org_github-api-3.json", "headers": { - "Date": "Fri, 22 Jan 2021 21:07:49 GMT", - "Content-Type": "application/json; charset=utf-8", "Server": "GitHub.com", - "Status": "200 OK", + "Date": "Fri, 24 Sep 2021 05:58: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", - "Accept-Encoding" + "Accept-Encoding, Accept, X-Requested-With" ], - "ETag": "W/\"5612eac7a8d5d2412c2f6c674ff110afdb0165b9481e956574154e0db0856a78\"", - "last-modified": "Fri, 22 Jan 2021 03:50:37 GMT", + "ETag": "W/\"d40feb7406c7f1bff6da6f0e6ac361c918802f7368fad85d379f3931420e7a4b\"", + "Last-Modified": "Mon, 19 Apr 2021 20:09:00 GMT", "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "repo", "X-GitHub-Media-Type": "unknown, github.v3", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4873", - "X-RateLimit-Reset": "1611350375", - "x-ratelimit-used": "127", + "X-RateLimit-Remaining": "4837", + "X-RateLimit-Reset": "1632465781", + "X-RateLimit-Used": "163", + "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", + "X-XSS-Protection": "0", "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "C912:2DA2:50C327:5DB922:600B3EA4" + "X-GitHub-Request-Id": "DBC2:79FE:239C293:2564C6F:614D690D" } }, - "uuid": "2b7a8c8b-d0b5-4b1a-9f8f-0f38608ab9f3", + "uuid": "29fce8e9-b25c-4eba-86bc-7ef50d25bc75", "persistent": true, "insertionIndex": 3 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks-4.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks-4.json index 05edfd8cf8..017bd24758 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks-4.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks-4.json @@ -1,5 +1,5 @@ { - "id": "54ab9de3-4cb2-4525-ad28-dec5aedbdcdf", + "id": "ba79fa38-68d7-427e-b20a-64206ec4d2c4", "name": "repos_hub4j-test-org_github-api_hooks", "request": { "url": "/repos/hub4j-test-org/github-api/hooks", @@ -21,35 +21,37 @@ "status": 201, "bodyFileName": "repos_hub4j-test-org_github-api_hooks-4.json", "headers": { - "Date": "Fri, 22 Jan 2021 21:07:49 GMT", - "Content-Type": "application/json; charset=utf-8", "Server": "GitHub.com", - "Status": "201 Created", + "Date": "Fri, 24 Sep 2021 05:58: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", - "Accept-Encoding" + "Accept-Encoding, Accept, X-Requested-With" ], - "ETag": "\"81991c3ac30899df3e88e2ab8fcea88a8f609e04cc75a880d9b1e97417791f44\"", + "ETag": "\"87c44382c829d2a3fa66b3d5caf29c3b4aa70b3f18429132a924b04a8afb195f\"", "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "admin:repo_hook, public_repo, repo, write:repo_hook", - "Location": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/276991249", "X-GitHub-Media-Type": "unknown, github.v3", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4872", - "X-RateLimit-Reset": "1611350375", - "x-ratelimit-used": "128", + "X-RateLimit-Remaining": "4836", + "X-RateLimit-Reset": "1632465781", + "X-RateLimit-Used": "164", + "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", + "X-XSS-Protection": "0", "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "C912:2DA2:50C336:5DB938:600B3EA5" + "X-GitHub-Request-Id": "DBC4:1AC2:A63CDF:AEAE21:614D690D", + "Location": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/319833951" } }, - "uuid": "54ab9de3-4cb2-4525-ad28-dec5aedbdcdf", + "uuid": "ba79fa38-68d7-427e-b20a-64206ec4d2c4", "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-github-api-hooks", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-hub4j-test-org-github-api-hooks-2", "insertionIndex": 4 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks-9.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks-9.json new file mode 100644 index 0000000000..a5ce929ee0 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks-9.json @@ -0,0 +1,56 @@ +{ + "id": "87bd0937-fc07-4227-936b-141c323f0d47", + "name": "repos_hub4j-test-org_github-api_hooks", + "request": { + "url": "/repos/hub4j-test-org/github-api/hooks", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"name\":\"web\",\"active\":true,\"config\":{\"url\":\"http://www.google.com/\"}}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_github-api_hooks-9.json", + "headers": { + "Server": "GitHub.com", + "Date": "Fri, 24 Sep 2021 05:58: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": "\"b99428ae5c5e25396c19adf6af42d864018c15a6e6a1c44707c3221eddba24dd\"", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "admin:repo_hook, public_repo, repo, write:repo_hook", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4831", + "X-RateLimit-Reset": "1632465781", + "X-RateLimit-Used": "169", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "DBCE:60BC:116C514:12E52DD:614D690E", + "Location": "https://api.github.com/repos/hub4j-test-org/github-api/hooks/319833953" + } + }, + "uuid": "87bd0937-fc07-4227-936b-141c323f0d47", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-github-api-hooks", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-github-api-hooks-2", + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_276991249-5.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_319833951-5.json similarity index 53% rename from src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_276991249-5.json rename to src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_319833951-5.json index 5bfb2c5fda..1ec2dcf9a5 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_276991249-5.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_319833951-5.json @@ -1,8 +1,8 @@ { - "id": "c377d4ea-9f2e-4924-b95e-a61e2c296727", - "name": "repos_hub4j-test-org_github-api_hooks_276991249", + "id": "d14b8fc5-25cc-4be9-8dae-3abb9a7c5a1d", + "name": "repos_hub4j-test-org_github-api_hooks_319833951", "request": { - "url": "/repos/hub4j-test-org/github-api/hooks/276991249", + "url": "/repos/hub4j-test-org/github-api/hooks/319833951", "method": "GET", "headers": { "Accept": { @@ -12,37 +12,39 @@ }, "response": { "status": 200, - "bodyFileName": "repos_hub4j-test-org_github-api_hooks_276991249-5.json", + "bodyFileName": "repos_hub4j-test-org_github-api_hooks_319833951-5.json", "headers": { - "Date": "Fri, 22 Jan 2021 21:07:49 GMT", - "Content-Type": "application/json; charset=utf-8", "Server": "GitHub.com", - "Status": "200 OK", + "Date": "Fri, 24 Sep 2021 05:58: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", - "Accept-Encoding" + "Accept-Encoding, Accept, X-Requested-With" ], - "ETag": "W/\"81991c3ac30899df3e88e2ab8fcea88a8f609e04cc75a880d9b1e97417791f44\"", - "last-modified": "Fri, 22 Jan 2021 21:07:49 GMT", + "ETag": "W/\"e14f3cb1b041c35bb16d849b285d4fa64e53d6b7d9e4956a103c2694ac51da2c\"", + "Last-Modified": "Fri, 24 Sep 2021 05:58:37 GMT", "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "admin:repo_hook, public_repo, read:repo_hook, repo, write:repo_hook", "X-GitHub-Media-Type": "unknown, github.v3", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4871", - "X-RateLimit-Reset": "1611350375", - "x-ratelimit-used": "129", + "X-RateLimit-Remaining": "4835", + "X-RateLimit-Reset": "1632465781", + "X-RateLimit-Used": "165", + "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", + "X-XSS-Protection": "0", "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "C912:2DA2:50C34A:5DB956:600B3EA5" + "X-GitHub-Request-Id": "DBC6:2ACD:2423FD6:25F0977:614D690E" } }, - "uuid": "c377d4ea-9f2e-4924-b95e-a61e2c296727", + "uuid": "d14b8fc5-25cc-4be9-8dae-3abb9a7c5a1d", "persistent": true, + "scenarioName": "scenario-2-repos-hub4j-test-org-github-api-hooks-319833951", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-2-repos-hub4j-test-org-github-api-hooks-319833951-2", "insertionIndex": 5 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_276991249-7.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_319833951-7.json similarity index 59% rename from src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_276991249-7.json rename to src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_319833951-7.json index 25859bea17..acc291ab65 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_276991249-7.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_319833951-7.json @@ -1,8 +1,8 @@ { - "id": "7a205084-741e-4d90-a5a2-15529a479b87", - "name": "repos_hub4j-test-org_github-api_hooks_276991249", + "id": "7aa1bce6-5339-489c-b8aa-c882d400840a", + "name": "repos_hub4j-test-org_github-api_hooks_319833951", "request": { - "url": "/repos/hub4j-test-org/github-api/hooks/276991249", + "url": "/repos/hub4j-test-org/github-api/hooks/319833951", "method": "DELETE", "headers": { "Accept": { @@ -13,30 +13,27 @@ "response": { "status": 204, "headers": { - "Date": "Fri, 22 Jan 2021 21:07:50 GMT", "Server": "GitHub.com", - "Status": "204 No Content", + "Date": "Fri, 24 Sep 2021 05:58:38 GMT", "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "admin:repo_hook, public_repo, repo", "X-GitHub-Media-Type": "unknown, github.v3", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4869", - "X-RateLimit-Reset": "1611350375", - "x-ratelimit-used": "131", + "X-RateLimit-Remaining": "4833", + "X-RateLimit-Reset": "1632465781", + "X-RateLimit-Used": "167", + "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", + "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", - "Accept-Encoding" - ], - "X-GitHub-Request-Id": "C912:2DA2:50C36C:5DB982:600B3EA6" + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "X-GitHub-Request-Id": "DBCA:837E:1AA1E9C:1BF6D35:614D690E" } }, - "uuid": "7a205084-741e-4d90-a5a2-15529a479b87", + "uuid": "7aa1bce6-5339-489c-b8aa-c882d400840a", "persistent": true, "insertionIndex": 7 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_319833951-8.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_319833951-8.json new file mode 100644 index 0000000000..92534c1f63 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_319833951-8.json @@ -0,0 +1,43 @@ +{ + "id": "39ea0601-7d5c-43c1-b931-55625460eedc", + "name": "repos_hub4j-test-org_github-api_hooks_319833951", + "request": { + "url": "/repos/hub4j-test-org/github-api/hooks/319833951", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 404, + "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/rest/reference/repos#get-a-repository-webhook\"}", + "headers": { + "Server": "GitHub.com", + "Date": "Fri, 24 Sep 2021 05:58:38 GMT", + "Content-Type": "application/json; charset=utf-8", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "admin:repo_hook, public_repo, read:repo_hook, repo, write:repo_hook", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4832", + "X-RateLimit-Reset": "1632465781", + "X-RateLimit-Used": "168", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "X-GitHub-Request-Id": "DBCC:5826:67F165:7CA449:614D690E" + } + }, + "uuid": "39ea0601-7d5c-43c1-b931-55625460eedc", + "persistent": true, + "scenarioName": "scenario-2-repos-hub4j-test-org-github-api-hooks-319833951", + "requiredScenarioState": "scenario-2-repos-hub4j-test-org-github-api-hooks-319833951-2", + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_276991249_pings-6.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_319833951_pings-6.json similarity index 63% rename from src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_276991249_pings-6.json rename to src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_319833951_pings-6.json index 59918ebffc..6946377e1d 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_276991249_pings-6.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_319833951_pings-6.json @@ -1,8 +1,8 @@ { - "id": "5975003f-b63e-4402-be6e-04a3dbe40c18", - "name": "repos_hub4j-test-org_github-api_hooks_276991249_pings", + "id": "16c2c1af-4493-42e7-b945-98a6bb1b50cd", + "name": "repos_hub4j-test-org_github-api_hooks_319833951_pings", "request": { - "url": "/repos/hub4j-test-org/github-api/hooks/276991249/pings", + "url": "/repos/hub4j-test-org/github-api/hooks/319833951/pings", "method": "POST", "headers": { "Accept": { @@ -20,30 +20,27 @@ "response": { "status": 204, "headers": { - "Date": "Fri, 22 Jan 2021 21:07:50 GMT", "Server": "GitHub.com", - "Status": "204 No Content", + "Date": "Fri, 24 Sep 2021 05:58:38 GMT", "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "admin:repo_hook, public_repo, read:repo_hook, repo, write:repo_hook", "X-GitHub-Media-Type": "unknown, github.v3", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4870", - "X-RateLimit-Reset": "1611350375", - "x-ratelimit-used": "130", + "X-RateLimit-Remaining": "4834", + "X-RateLimit-Reset": "1632465781", + "X-RateLimit-Used": "166", + "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", + "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", - "Accept-Encoding" - ], - "X-GitHub-Request-Id": "C912:2DA2:50C35C:5DB96F:600B3EA5" + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "X-GitHub-Request-Id": "DBC8:8AA1:13C212D:14F60E5:614D690E" } }, - "uuid": "5975003f-b63e-4402-be6e-04a3dbe40c18", + "uuid": "16c2c1af-4493-42e7-b945-98a6bb1b50cd", "persistent": true, "insertionIndex": 6 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_319833953-10.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_319833953-10.json new file mode 100644 index 0000000000..68d88850b0 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/repos_hub4j-test-org_github-api_hooks_319833953-10.json @@ -0,0 +1,39 @@ +{ + "id": "a54264fc-c31c-49a4-8cd5-d85aa851a12d", + "name": "repos_hub4j-test-org_github-api_hooks_319833953", + "request": { + "url": "/repos/hub4j-test-org/github-api/hooks/319833953", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 204, + "headers": { + "Server": "GitHub.com", + "Date": "Fri, 24 Sep 2021 05:58:39 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "admin:repo_hook, public_repo, repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4830", + "X-RateLimit-Reset": "1632465781", + "X-RateLimit-Used": "170", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "X-GitHub-Request-Id": "DBD0:5821:73E76:1A87A9:614D690F" + } + }, + "uuid": "a54264fc-c31c-49a4-8cd5-d85aa851a12d", + "persistent": true, + "insertionIndex": 10 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/user-1.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/user-1.json index 38e06f7bf4..bee312dbcf 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/user-1.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/tryHook/mappings/user-1.json @@ -1,5 +1,5 @@ { - "id": "f906bc36-ccf2-4d2d-a0be-8e1dca4bf311", + "id": "59d5c01d-8fa0-4697-8be3-d5fc8cbf4ec4", "name": "user", "request": { "url": "/user", @@ -14,35 +14,34 @@ "status": 200, "bodyFileName": "user-1.json", "headers": { - "Date": "Fri, 22 Jan 2021 21:07:48 GMT", - "Content-Type": "application/json; charset=utf-8", "Server": "GitHub.com", - "Status": "200 OK", + "Date": "Fri, 24 Sep 2021 05:58: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", - "Accept-Encoding" + "Accept-Encoding, Accept, X-Requested-With" ], - "ETag": "W/\"c8b61de8f7b00ef1a040d10e88b51dd065defb82f7d94a95a97b3dbab636edbe\"", - "last-modified": "Fri, 22 Jan 2021 16:38:42 GMT", + "ETag": "W/\"9aca5cb0fdcf9e59545aeee3a02258679ec32d3f3d86fac233b7d06ee9b5b125\"", + "Last-Modified": "Fri, 24 Sep 2021 03:32:31 GMT", "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", "X-Accepted-OAuth-Scopes": "", "X-GitHub-Media-Type": "unknown, github.v3", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4876", - "X-RateLimit-Reset": "1611350375", - "x-ratelimit-used": "124", + "X-RateLimit-Remaining": "4840", + "X-RateLimit-Reset": "1632465781", + "X-RateLimit-Used": "160", + "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", + "X-XSS-Protection": "0", "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "C912:2DA2:50C2E6:5DB8DC:600B3EA4" + "X-GitHub-Request-Id": "DBBC:15AF:54989:698D1:614D690C" } }, - "uuid": "f906bc36-ccf2-4d2d-a0be-8e1dca4bf311", + "uuid": "59d5c01d-8fa0-4697-8be3-d5fc8cbf4ec4", "persistent": true, "insertionIndex": 1 } \ No newline at end of file