From 565ede9ae1d0dc144db3785b4f07d6210eb504d0 Mon Sep 17 00:00:00 2001 From: Max Xandeco Date: Thu, 30 Sep 2021 13:24:57 +0100 Subject: [PATCH 1/2] expose the create dispatch event on the repository object. --- .../java/org/kohsuke/github/GHRepository.java | 21 ++++ .../org/kohsuke/github/GHRepositoryTest.java | 16 +++ ...reatedispatcheventwithclientpayload-2.json | 110 ++++++++++++++++++ .../__files/user-1.json | 46 ++++++++ ...reatedispatcheventwithclientpayload-2.json | 47 ++++++++ ...cheventwithclientpayload_dispatches-3.json | 46 ++++++++ .../mappings/user-1.json | 47 ++++++++ ...tedispatcheventwithoutclientpayload-2.json | 110 ++++++++++++++++++ .../__files/user-1.json | 46 ++++++++ ...tedispatcheventwithoutclientpayload-2.json | 47 ++++++++ ...ventwithoutclientpayload_dispatches-3.json | 46 ++++++++ .../mappings/user-1.json | 47 ++++++++ 12 files changed, 629 insertions(+) create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/__files/repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/__files/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithclientpayload_dispatches-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/__files/repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/__files/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithoutclientpayload_dispatches-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/user-1.json diff --git a/src/main/java/org/kohsuke/github/GHRepository.java b/src/main/java/org/kohsuke/github/GHRepository.java index f704da3e4f..7a2e274240 100644 --- a/src/main/java/org/kohsuke/github/GHRepository.java +++ b/src/main/java/org/kohsuke/github/GHRepository.java @@ -57,6 +57,7 @@ import java.util.WeakHashMap; import javax.annotation.Nonnull; +import javax.annotation.Nullable; import static java.util.Arrays.asList; import static java.util.Objects.requireNonNull; @@ -3205,6 +3206,26 @@ public T readTar(InputStreamFunction streamFunction, String ref) throws I return downloadArchive("tar", ref, streamFunction); } + /** + * Create a repository dispatch event, which can be used to start a workflow/action from outside github, as + * described on https://docs.github.com/en/rest/reference/repos#create-a-repository-dispatch-event + * + * @param eventType + * the eventType + * @param clientPayload + * a custom payload , can be nullable + * @throws IOException + * the io exception + */ + public void dispatch(String eventType, @Nullable T clientPayload) throws IOException { + root().createRequest() + .method("POST") + .withUrlPath(getApiTailUrl("dispatches")) + .with("event_type", eventType) + .with("client_payload", clientPayload) + .send(); + } + private T downloadArchive(@Nonnull String type, @CheckForNull String ref, @Nonnull InputStreamFunction streamFunction) throws IOException { diff --git a/src/test/java/org/kohsuke/github/GHRepositoryTest.java b/src/test/java/org/kohsuke/github/GHRepositoryTest.java index c631138a9c..784692fde7 100644 --- a/src/test/java/org/kohsuke/github/GHRepositoryTest.java +++ b/src/test/java/org/kohsuke/github/GHRepositoryTest.java @@ -13,6 +13,7 @@ import java.net.URL; import java.util.ArrayList; import java.util.Date; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; @@ -987,4 +988,19 @@ public void getCommitsBetweenPaged() throws Exception { assertThat(mockGitHub.getRequestCount(), equalTo(startingCount + 4)); } + @Test + public void createDispatchEventWithoutClientPayload() throws Exception { + GHRepository repository = getTempRepository(); + repository.dispatch("test", null); + } + + @Test + public void createDispatchEventWithClientPayload() throws Exception { + GHRepository repository = getTempRepository(); + Map clientPayload = new HashMap<>(); + clientPayload.put("name", "joe.doe"); + clientPayload.put("list", new ArrayList<>()); + repository.dispatch("test", clientPayload); + } + } diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/__files/repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/__files/repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json new file mode 100644 index 0000000000..f32f4e1fa3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/__files/repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json @@ -0,0 +1,110 @@ +{ + "id": 412051311, + "node_id": "R_kgDOGI9nbw", + "name": "temp-createDispatchEventWithClientPayload", + "full_name": "mxandeco/temp-createDispatchEventWithClientPayload", + "private": false, + "owner": { + "login": "mxandeco", + "id": 42962662, + "node_id": "MDQ6VXNlcjQyOTYyNjYy", + "avatar_url": "https://avatars.githubusercontent.com/u/42962662?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/mxandeco", + "html_url": "https://github.com/mxandeco", + "followers_url": "https://api.github.com/users/mxandeco/followers", + "following_url": "https://api.github.com/users/mxandeco/following{/other_user}", + "gists_url": "https://api.github.com/users/mxandeco/gists{/gist_id}", + "starred_url": "https://api.github.com/users/mxandeco/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/mxandeco/subscriptions", + "organizations_url": "https://api.github.com/users/mxandeco/orgs", + "repos_url": "https://api.github.com/users/mxandeco/repos", + "events_url": "https://api.github.com/users/mxandeco/events{/privacy}", + "received_events_url": "https://api.github.com/users/mxandeco/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/mxandeco/temp-createDispatchEventWithClientPayload", + "description": "A test repository for testing the github-api project: temp-createDispatchEventWithClientPayload", + "fork": false, + "url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload", + "forks_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/forks", + "keys_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/teams", + "hooks_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/hooks", + "issue_events_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/issues/events{/number}", + "events_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/events", + "assignees_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/assignees{/user}", + "branches_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/branches{/branch}", + "tags_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/tags", + "blobs_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/statuses/{sha}", + "languages_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/languages", + "stargazers_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/stargazers", + "contributors_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/contributors", + "subscribers_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/subscribers", + "subscription_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/subscription", + "commits_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/contents/{+path}", + "compare_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/merges", + "archive_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/downloads", + "issues_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/issues{/number}", + "pulls_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/pulls{/number}", + "milestones_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/milestones{/number}", + "notifications_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/labels{/name}", + "releases_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/releases{/id}", + "deployments_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/deployments", + "created_at": "2021-09-30T12:14:39Z", + "updated_at": "2021-09-30T12:14:43Z", + "pushed_at": "2021-09-30T12:14:40Z", + "git_url": "git://github.com/mxandeco/temp-createDispatchEventWithClientPayload.git", + "ssh_url": "git@github.com:mxandeco/temp-createDispatchEventWithClientPayload.git", + "clone_url": "https://github.com/mxandeco/temp-createDispatchEventWithClientPayload.git", + "svn_url": "https://github.com/mxandeco/temp-createDispatchEventWithClientPayload", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "network_count": 0, + "subscribers_count": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/__files/user-1.json new file mode 100644 index 0000000000..fbe227661c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/__files/user-1.json @@ -0,0 +1,46 @@ +{ + "login": "mxandeco", + "id": 42962662, + "node_id": "MDQ6VXNlcjQyOTYyNjYy", + "avatar_url": "https://avatars.githubusercontent.com/u/42962662?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/mxandeco", + "html_url": "https://github.com/mxandeco", + "followers_url": "https://api.github.com/users/mxandeco/followers", + "following_url": "https://api.github.com/users/mxandeco/following{/other_user}", + "gists_url": "https://api.github.com/users/mxandeco/gists{/gist_id}", + "starred_url": "https://api.github.com/users/mxandeco/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/mxandeco/subscriptions", + "organizations_url": "https://api.github.com/users/mxandeco/orgs", + "repos_url": "https://api.github.com/users/mxandeco/repos", + "events_url": "https://api.github.com/users/mxandeco/events{/privacy}", + "received_events_url": "https://api.github.com/users/mxandeco/received_events", + "type": "User", + "site_admin": false, + "name": "Max Xandeco", + "company": null, + "blog": "", + "location": null, + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "public_repos": 18, + "public_gists": 1, + "followers": 0, + "following": 0, + "created_at": "2018-09-04T09:13:09Z", + "updated_at": "2021-09-06T20:36:46Z", + "private_gists": 0, + "total_private_repos": 8, + "owned_private_repos": 4, + "disk_usage": 90, + "collaborators": 1, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json new file mode 100644 index 0000000000..44eab3dd50 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json @@ -0,0 +1,47 @@ +{ + "id": "099a2894-de70-4f2f-851c-2e73eeaa43f4", + "name": "repos_mxandeco_temp-createdispatcheventwithclientpayload", + "request": { + "url": "/repos/mxandeco/temp-createDispatchEventWithClientPayload", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 30 Sep 2021 12:14:44 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"681e0337d5f666142555f54becda289531621efc1d6785b60d2c55fe6ddaa826\"", + "Last-Modified": "Thu, 30 Sep 2021 12:14:43 GMT", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, repo, user, workflow, write:discussion, write:packages", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4979", + "X-RateLimit-Reset": "1633006817", + "X-RateLimit-Used": "21", + "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": "DB11:9388:2880A8:29ED9E:6155AA33" + } + }, + "uuid": "099a2894-de70-4f2f-851c-2e73eeaa43f4", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithclientpayload_dispatches-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithclientpayload_dispatches-3.json new file mode 100644 index 0000000000..4279cb4cb0 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithclientpayload_dispatches-3.json @@ -0,0 +1,46 @@ +{ + "id": "bec01dd6-87de-4b13-ae20-e3ff67224dc1", + "name": "repos_mxandeco_temp-createdispatcheventwithclientpayload_dispatches", + "request": { + "url": "/repos/mxandeco/temp-createDispatchEventWithClientPayload/dispatches", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"event_type\":\"test\",\"client_payload\":{\"name\":\"joe.doe\",\"list\":[]}}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 204, + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 30 Sep 2021 12:14:44 GMT", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, repo, user, workflow, write:discussion, write:packages", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4978", + "X-RateLimit-Reset": "1633006817", + "X-RateLimit-Used": "22", + "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": "DB12:E725:29EDE6:2B6567:6155AA34" + } + }, + "uuid": "bec01dd6-87de-4b13-ae20-e3ff67224dc1", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/user-1.json new file mode 100644 index 0000000000..080a5efde3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/user-1.json @@ -0,0 +1,47 @@ +{ + "id": "1ae7fd45-10c4-4844-884e-3d0e70c94d26", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-1.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 30 Sep 2021 12:14: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": "W/\"b8f235ad3cd7cc5e96a09241a22fa6048c7877f43ada37c29eb075107f7f3b1a\"", + "Last-Modified": "Mon, 06 Sep 2021 20:36:46 GMT", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, repo, user, workflow, write:discussion, write:packages", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4983", + "X-RateLimit-Reset": "1633006817", + "X-RateLimit-Used": "17", + "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": "DB0E:119BD:70F7AE:73078B:6155AA2E" + } + }, + "uuid": "1ae7fd45-10c4-4844-884e-3d0e70c94d26", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/__files/repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/__files/repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json new file mode 100644 index 0000000000..4053776a56 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/__files/repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json @@ -0,0 +1,110 @@ +{ + "id": 412053471, + "node_id": "R_kgDOGI9v3w", + "name": "temp-createDispatchEventWithoutClientPayload", + "full_name": "mxandeco/temp-createDispatchEventWithoutClientPayload", + "private": false, + "owner": { + "login": "mxandeco", + "id": 42962662, + "node_id": "MDQ6VXNlcjQyOTYyNjYy", + "avatar_url": "https://avatars.githubusercontent.com/u/42962662?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/mxandeco", + "html_url": "https://github.com/mxandeco", + "followers_url": "https://api.github.com/users/mxandeco/followers", + "following_url": "https://api.github.com/users/mxandeco/following{/other_user}", + "gists_url": "https://api.github.com/users/mxandeco/gists{/gist_id}", + "starred_url": "https://api.github.com/users/mxandeco/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/mxandeco/subscriptions", + "organizations_url": "https://api.github.com/users/mxandeco/orgs", + "repos_url": "https://api.github.com/users/mxandeco/repos", + "events_url": "https://api.github.com/users/mxandeco/events{/privacy}", + "received_events_url": "https://api.github.com/users/mxandeco/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/mxandeco/temp-createDispatchEventWithoutClientPayload", + "description": "A test repository for testing the github-api project: temp-createDispatchEventWithoutClientPayload", + "fork": false, + "url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload", + "forks_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/forks", + "keys_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/teams", + "hooks_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/hooks", + "issue_events_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/issues/events{/number}", + "events_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/events", + "assignees_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/assignees{/user}", + "branches_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/branches{/branch}", + "tags_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/tags", + "blobs_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/statuses/{sha}", + "languages_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/languages", + "stargazers_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/stargazers", + "contributors_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/contributors", + "subscribers_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/subscribers", + "subscription_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/subscription", + "commits_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/contents/{+path}", + "compare_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/merges", + "archive_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/downloads", + "issues_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/issues{/number}", + "pulls_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/pulls{/number}", + "milestones_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/milestones{/number}", + "notifications_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/labels{/name}", + "releases_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/releases{/id}", + "deployments_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/deployments", + "created_at": "2021-09-30T12:21:30Z", + "updated_at": "2021-09-30T12:21:34Z", + "pushed_at": "2021-09-30T12:21:31Z", + "git_url": "git://github.com/mxandeco/temp-createDispatchEventWithoutClientPayload.git", + "ssh_url": "git@github.com:mxandeco/temp-createDispatchEventWithoutClientPayload.git", + "clone_url": "https://github.com/mxandeco/temp-createDispatchEventWithoutClientPayload.git", + "svn_url": "https://github.com/mxandeco/temp-createDispatchEventWithoutClientPayload", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "network_count": 0, + "subscribers_count": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/__files/user-1.json new file mode 100644 index 0000000000..fbe227661c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/__files/user-1.json @@ -0,0 +1,46 @@ +{ + "login": "mxandeco", + "id": 42962662, + "node_id": "MDQ6VXNlcjQyOTYyNjYy", + "avatar_url": "https://avatars.githubusercontent.com/u/42962662?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/mxandeco", + "html_url": "https://github.com/mxandeco", + "followers_url": "https://api.github.com/users/mxandeco/followers", + "following_url": "https://api.github.com/users/mxandeco/following{/other_user}", + "gists_url": "https://api.github.com/users/mxandeco/gists{/gist_id}", + "starred_url": "https://api.github.com/users/mxandeco/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/mxandeco/subscriptions", + "organizations_url": "https://api.github.com/users/mxandeco/orgs", + "repos_url": "https://api.github.com/users/mxandeco/repos", + "events_url": "https://api.github.com/users/mxandeco/events{/privacy}", + "received_events_url": "https://api.github.com/users/mxandeco/received_events", + "type": "User", + "site_admin": false, + "name": "Max Xandeco", + "company": null, + "blog": "", + "location": null, + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "public_repos": 18, + "public_gists": 1, + "followers": 0, + "following": 0, + "created_at": "2018-09-04T09:13:09Z", + "updated_at": "2021-09-06T20:36:46Z", + "private_gists": 0, + "total_private_repos": 8, + "owned_private_repos": 4, + "disk_usage": 90, + "collaborators": 1, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json new file mode 100644 index 0000000000..b4b6364d70 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json @@ -0,0 +1,47 @@ +{ + "id": "39b33308-f643-4eb5-81f1-04c66c25cdcb", + "name": "repos_mxandeco_temp-createdispatcheventwithoutclientpayload", + "request": { + "url": "/repos/mxandeco/temp-createDispatchEventWithoutClientPayload", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 30 Sep 2021 12:21: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/\"09565d34c348d8cb5ffe0809ef94d44002021c9ba67e5d818f7991f786ab6ed8\"", + "Last-Modified": "Thu, 30 Sep 2021 12:21:34 GMT", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, repo, user, workflow, write:discussion, write:packages", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4966", + "X-RateLimit-Reset": "1633006817", + "X-RateLimit-Used": "34", + "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": "DB44:FDF7:46B010:4873E0:6155ABCF" + } + }, + "uuid": "39b33308-f643-4eb5-81f1-04c66c25cdcb", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithoutclientpayload_dispatches-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithoutclientpayload_dispatches-3.json new file mode 100644 index 0000000000..b0e481f952 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithoutclientpayload_dispatches-3.json @@ -0,0 +1,46 @@ +{ + "id": "67092c3e-b094-44b1-8f9a-81c5945c041b", + "name": "repos_mxandeco_temp-createdispatcheventwithoutclientpayload_dispatches", + "request": { + "url": "/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/dispatches", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"event_type\":\"test\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 204, + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 30 Sep 2021 12:21:35 GMT", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, repo, user, workflow, write:discussion, write:packages", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4965", + "X-RateLimit-Reset": "1633006817", + "X-RateLimit-Used": "35", + "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": "DB45:8E55:27B6AF:292CE3:6155ABCF" + } + }, + "uuid": "67092c3e-b094-44b1-8f9a-81c5945c041b", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/user-1.json new file mode 100644 index 0000000000..bac9d1c4e5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/user-1.json @@ -0,0 +1,47 @@ +{ + "id": "08502bcb-c673-4916-9bdf-ad91cb7e5ba4", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-1.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 30 Sep 2021 12:21: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/\"b8f235ad3cd7cc5e96a09241a22fa6048c7877f43ada37c29eb075107f7f3b1a\"", + "Last-Modified": "Mon, 06 Sep 2021 20:36:46 GMT", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, repo, user, workflow, write:discussion, write:packages", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4970", + "X-RateLimit-Reset": "1633006817", + "X-RateLimit-Used": "30", + "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": "DB42:81E6:76FA34:791BF6:6155ABC9" + } + }, + "uuid": "08502bcb-c673-4916-9bdf-ad91cb7e5ba4", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file From e22194028f03d0c28c15ac24d84990237b70abe2 Mon Sep 17 00:00:00 2001 From: Max Xandeco Date: Thu, 30 Sep 2021 13:35:46 +0100 Subject: [PATCH 2/2] fix tests. --- ...reatedispatcheventwithclientpayload-2.json | 130 ++++++++++++++++++ ...reatedispatcheventwithclientpayload-2.json | 110 --------------- ...eatedispatcheventwithclientpayload-2.json} | 22 +-- ...heventwithclientpayload_dispatches-3.json} | 16 +-- .../mappings/user-1.json | 12 +- ...tedispatcheventwithoutclientpayload-2.json | 130 ++++++++++++++++++ ...tedispatcheventwithoutclientpayload-2.json | 110 --------------- ...edispatcheventwithoutclientpayload-2.json} | 22 +-- ...entwithoutclientpayload_dispatches-3.json} | 16 +-- .../mappings/user-1.json | 12 +- 10 files changed, 310 insertions(+), 270 deletions(-) create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/__files/repos_hub4j-test-org_temp-createdispatcheventwithclientpayload-2.json delete mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/__files/repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json rename src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/{createDispatchEventWithoutClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json => createDispatchEventWithClientPayload/mappings/repos_hub4j-test-org_temp-createdispatcheventwithclientpayload-2.json} (66%) rename src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/{repos_mxandeco_temp-createdispatcheventwithclientpayload_dispatches-3.json => repos_hub4j-test-org_temp-createdispatcheventwithclientpayload_dispatches-3.json} (74%) create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/__files/repos_hub4j-test-org_temp-createdispatcheventwithoutclientpayload-2.json delete mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/__files/repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json rename src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/{createDispatchEventWithClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json => createDispatchEventWithoutClientPayload/mappings/repos_hub4j-test-org_temp-createdispatcheventwithoutclientpayload-2.json} (65%) rename src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/{repos_mxandeco_temp-createdispatcheventwithoutclientpayload_dispatches-3.json => repos_hub4j-test-org_temp-createdispatcheventwithoutclientpayload_dispatches-3.json} (73%) diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/__files/repos_hub4j-test-org_temp-createdispatcheventwithclientpayload-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/__files/repos_hub4j-test-org_temp-createdispatcheventwithclientpayload-2.json new file mode 100644 index 0000000000..71fe34fc8d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/__files/repos_hub4j-test-org_temp-createdispatcheventwithclientpayload-2.json @@ -0,0 +1,130 @@ +{ + "id": 412057727, + "node_id": "R_kgDOGI-Afw", + "name": "temp-createDispatchEventWithClientPayload", + "full_name": "hub4j-test-org/temp-createDispatchEventWithClientPayload", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-createDispatchEventWithClientPayload", + "description": "A test repository for testing the github-api project: temp-createDispatchEventWithClientPayload", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/deployments", + "created_at": "2021-09-30T12:34:44Z", + "updated_at": "2021-09-30T12:34:44Z", + "pushed_at": "2021-09-30T12:34:45Z", + "git_url": "git://github.com/hub4j-test-org/temp-createDispatchEventWithClientPayload.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-createDispatchEventWithClientPayload.git", + "clone_url": "https://github.com/hub4j-test-org/temp-createDispatchEventWithClientPayload.git", + "svn_url": "https://github.com/hub4j-test-org/temp-createDispatchEventWithClientPayload", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 15 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/__files/repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/__files/repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json deleted file mode 100644 index f32f4e1fa3..0000000000 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/__files/repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "id": 412051311, - "node_id": "R_kgDOGI9nbw", - "name": "temp-createDispatchEventWithClientPayload", - "full_name": "mxandeco/temp-createDispatchEventWithClientPayload", - "private": false, - "owner": { - "login": "mxandeco", - "id": 42962662, - "node_id": "MDQ6VXNlcjQyOTYyNjYy", - "avatar_url": "https://avatars.githubusercontent.com/u/42962662?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/mxandeco", - "html_url": "https://github.com/mxandeco", - "followers_url": "https://api.github.com/users/mxandeco/followers", - "following_url": "https://api.github.com/users/mxandeco/following{/other_user}", - "gists_url": "https://api.github.com/users/mxandeco/gists{/gist_id}", - "starred_url": "https://api.github.com/users/mxandeco/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/mxandeco/subscriptions", - "organizations_url": "https://api.github.com/users/mxandeco/orgs", - "repos_url": "https://api.github.com/users/mxandeco/repos", - "events_url": "https://api.github.com/users/mxandeco/events{/privacy}", - "received_events_url": "https://api.github.com/users/mxandeco/received_events", - "type": "User", - "site_admin": false - }, - "html_url": "https://github.com/mxandeco/temp-createDispatchEventWithClientPayload", - "description": "A test repository for testing the github-api project: temp-createDispatchEventWithClientPayload", - "fork": false, - "url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload", - "forks_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/forks", - "keys_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/teams", - "hooks_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/hooks", - "issue_events_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/issues/events{/number}", - "events_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/events", - "assignees_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/assignees{/user}", - "branches_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/branches{/branch}", - "tags_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/tags", - "blobs_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/statuses/{sha}", - "languages_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/languages", - "stargazers_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/stargazers", - "contributors_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/contributors", - "subscribers_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/subscribers", - "subscription_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/subscription", - "commits_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/contents/{+path}", - "compare_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/merges", - "archive_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/downloads", - "issues_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/issues{/number}", - "pulls_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/pulls{/number}", - "milestones_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/milestones{/number}", - "notifications_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/labels{/name}", - "releases_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/releases{/id}", - "deployments_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithClientPayload/deployments", - "created_at": "2021-09-30T12:14:39Z", - "updated_at": "2021-09-30T12:14:43Z", - "pushed_at": "2021-09-30T12:14:40Z", - "git_url": "git://github.com/mxandeco/temp-createDispatchEventWithClientPayload.git", - "ssh_url": "git@github.com:mxandeco/temp-createDispatchEventWithClientPayload.git", - "clone_url": "https://github.com/mxandeco/temp-createDispatchEventWithClientPayload.git", - "svn_url": "https://github.com/mxandeco/temp-createDispatchEventWithClientPayload", - "homepage": "http://github-api.kohsuke.org/", - "size": 0, - "stargazers_count": 0, - "watchers_count": 0, - "language": null, - "has_issues": true, - "has_projects": true, - "has_downloads": true, - "has_wiki": true, - "has_pages": false, - "forks_count": 0, - "mirror_url": null, - "archived": false, - "disabled": false, - "open_issues_count": 0, - "license": null, - "allow_forking": true, - "forks": 0, - "open_issues": 0, - "watchers": 0, - "default_branch": "main", - "permissions": { - "admin": true, - "maintain": true, - "push": true, - "triage": true, - "pull": true - }, - "temp_clone_token": "", - "allow_squash_merge": true, - "allow_merge_commit": true, - "allow_rebase_merge": true, - "allow_auto_merge": false, - "delete_branch_on_merge": false, - "network_count": 0, - "subscribers_count": 1 -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_hub4j-test-org_temp-createdispatcheventwithclientpayload-2.json similarity index 66% rename from src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json rename to src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_hub4j-test-org_temp-createdispatcheventwithclientpayload-2.json index b4b6364d70..b4e557fd83 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_hub4j-test-org_temp-createdispatcheventwithclientpayload-2.json @@ -1,8 +1,8 @@ { - "id": "39b33308-f643-4eb5-81f1-04c66c25cdcb", - "name": "repos_mxandeco_temp-createdispatcheventwithoutclientpayload", + "id": "2539d5de-f96e-431e-b31b-a537e52e0ef5", + "name": "repos_hub4j-test-org_temp-createdispatcheventwithclientpayload", "request": { - "url": "/repos/mxandeco/temp-createDispatchEventWithoutClientPayload", + "url": "/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload", "method": "GET", "headers": { "Accept": { @@ -12,25 +12,25 @@ }, "response": { "status": 200, - "bodyFileName": "repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json", + "bodyFileName": "repos_hub4j-test-org_temp-createdispatcheventwithclientpayload-2.json", "headers": { "Server": "GitHub.com", - "Date": "Thu, 30 Sep 2021 12:21:35 GMT", + "Date": "Thu, 30 Sep 2021 12:34:49 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ "Accept, Authorization, Cookie, X-GitHub-OTP", "Accept-Encoding, Accept, X-Requested-With" ], - "ETag": "W/\"09565d34c348d8cb5ffe0809ef94d44002021c9ba67e5d818f7991f786ab6ed8\"", - "Last-Modified": "Thu, 30 Sep 2021 12:21:34 GMT", + "ETag": "W/\"5ab7e1e833c6acac05ab9315823a4f6b6a662de9d5f2539189c24ce631404077\"", + "Last-Modified": "Thu, 30 Sep 2021 12:34:44 GMT", "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, repo, user, workflow, write:discussion, write:packages", "X-Accepted-OAuth-Scopes": "repo", "X-GitHub-Media-Type": "unknown, github.v3", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4966", + "X-RateLimit-Remaining": "4940", "X-RateLimit-Reset": "1633006817", - "X-RateLimit-Used": "34", + "X-RateLimit-Used": "60", "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", @@ -38,10 +38,10 @@ "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": "DB44:FDF7:46B010:4873E0:6155ABCF" + "X-GitHub-Request-Id": "DEB6:4B95:4C9D23:4E7593:6155AEE8" } }, - "uuid": "39b33308-f643-4eb5-81f1-04c66c25cdcb", + "uuid": "2539d5de-f96e-431e-b31b-a537e52e0ef5", "persistent": true, "insertionIndex": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithclientpayload_dispatches-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_hub4j-test-org_temp-createdispatcheventwithclientpayload_dispatches-3.json similarity index 74% rename from src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithclientpayload_dispatches-3.json rename to src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_hub4j-test-org_temp-createdispatcheventwithclientpayload_dispatches-3.json index 4279cb4cb0..46ced53190 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithclientpayload_dispatches-3.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_hub4j-test-org_temp-createdispatcheventwithclientpayload_dispatches-3.json @@ -1,8 +1,8 @@ { - "id": "bec01dd6-87de-4b13-ae20-e3ff67224dc1", - "name": "repos_mxandeco_temp-createdispatcheventwithclientpayload_dispatches", + "id": "bd959614-1104-415e-b9a1-8ac9533d82f7", + "name": "repos_hub4j-test-org_temp-createdispatcheventwithclientpayload_dispatches", "request": { - "url": "/repos/mxandeco/temp-createDispatchEventWithClientPayload/dispatches", + "url": "/repos/hub4j-test-org/temp-createDispatchEventWithClientPayload/dispatches", "method": "POST", "headers": { "Accept": { @@ -21,14 +21,14 @@ "status": 204, "headers": { "Server": "GitHub.com", - "Date": "Thu, 30 Sep 2021 12:14:44 GMT", + "Date": "Thu, 30 Sep 2021 12:34:49 GMT", "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, repo, user, workflow, write:discussion, write:packages", "X-Accepted-OAuth-Scopes": "", "X-GitHub-Media-Type": "unknown, github.v3", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4978", + "X-RateLimit-Remaining": "4939", "X-RateLimit-Reset": "1633006817", - "X-RateLimit-Used": "22", + "X-RateLimit-Used": "61", "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", @@ -37,10 +37,10 @@ "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": "DB12:E725:29EDE6:2B6567:6155AA34" + "X-GitHub-Request-Id": "DEB7:0B4B:3073ED:320304:6155AEE9" } }, - "uuid": "bec01dd6-87de-4b13-ae20-e3ff67224dc1", + "uuid": "bd959614-1104-415e-b9a1-8ac9533d82f7", "persistent": true, "insertionIndex": 3 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/user-1.json index 080a5efde3..d0eaa41d04 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/user-1.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/user-1.json @@ -1,5 +1,5 @@ { - "id": "1ae7fd45-10c4-4844-884e-3d0e70c94d26", + "id": "43c6892b-f0dc-45a7-97b9-f81a8e3f244e", "name": "user", "request": { "url": "/user", @@ -15,7 +15,7 @@ "bodyFileName": "user-1.json", "headers": { "Server": "GitHub.com", - "Date": "Thu, 30 Sep 2021 12:14:38 GMT", + "Date": "Thu, 30 Sep 2021 12:34:43 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ @@ -28,9 +28,9 @@ "X-Accepted-OAuth-Scopes": "", "X-GitHub-Media-Type": "unknown, github.v3", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4983", + "X-RateLimit-Remaining": "4945", "X-RateLimit-Reset": "1633006817", - "X-RateLimit-Used": "17", + "X-RateLimit-Used": "55", "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", @@ -38,10 +38,10 @@ "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": "DB0E:119BD:70F7AE:73078B:6155AA2E" + "X-GitHub-Request-Id": "DEB3:FDF5:134720:14986B:6155AEE2" } }, - "uuid": "1ae7fd45-10c4-4844-884e-3d0e70c94d26", + "uuid": "43c6892b-f0dc-45a7-97b9-f81a8e3f244e", "persistent": true, "insertionIndex": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/__files/repos_hub4j-test-org_temp-createdispatcheventwithoutclientpayload-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/__files/repos_hub4j-test-org_temp-createdispatcheventwithoutclientpayload-2.json new file mode 100644 index 0000000000..5afb0cc7c0 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/__files/repos_hub4j-test-org_temp-createdispatcheventwithoutclientpayload-2.json @@ -0,0 +1,130 @@ +{ + "id": 412057090, + "node_id": "R_kgDOGI9-Ag", + "name": "temp-createDispatchEventWithoutClientPayload", + "full_name": "hub4j-test-org/temp-createDispatchEventWithoutClientPayload", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/temp-createDispatchEventWithoutClientPayload", + "description": "A test repository for testing the github-api project: temp-createDispatchEventWithoutClientPayload", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload", + "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/deployments", + "created_at": "2021-09-30T12:32:43Z", + "updated_at": "2021-09-30T12:32:46Z", + "pushed_at": "2021-09-30T12:32:44Z", + "git_url": "git://github.com/hub4j-test-org/temp-createDispatchEventWithoutClientPayload.git", + "ssh_url": "git@github.com:hub4j-test-org/temp-createDispatchEventWithoutClientPayload.git", + "clone_url": "https://github.com/hub4j-test-org/temp-createDispatchEventWithoutClientPayload.git", + "svn_url": "https://github.com/hub4j-test-org/temp-createDispatchEventWithoutClientPayload", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 15 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/__files/repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/__files/repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json deleted file mode 100644 index 4053776a56..0000000000 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/__files/repos_mxandeco_temp-createdispatcheventwithoutclientpayload-2.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "id": 412053471, - "node_id": "R_kgDOGI9v3w", - "name": "temp-createDispatchEventWithoutClientPayload", - "full_name": "mxandeco/temp-createDispatchEventWithoutClientPayload", - "private": false, - "owner": { - "login": "mxandeco", - "id": 42962662, - "node_id": "MDQ6VXNlcjQyOTYyNjYy", - "avatar_url": "https://avatars.githubusercontent.com/u/42962662?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/mxandeco", - "html_url": "https://github.com/mxandeco", - "followers_url": "https://api.github.com/users/mxandeco/followers", - "following_url": "https://api.github.com/users/mxandeco/following{/other_user}", - "gists_url": "https://api.github.com/users/mxandeco/gists{/gist_id}", - "starred_url": "https://api.github.com/users/mxandeco/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/mxandeco/subscriptions", - "organizations_url": "https://api.github.com/users/mxandeco/orgs", - "repos_url": "https://api.github.com/users/mxandeco/repos", - "events_url": "https://api.github.com/users/mxandeco/events{/privacy}", - "received_events_url": "https://api.github.com/users/mxandeco/received_events", - "type": "User", - "site_admin": false - }, - "html_url": "https://github.com/mxandeco/temp-createDispatchEventWithoutClientPayload", - "description": "A test repository for testing the github-api project: temp-createDispatchEventWithoutClientPayload", - "fork": false, - "url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload", - "forks_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/forks", - "keys_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/teams", - "hooks_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/hooks", - "issue_events_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/issues/events{/number}", - "events_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/events", - "assignees_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/assignees{/user}", - "branches_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/branches{/branch}", - "tags_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/tags", - "blobs_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/statuses/{sha}", - "languages_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/languages", - "stargazers_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/stargazers", - "contributors_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/contributors", - "subscribers_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/subscribers", - "subscription_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/subscription", - "commits_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/contents/{+path}", - "compare_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/merges", - "archive_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/downloads", - "issues_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/issues{/number}", - "pulls_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/pulls{/number}", - "milestones_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/milestones{/number}", - "notifications_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/labels{/name}", - "releases_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/releases{/id}", - "deployments_url": "https://api.github.com/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/deployments", - "created_at": "2021-09-30T12:21:30Z", - "updated_at": "2021-09-30T12:21:34Z", - "pushed_at": "2021-09-30T12:21:31Z", - "git_url": "git://github.com/mxandeco/temp-createDispatchEventWithoutClientPayload.git", - "ssh_url": "git@github.com:mxandeco/temp-createDispatchEventWithoutClientPayload.git", - "clone_url": "https://github.com/mxandeco/temp-createDispatchEventWithoutClientPayload.git", - "svn_url": "https://github.com/mxandeco/temp-createDispatchEventWithoutClientPayload", - "homepage": "http://github-api.kohsuke.org/", - "size": 0, - "stargazers_count": 0, - "watchers_count": 0, - "language": null, - "has_issues": true, - "has_projects": true, - "has_downloads": true, - "has_wiki": true, - "has_pages": false, - "forks_count": 0, - "mirror_url": null, - "archived": false, - "disabled": false, - "open_issues_count": 0, - "license": null, - "allow_forking": true, - "forks": 0, - "open_issues": 0, - "watchers": 0, - "default_branch": "main", - "permissions": { - "admin": true, - "maintain": true, - "push": true, - "triage": true, - "pull": true - }, - "temp_clone_token": "", - "allow_squash_merge": true, - "allow_merge_commit": true, - "allow_rebase_merge": true, - "allow_auto_merge": false, - "delete_branch_on_merge": false, - "network_count": 0, - "subscribers_count": 1 -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_hub4j-test-org_temp-createdispatcheventwithoutclientpayload-2.json similarity index 65% rename from src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json rename to src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_hub4j-test-org_temp-createdispatcheventwithoutclientpayload-2.json index 44eab3dd50..45a81545ac 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_hub4j-test-org_temp-createdispatcheventwithoutclientpayload-2.json @@ -1,8 +1,8 @@ { - "id": "099a2894-de70-4f2f-851c-2e73eeaa43f4", - "name": "repos_mxandeco_temp-createdispatcheventwithclientpayload", + "id": "13b8f471-59d2-4782-be63-5632278bd85d", + "name": "repos_hub4j-test-org_temp-createdispatcheventwithoutclientpayload", "request": { - "url": "/repos/mxandeco/temp-createDispatchEventWithClientPayload", + "url": "/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload", "method": "GET", "headers": { "Accept": { @@ -12,25 +12,25 @@ }, "response": { "status": 200, - "bodyFileName": "repos_mxandeco_temp-createdispatcheventwithclientpayload-2.json", + "bodyFileName": "repos_hub4j-test-org_temp-createdispatcheventwithoutclientpayload-2.json", "headers": { "Server": "GitHub.com", - "Date": "Thu, 30 Sep 2021 12:14:44 GMT", + "Date": "Thu, 30 Sep 2021 12:32: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/\"681e0337d5f666142555f54becda289531621efc1d6785b60d2c55fe6ddaa826\"", - "Last-Modified": "Thu, 30 Sep 2021 12:14:43 GMT", + "ETag": "W/\"a741209a82e66560508e72d5fc0153a44e22a6e8d21eef9a6c51da00f825256c\"", + "Last-Modified": "Thu, 30 Sep 2021 12:32:46 GMT", "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, repo, user, workflow, write:discussion, write:packages", "X-Accepted-OAuth-Scopes": "repo", "X-GitHub-Media-Type": "unknown, github.v3", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4979", + "X-RateLimit-Remaining": "4949", "X-RateLimit-Reset": "1633006817", - "X-RateLimit-Used": "21", + "X-RateLimit-Used": "51", "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", @@ -38,10 +38,10 @@ "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": "DB11:9388:2880A8:29ED9E:6155AA33" + "X-GitHub-Request-Id": "DE9E:8483:4E8801:505B9D:6155AE6F" } }, - "uuid": "099a2894-de70-4f2f-851c-2e73eeaa43f4", + "uuid": "13b8f471-59d2-4782-be63-5632278bd85d", "persistent": true, "insertionIndex": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithoutclientpayload_dispatches-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_hub4j-test-org_temp-createdispatcheventwithoutclientpayload_dispatches-3.json similarity index 73% rename from src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithoutclientpayload_dispatches-3.json rename to src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_hub4j-test-org_temp-createdispatcheventwithoutclientpayload_dispatches-3.json index b0e481f952..190cea31ae 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_mxandeco_temp-createdispatcheventwithoutclientpayload_dispatches-3.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/repos_hub4j-test-org_temp-createdispatcheventwithoutclientpayload_dispatches-3.json @@ -1,8 +1,8 @@ { - "id": "67092c3e-b094-44b1-8f9a-81c5945c041b", - "name": "repos_mxandeco_temp-createdispatcheventwithoutclientpayload_dispatches", + "id": "0c00012f-4497-4dbc-b724-46997464a81c", + "name": "repos_hub4j-test-org_temp-createdispatcheventwithoutclientpayload_dispatches", "request": { - "url": "/repos/mxandeco/temp-createDispatchEventWithoutClientPayload/dispatches", + "url": "/repos/hub4j-test-org/temp-createDispatchEventWithoutClientPayload/dispatches", "method": "POST", "headers": { "Accept": { @@ -21,14 +21,14 @@ "status": 204, "headers": { "Server": "GitHub.com", - "Date": "Thu, 30 Sep 2021 12:21:35 GMT", + "Date": "Thu, 30 Sep 2021 12:32:48 GMT", "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, repo, user, workflow, write:discussion, write:packages", "X-Accepted-OAuth-Scopes": "", "X-GitHub-Media-Type": "unknown, github.v3", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4965", + "X-RateLimit-Remaining": "4948", "X-RateLimit-Reset": "1633006817", - "X-RateLimit-Used": "35", + "X-RateLimit-Used": "52", "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", @@ -37,10 +37,10 @@ "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": "DB45:8E55:27B6AF:292CE3:6155ABCF" + "X-GitHub-Request-Id": "DE9F:0B4C:50D143:52A9B6:6155AE70" } }, - "uuid": "67092c3e-b094-44b1-8f9a-81c5945c041b", + "uuid": "0c00012f-4497-4dbc-b724-46997464a81c", "persistent": true, "insertionIndex": 3 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/user-1.json index bac9d1c4e5..a3945c4c21 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/user-1.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createDispatchEventWithoutClientPayload/mappings/user-1.json @@ -1,5 +1,5 @@ { - "id": "08502bcb-c673-4916-9bdf-ad91cb7e5ba4", + "id": "3598700f-5fac-493c-96b5-2fe30a73a912", "name": "user", "request": { "url": "/user", @@ -15,7 +15,7 @@ "bodyFileName": "user-1.json", "headers": { "Server": "GitHub.com", - "Date": "Thu, 30 Sep 2021 12:21:29 GMT", + "Date": "Thu, 30 Sep 2021 12:32:42 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ @@ -28,9 +28,9 @@ "X-Accepted-OAuth-Scopes": "", "X-GitHub-Media-Type": "unknown, github.v3", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4970", + "X-RateLimit-Remaining": "4954", "X-RateLimit-Reset": "1633006817", - "X-RateLimit-Used": "30", + "X-RateLimit-Used": "46", "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", @@ -38,10 +38,10 @@ "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": "DB42:81E6:76FA34:791BF6:6155ABC9" + "X-GitHub-Request-Id": "DE9A:D43A:275403:28D284:6155AE69" } }, - "uuid": "08502bcb-c673-4916-9bdf-ad91cb7e5ba4", + "uuid": "3598700f-5fac-493c-96b5-2fe30a73a912", "persistent": true, "insertionIndex": 1 } \ No newline at end of file