From 37a2018fe31117d492f713272e475a5c194776a7 Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Fri, 20 Dec 2019 19:47:00 -0800 Subject: [PATCH] Do not MIME encode Base64 content for sending Fixes #638 --- .../org/kohsuke/github/GHBlobBuilder.java | 2 +- .../java/org/kohsuke/github/GHContent.java | 2 +- .../org/kohsuke/github/GHContentBuilder.java | 2 +- .../github/GHContentIntegrationTest.java | 32 ++ ...-558c17cf-aa4d-452c-8791-7b2f196ef7e1.json | 313 ++++++++++++++++++ ...-7082490a-244f-4873-bdd9-de2dc4f78d54.json | 125 +++++++ ...-fb14970e-1231-44e3-9e36-9856335a1408.json | 52 +++ ...-e335a3e3-5206-41d0-ae3f-e73676b9cf83.json | 45 +++ ...org_ghcontentintegrationtest-2-558c17.json | 48 +++ ...i-test-org_temp-testmimelong-3-708249.json | 48 +++ ...imelong_contents_mime-longmd-4-fb1497.json | 54 +++ .../testMIMELong/mappings/user-1-e335a3.json | 48 +++ ...-9942833c-45f6-4900-b491-bc457756e658.json | 313 ++++++++++++++++++ ...-9160729e-acb8-4d03-95b8-dc0482236f2a.json | 125 +++++++ ...-1ff06594-1fa5-4715-8e13-036b87b43556.json | 52 +++ ...-1a0b1b14-7198-4fde-a559-64c0556a1aec.json | 45 +++ ...org_ghcontentintegrationtest-2-994283.json | 48 +++ ...test-org_temp-testmimelonger-3-916072.json | 48 +++ ...elonger_contents_mime-longmd-4-1ff065.json | 54 +++ .../mappings/user-1-1a0b1b.json | 48 +++ ...-f60bd9fd-10cc-4488-b2ce-b618cac83ae2.json | 313 ++++++++++++++++++ ...-41e8e5a0-d704-4832-87b2-8a5a89cce1a2.json | 125 +++++++ ...-931cbb72-6e12-4509-bfa6-612dbfaadac0.json | 52 +++ ...-b9d02cd3-311a-4d49-8de8-aa4220400616.json | 45 +++ ...org_ghcontentintegrationtest-2-f60bd9.json | 48 +++ ...-test-org_temp-testmimesmall-3-41e8e5.json | 48 +++ ...esmall_contents_mime-smallmd-4-931cbb.json | 54 +++ .../testMIMESmall/mappings/user-1-b9d02c.json | 48 +++ 28 files changed, 2234 insertions(+), 3 deletions(-) create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/__files/repos_github-api-test-org_ghcontentintegrationtest-558c17cf-aa4d-452c-8791-7b2f196ef7e1.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/__files/repos_github-api-test-org_temp-testmimelong-7082490a-244f-4873-bdd9-de2dc4f78d54.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/__files/repos_github-api-test-org_temp-testmimelong_contents_mime-longmd-fb14970e-1231-44e3-9e36-9856335a1408.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/__files/user-e335a3e3-5206-41d0-ae3f-e73676b9cf83.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/mappings/repos_github-api-test-org_ghcontentintegrationtest-2-558c17.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/mappings/repos_github-api-test-org_temp-testmimelong-3-708249.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/mappings/repos_github-api-test-org_temp-testmimelong_contents_mime-longmd-4-fb1497.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/mappings/user-1-e335a3.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/__files/repos_github-api-test-org_ghcontentintegrationtest-9942833c-45f6-4900-b491-bc457756e658.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/__files/repos_github-api-test-org_temp-testmimelonger-9160729e-acb8-4d03-95b8-dc0482236f2a.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/__files/repos_github-api-test-org_temp-testmimelonger_contents_mime-longmd-1ff06594-1fa5-4715-8e13-036b87b43556.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/__files/user-1a0b1b14-7198-4fde-a559-64c0556a1aec.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/mappings/repos_github-api-test-org_ghcontentintegrationtest-2-994283.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/mappings/repos_github-api-test-org_temp-testmimelonger-3-916072.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/mappings/repos_github-api-test-org_temp-testmimelonger_contents_mime-longmd-4-1ff065.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/mappings/user-1-1a0b1b.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/__files/repos_github-api-test-org_ghcontentintegrationtest-f60bd9fd-10cc-4488-b2ce-b618cac83ae2.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/__files/repos_github-api-test-org_temp-testmimesmall-41e8e5a0-d704-4832-87b2-8a5a89cce1a2.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/__files/repos_github-api-test-org_temp-testmimesmall_contents_mime-smallmd-931cbb72-6e12-4509-bfa6-612dbfaadac0.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/__files/user-b9d02cd3-311a-4d49-8de8-aa4220400616.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/mappings/repos_github-api-test-org_ghcontentintegrationtest-2-f60bd9.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/mappings/repos_github-api-test-org_temp-testmimesmall-3-41e8e5.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/mappings/repos_github-api-test-org_temp-testmimesmall_contents_mime-smallmd-4-931cbb.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/mappings/user-1-b9d02c.json diff --git a/src/main/java/org/kohsuke/github/GHBlobBuilder.java b/src/main/java/org/kohsuke/github/GHBlobBuilder.java index d94abe735..5876524af 100644 --- a/src/main/java/org/kohsuke/github/GHBlobBuilder.java +++ b/src/main/java/org/kohsuke/github/GHBlobBuilder.java @@ -36,7 +36,7 @@ public class GHBlobBuilder { * @return a GHBlobBuilder */ public GHBlobBuilder binaryContent(byte[] content) { - String base64Content = Base64.getMimeEncoder().encodeToString(content); + String base64Content = Base64.getEncoder().encodeToString(content); req.with("content", base64Content); req.with("encoding", "base64"); return this; diff --git a/src/main/java/org/kohsuke/github/GHContent.java b/src/main/java/org/kohsuke/github/GHContent.java index e8db82305..77e25233c 100644 --- a/src/main/java/org/kohsuke/github/GHContent.java +++ b/src/main/java/org/kohsuke/github/GHContent.java @@ -306,7 +306,7 @@ public class GHContent implements Refreshable { */ public GHContentUpdateResponse update(byte[] newContentBytes, String commitMessage, String branch) throws IOException { - String encodedContent = Base64.getMimeEncoder().encodeToString(newContentBytes); + String encodedContent = Base64.getEncoder().encodeToString(newContentBytes); Requester requester = root.createRequest() .method("POST") diff --git a/src/main/java/org/kohsuke/github/GHContentBuilder.java b/src/main/java/org/kohsuke/github/GHContentBuilder.java index 48b63769b..59c9490ac 100644 --- a/src/main/java/org/kohsuke/github/GHContentBuilder.java +++ b/src/main/java/org/kohsuke/github/GHContentBuilder.java @@ -68,7 +68,7 @@ public final class GHContentBuilder { * @return the gh content builder */ public GHContentBuilder content(byte[] content) { - req.with("content", Base64.getMimeEncoder().encodeToString(content)); + req.with("content", Base64.getEncoder().encodeToString(content)); return this; } diff --git a/src/test/java/org/kohsuke/github/GHContentIntegrationTest.java b/src/test/java/org/kohsuke/github/GHContentIntegrationTest.java index 0df362c7a..240ae271c 100644 --- a/src/test/java/org/kohsuke/github/GHContentIntegrationTest.java +++ b/src/test/java/org/kohsuke/github/GHContentIntegrationTest.java @@ -125,4 +125,36 @@ public class GHContentIntegrationTest extends AbstractGitHubWireMockTest { equalTo("{\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/v3/repos/contents/#get-contents\"}")); } } + + @Test + public void testMIMESmall() throws IOException { + GHRepository ghRepository = getTempRepository(); + GHContentBuilder ghContentBuilder = ghRepository.createContent(); + ghContentBuilder.message("Some commit msg"); + ghContentBuilder.path("MIME-Small.md"); + ghContentBuilder.content("123456789012345678901234567890123456789012345678901234567"); + ghContentBuilder.commit(); + } + + @Test + public void testMIMELong() throws IOException { + GHRepository ghRepository = getTempRepository(); + GHContentBuilder ghContentBuilder = ghRepository.createContent(); + ghContentBuilder.message("Some commit msg"); + ghContentBuilder.path("MIME-Long.md"); + ghContentBuilder.content("1234567890123456789012345678901234567890123456789012345678"); + ghContentBuilder.commit(); + } + @Test + public void testMIMELonger() throws IOException { + GHRepository ghRepository = getTempRepository(); + GHContentBuilder ghContentBuilder = ghRepository.createContent(); + ghContentBuilder.message("Some commit msg"); + ghContentBuilder.path("MIME-Long.md"); + ghContentBuilder.content("123456789012345678901234567890123456789012345678901234567890" + + "123456789012345678901234567890123456789012345678901234567890" + + "123456789012345678901234567890123456789012345678901234567890" + + "123456789012345678901234567890123456789012345678901234567890"); + ghContentBuilder.commit(); + } } diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/__files/repos_github-api-test-org_ghcontentintegrationtest-558c17cf-aa4d-452c-8791-7b2f196ef7e1.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/__files/repos_github-api-test-org_ghcontentintegrationtest-558c17cf-aa4d-452c-8791-7b2f196ef7e1.json new file mode 100644 index 000000000..2ea8f11cf --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/__files/repos_github-api-test-org_ghcontentintegrationtest-558c17cf-aa4d-452c-8791-7b2f196ef7e1.json @@ -0,0 +1,313 @@ +{ + "id": 40763577, + "node_id": "MDEwOlJlcG9zaXRvcnk0MDc2MzU3Nw==", + "name": "GHContentIntegrationTest", + "full_name": "github-api-test-org/GHContentIntegrationTest", + "private": false, + "owner": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github-api-test-org/GHContentIntegrationTest", + "description": "Repository used for integration test of github-api", + "fork": true, + "url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest", + "forks_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/forks", + "keys_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/teams", + "hooks_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/hooks", + "issue_events_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/events", + "assignees_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/tags", + "blobs_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/languages", + "stargazers_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/stargazers", + "contributors_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/contributors", + "subscribers_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/subscribers", + "subscription_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/subscription", + "commits_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/merges", + "archive_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/downloads", + "issues_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/labels{/name}", + "releases_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/deployments", + "created_at": "2015-08-15T14:14:57Z", + "updated_at": "2019-11-26T01:09:49Z", + "pushed_at": "2019-11-26T01:09:48Z", + "git_url": "git://github.com/github-api-test-org/GHContentIntegrationTest.git", + "ssh_url": "git@github.com:github-api-test-org/GHContentIntegrationTest.git", + "clone_url": "https://github.com/github-api-test-org/GHContentIntegrationTest.git", + "svn_url": "https://github.com/github-api-test-org/GHContentIntegrationTest", + "homepage": null, + "size": 52, + "stargazers_count": 1, + "watchers_count": 1, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 41, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 41, + "open_issues": 0, + "watchers": 1, + "default_branch": "master", + "permissions": { + "admin": true, + "push": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "organization": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "parent": { + "id": 19653852, + "node_id": "MDEwOlJlcG9zaXRvcnkxOTY1Mzg1Mg==", + "name": "GHContentIntegrationTest", + "full_name": "kohsuke2/GHContentIntegrationTest", + "private": false, + "owner": { + "login": "kohsuke2", + "id": 1329242, + "node_id": "MDQ6VXNlcjEzMjkyNDI=", + "avatar_url": "https://avatars2.githubusercontent.com/u/1329242?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/kohsuke2", + "html_url": "https://github.com/kohsuke2", + "followers_url": "https://api.github.com/users/kohsuke2/followers", + "following_url": "https://api.github.com/users/kohsuke2/following{/other_user}", + "gists_url": "https://api.github.com/users/kohsuke2/gists{/gist_id}", + "starred_url": "https://api.github.com/users/kohsuke2/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/kohsuke2/subscriptions", + "organizations_url": "https://api.github.com/users/kohsuke2/orgs", + "repos_url": "https://api.github.com/users/kohsuke2/repos", + "events_url": "https://api.github.com/users/kohsuke2/events{/privacy}", + "received_events_url": "https://api.github.com/users/kohsuke2/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/kohsuke2/GHContentIntegrationTest", + "description": "Repository used for integration test of github-api", + "fork": true, + "url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest", + "forks_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/forks", + "keys_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/teams", + "hooks_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/hooks", + "issue_events_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/events", + "assignees_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/tags", + "blobs_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/languages", + "stargazers_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/stargazers", + "contributors_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/contributors", + "subscribers_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/subscribers", + "subscription_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/subscription", + "commits_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/merges", + "archive_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/downloads", + "issues_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/labels{/name}", + "releases_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/deployments", + "created_at": "2014-05-10T22:50:30Z", + "updated_at": "2018-11-07T15:36:19Z", + "pushed_at": "2018-11-07T15:36:18Z", + "git_url": "git://github.com/kohsuke2/GHContentIntegrationTest.git", + "ssh_url": "git@github.com:kohsuke2/GHContentIntegrationTest.git", + "clone_url": "https://github.com/kohsuke2/GHContentIntegrationTest.git", + "svn_url": "https://github.com/kohsuke2/GHContentIntegrationTest", + "homepage": null, + "size": 111, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "source": { + "id": 14779458, + "node_id": "MDEwOlJlcG9zaXRvcnkxNDc3OTQ1OA==", + "name": "github-api-test-1", + "full_name": "farmdawgnation/github-api-test-1", + "private": false, + "owner": { + "login": "farmdawgnation", + "id": 620189, + "node_id": "MDQ6VXNlcjYyMDE4OQ==", + "avatar_url": "https://avatars2.githubusercontent.com/u/620189?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/farmdawgnation", + "html_url": "https://github.com/farmdawgnation", + "followers_url": "https://api.github.com/users/farmdawgnation/followers", + "following_url": "https://api.github.com/users/farmdawgnation/following{/other_user}", + "gists_url": "https://api.github.com/users/farmdawgnation/gists{/gist_id}", + "starred_url": "https://api.github.com/users/farmdawgnation/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/farmdawgnation/subscriptions", + "organizations_url": "https://api.github.com/users/farmdawgnation/orgs", + "repos_url": "https://api.github.com/users/farmdawgnation/repos", + "events_url": "https://api.github.com/users/farmdawgnation/events{/privacy}", + "received_events_url": "https://api.github.com/users/farmdawgnation/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/farmdawgnation/github-api-test-1", + "description": "Repository used for integration test of github-api", + "fork": false, + "url": "https://api.github.com/repos/farmdawgnation/github-api-test-1", + "forks_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/forks", + "keys_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/teams", + "hooks_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/hooks", + "issue_events_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/issues/events{/number}", + "events_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/events", + "assignees_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/assignees{/user}", + "branches_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/branches{/branch}", + "tags_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/tags", + "blobs_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/statuses/{sha}", + "languages_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/languages", + "stargazers_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/stargazers", + "contributors_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/contributors", + "subscribers_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/subscribers", + "subscription_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/subscription", + "commits_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/contents/{+path}", + "compare_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/merges", + "archive_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/downloads", + "issues_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/issues{/number}", + "pulls_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/pulls{/number}", + "milestones_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/milestones{/number}", + "notifications_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/labels{/name}", + "releases_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/releases{/id}", + "deployments_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/deployments", + "created_at": "2013-11-28T14:46:38Z", + "updated_at": "2016-02-05T13:33:23Z", + "pushed_at": "2013-11-28T14:55:36Z", + "git_url": "git://github.com/farmdawgnation/github-api-test-1.git", + "ssh_url": "git@github.com:farmdawgnation/github-api-test-1.git", + "clone_url": "https://github.com/farmdawgnation/github-api-test-1.git", + "svn_url": "https://github.com/farmdawgnation/github-api-test-1", + "homepage": null, + "size": 89, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 60, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 60, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "network_count": 60, + "subscribers_count": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/__files/repos_github-api-test-org_temp-testmimelong-7082490a-244f-4873-bdd9-de2dc4f78d54.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/__files/repos_github-api-test-org_temp-testmimelong-7082490a-244f-4873-bdd9-de2dc4f78d54.json new file mode 100644 index 000000000..6685e4f11 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/__files/repos_github-api-test-org_temp-testmimelong-7082490a-244f-4873-bdd9-de2dc4f78d54.json @@ -0,0 +1,125 @@ +{ + "id": 229372064, + "node_id": "MDEwOlJlcG9zaXRvcnkyMjkzNzIwNjQ=", + "name": "temp-testMIMELong", + "full_name": "github-api-test-org/temp-testMIMELong", + "private": false, + "owner": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github-api-test-org/temp-testMIMELong", + "description": "A test repository for testing the github-api project: temp-testMIMELong", + "fork": false, + "url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong", + "forks_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/forks", + "keys_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/teams", + "hooks_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/hooks", + "issue_events_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/issues/events{/number}", + "events_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/events", + "assignees_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/assignees{/user}", + "branches_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/branches{/branch}", + "tags_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/tags", + "blobs_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/languages", + "stargazers_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/stargazers", + "contributors_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/contributors", + "subscribers_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/subscribers", + "subscription_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/subscription", + "commits_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/contents/{+path}", + "compare_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/merges", + "archive_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/downloads", + "issues_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/issues{/number}", + "pulls_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/labels{/name}", + "releases_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/releases{/id}", + "deployments_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/deployments", + "created_at": "2019-12-21T03:42:26Z", + "updated_at": "2019-12-21T03:42:30Z", + "pushed_at": "2019-12-21T03:42:28Z", + "git_url": "git://github.com/github-api-test-org/temp-testMIMELong.git", + "ssh_url": "git@github.com:github-api-test-org/temp-testMIMELong.git", + "clone_url": "https://github.com/github-api-test-org/temp-testMIMELong.git", + "svn_url": "https://github.com/github-api-test-org/temp-testMIMELong", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "permissions": { + "admin": true, + "push": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "organization": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/__files/repos_github-api-test-org_temp-testmimelong_contents_mime-longmd-fb14970e-1231-44e3-9e36-9856335a1408.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/__files/repos_github-api-test-org_temp-testmimelong_contents_mime-longmd-fb14970e-1231-44e3-9e36-9856335a1408.json new file mode 100644 index 000000000..8e73e0eb0 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/__files/repos_github-api-test-org_temp-testmimelong_contents_mime-longmd-fb14970e-1231-44e3-9e36-9856335a1408.json @@ -0,0 +1,52 @@ +{ + "content": { + "name": "MIME-Long.md", + "path": "MIME-Long.md", + "sha": "e6a493cf0e30d4fc2d3cc60f690d96fec005a170", + "size": 58, + "url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/contents/MIME-Long.md?ref=master", + "html_url": "https://github.com/github-api-test-org/temp-testMIMELong/blob/master/MIME-Long.md", + "git_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/git/blobs/e6a493cf0e30d4fc2d3cc60f690d96fec005a170", + "download_url": "https://raw.githubusercontent.com/github-api-test-org/temp-testMIMELong/master/MIME-Long.md", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/contents/MIME-Long.md?ref=master", + "git": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/git/blobs/e6a493cf0e30d4fc2d3cc60f690d96fec005a170", + "html": "https://github.com/github-api-test-org/temp-testMIMELong/blob/master/MIME-Long.md" + } + }, + "commit": { + "sha": "bc198978c7012926287e95064ec992caceff2834", + "node_id": "MDY6Q29tbWl0MjI5MzcyMDY0OmJjMTk4OTc4YzcwMTI5MjYyODdlOTUwNjRlYzk5MmNhY2VmZjI4MzQ=", + "url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/git/commits/bc198978c7012926287e95064ec992caceff2834", + "html_url": "https://github.com/github-api-test-org/temp-testMIMELong/commit/bc198978c7012926287e95064ec992caceff2834", + "author": { + "name": "Liam Newman", + "email": "bitwiseman@gmail.com", + "date": "2019-12-21T03:42:31Z" + }, + "committer": { + "name": "Liam Newman", + "email": "bitwiseman@gmail.com", + "date": "2019-12-21T03:42:31Z" + }, + "tree": { + "sha": "f36282123bcb22ebda37370be4a9979c26818327", + "url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/git/trees/f36282123bcb22ebda37370be4a9979c26818327" + }, + "message": "Some commit msg", + "parents": [ + { + "sha": "9f75c8798e50499575231b3e322249824e92f83d", + "url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELong/git/commits/9f75c8798e50499575231b3e322249824e92f83d", + "html_url": "https://github.com/github-api-test-org/temp-testMIMELong/commit/9f75c8798e50499575231b3e322249824e92f83d" + } + ], + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/__files/user-e335a3e3-5206-41d0-ae3f-e73676b9cf83.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/__files/user-e335a3e3-5206-41d0-ae3f-e73676b9cf83.json new file mode 100644 index 000000000..98e8c76ba --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/__files/user-e335a3e3-5206-41d0-ae3f-e73676b9cf83.json @@ -0,0 +1,45 @@ +{ + "login": "bitwiseman", + "id": 1958953, + "node_id": "MDQ6VXNlcjE5NTg5NTM=", + "avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/bitwiseman", + "html_url": "https://github.com/bitwiseman", + "followers_url": "https://api.github.com/users/bitwiseman/followers", + "following_url": "https://api.github.com/users/bitwiseman/following{/other_user}", + "gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}", + "starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions", + "organizations_url": "https://api.github.com/users/bitwiseman/orgs", + "repos_url": "https://api.github.com/users/bitwiseman/repos", + "events_url": "https://api.github.com/users/bitwiseman/events{/privacy}", + "received_events_url": "https://api.github.com/users/bitwiseman/received_events", + "type": "User", + "site_admin": false, + "name": "Liam Newman", + "company": "Cloudbees, Inc.", + "blog": "", + "location": "Seattle, WA, USA", + "email": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 144, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2019-12-18T01:26:55Z", + "private_gists": 7, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/mappings/repos_github-api-test-org_ghcontentintegrationtest-2-558c17.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/mappings/repos_github-api-test-org_ghcontentintegrationtest-2-558c17.json new file mode 100644 index 000000000..6e334cfbb --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/mappings/repos_github-api-test-org_ghcontentintegrationtest-2-558c17.json @@ -0,0 +1,48 @@ +{ + "id": "558c17cf-aa4d-452c-8791-7b2f196ef7e1", + "name": "repos_github-api-test-org_ghcontentintegrationtest", + "request": { + "url": "/repos/github-api-test-org/GHContentIntegrationTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest-558c17cf-aa4d-452c-8791-7b2f196ef7e1.json", + "headers": { + "Date": "Sat, 21 Dec 2019 03:42:25 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4967", + "X-RateLimit-Reset": "1576903221", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"1e430d4199aa33f3d4673fee6fee2709\"", + "Last-Modified": "Tue, 26 Nov 2019 01:09:49 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C989:1F58:E9F71A:11C8906:5DFD94A0" + } + }, + "uuid": "558c17cf-aa4d-452c-8791-7b2f196ef7e1", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/mappings/repos_github-api-test-org_temp-testmimelong-3-708249.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/mappings/repos_github-api-test-org_temp-testmimelong-3-708249.json new file mode 100644 index 000000000..0b87ce145 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/mappings/repos_github-api-test-org_temp-testmimelong-3-708249.json @@ -0,0 +1,48 @@ +{ + "id": "7082490a-244f-4873-bdd9-de2dc4f78d54", + "name": "repos_github-api-test-org_temp-testmimelong", + "request": { + "url": "/repos/github-api-test-org/temp-testMIMELong", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_github-api-test-org_temp-testmimelong-7082490a-244f-4873-bdd9-de2dc4f78d54.json", + "headers": { + "Date": "Sat, 21 Dec 2019 03:42:31 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4963", + "X-RateLimit-Reset": "1576903221", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"70fd0b126fb45267b09e3b8201913a53\"", + "Last-Modified": "Sat, 21 Dec 2019 03:42:30 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C989:1F58:E9F874:11C8959:5DFD94A1" + } + }, + "uuid": "7082490a-244f-4873-bdd9-de2dc4f78d54", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/mappings/repos_github-api-test-org_temp-testmimelong_contents_mime-longmd-4-fb1497.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/mappings/repos_github-api-test-org_temp-testmimelong_contents_mime-longmd-4-fb1497.json new file mode 100644 index 000000000..0fcb99510 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/mappings/repos_github-api-test-org_temp-testmimelong_contents_mime-longmd-4-fb1497.json @@ -0,0 +1,54 @@ +{ + "id": "fb14970e-1231-44e3-9e36-9856335a1408", + "name": "repos_github-api-test-org_temp-testmimelong_contents_mime-longmd", + "request": { + "url": "/repos/github-api-test-org/temp-testMIMELong/contents/MIME-Long.md", + "method": "PUT", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"path\":\"MIME-Long.md\",\"message\":\"Some commit msg\",\"content\":\"MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3OA==\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": true + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_github-api-test-org_temp-testmimelong_contents_mime-longmd-fb14970e-1231-44e3-9e36-9856335a1408.json", + "headers": { + "Date": "Sat, 21 Dec 2019 03:42:32 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "201 Created", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4962", + "X-RateLimit-Reset": "1576903221", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "\"22277609adad7bed7001b1267022f175\"", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C989:1F58:E9F880:11C8B16:5DFD94A7" + } + }, + "uuid": "fb14970e-1231-44e3-9e36-9856335a1408", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/mappings/user-1-e335a3.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/mappings/user-1-e335a3.json new file mode 100644 index 000000000..c9272ebfb --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELong/mappings/user-1-e335a3.json @@ -0,0 +1,48 @@ +{ + "id": "e335a3e3-5206-41d0-ae3f-e73676b9cf83", + "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-e335a3e3-5206-41d0-ae3f-e73676b9cf83.json", + "headers": { + "Date": "Sat, 21 Dec 2019 03:42:24 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4971", + "X-RateLimit-Reset": "1576903221", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"be4370b3c906450f450e411f567ee839\"", + "Last-Modified": "Wed, 18 Dec 2019 01:26:55 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C989:1F58:E9F6D6:11C88FB:5DFD94A0" + } + }, + "uuid": "e335a3e3-5206-41d0-ae3f-e73676b9cf83", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/__files/repos_github-api-test-org_ghcontentintegrationtest-9942833c-45f6-4900-b491-bc457756e658.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/__files/repos_github-api-test-org_ghcontentintegrationtest-9942833c-45f6-4900-b491-bc457756e658.json new file mode 100644 index 000000000..2ea8f11cf --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/__files/repos_github-api-test-org_ghcontentintegrationtest-9942833c-45f6-4900-b491-bc457756e658.json @@ -0,0 +1,313 @@ +{ + "id": 40763577, + "node_id": "MDEwOlJlcG9zaXRvcnk0MDc2MzU3Nw==", + "name": "GHContentIntegrationTest", + "full_name": "github-api-test-org/GHContentIntegrationTest", + "private": false, + "owner": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github-api-test-org/GHContentIntegrationTest", + "description": "Repository used for integration test of github-api", + "fork": true, + "url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest", + "forks_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/forks", + "keys_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/teams", + "hooks_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/hooks", + "issue_events_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/events", + "assignees_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/tags", + "blobs_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/languages", + "stargazers_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/stargazers", + "contributors_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/contributors", + "subscribers_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/subscribers", + "subscription_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/subscription", + "commits_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/merges", + "archive_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/downloads", + "issues_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/labels{/name}", + "releases_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/deployments", + "created_at": "2015-08-15T14:14:57Z", + "updated_at": "2019-11-26T01:09:49Z", + "pushed_at": "2019-11-26T01:09:48Z", + "git_url": "git://github.com/github-api-test-org/GHContentIntegrationTest.git", + "ssh_url": "git@github.com:github-api-test-org/GHContentIntegrationTest.git", + "clone_url": "https://github.com/github-api-test-org/GHContentIntegrationTest.git", + "svn_url": "https://github.com/github-api-test-org/GHContentIntegrationTest", + "homepage": null, + "size": 52, + "stargazers_count": 1, + "watchers_count": 1, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 41, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 41, + "open_issues": 0, + "watchers": 1, + "default_branch": "master", + "permissions": { + "admin": true, + "push": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "organization": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "parent": { + "id": 19653852, + "node_id": "MDEwOlJlcG9zaXRvcnkxOTY1Mzg1Mg==", + "name": "GHContentIntegrationTest", + "full_name": "kohsuke2/GHContentIntegrationTest", + "private": false, + "owner": { + "login": "kohsuke2", + "id": 1329242, + "node_id": "MDQ6VXNlcjEzMjkyNDI=", + "avatar_url": "https://avatars2.githubusercontent.com/u/1329242?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/kohsuke2", + "html_url": "https://github.com/kohsuke2", + "followers_url": "https://api.github.com/users/kohsuke2/followers", + "following_url": "https://api.github.com/users/kohsuke2/following{/other_user}", + "gists_url": "https://api.github.com/users/kohsuke2/gists{/gist_id}", + "starred_url": "https://api.github.com/users/kohsuke2/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/kohsuke2/subscriptions", + "organizations_url": "https://api.github.com/users/kohsuke2/orgs", + "repos_url": "https://api.github.com/users/kohsuke2/repos", + "events_url": "https://api.github.com/users/kohsuke2/events{/privacy}", + "received_events_url": "https://api.github.com/users/kohsuke2/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/kohsuke2/GHContentIntegrationTest", + "description": "Repository used for integration test of github-api", + "fork": true, + "url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest", + "forks_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/forks", + "keys_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/teams", + "hooks_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/hooks", + "issue_events_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/events", + "assignees_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/tags", + "blobs_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/languages", + "stargazers_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/stargazers", + "contributors_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/contributors", + "subscribers_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/subscribers", + "subscription_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/subscription", + "commits_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/merges", + "archive_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/downloads", + "issues_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/labels{/name}", + "releases_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/deployments", + "created_at": "2014-05-10T22:50:30Z", + "updated_at": "2018-11-07T15:36:19Z", + "pushed_at": "2018-11-07T15:36:18Z", + "git_url": "git://github.com/kohsuke2/GHContentIntegrationTest.git", + "ssh_url": "git@github.com:kohsuke2/GHContentIntegrationTest.git", + "clone_url": "https://github.com/kohsuke2/GHContentIntegrationTest.git", + "svn_url": "https://github.com/kohsuke2/GHContentIntegrationTest", + "homepage": null, + "size": 111, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "source": { + "id": 14779458, + "node_id": "MDEwOlJlcG9zaXRvcnkxNDc3OTQ1OA==", + "name": "github-api-test-1", + "full_name": "farmdawgnation/github-api-test-1", + "private": false, + "owner": { + "login": "farmdawgnation", + "id": 620189, + "node_id": "MDQ6VXNlcjYyMDE4OQ==", + "avatar_url": "https://avatars2.githubusercontent.com/u/620189?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/farmdawgnation", + "html_url": "https://github.com/farmdawgnation", + "followers_url": "https://api.github.com/users/farmdawgnation/followers", + "following_url": "https://api.github.com/users/farmdawgnation/following{/other_user}", + "gists_url": "https://api.github.com/users/farmdawgnation/gists{/gist_id}", + "starred_url": "https://api.github.com/users/farmdawgnation/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/farmdawgnation/subscriptions", + "organizations_url": "https://api.github.com/users/farmdawgnation/orgs", + "repos_url": "https://api.github.com/users/farmdawgnation/repos", + "events_url": "https://api.github.com/users/farmdawgnation/events{/privacy}", + "received_events_url": "https://api.github.com/users/farmdawgnation/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/farmdawgnation/github-api-test-1", + "description": "Repository used for integration test of github-api", + "fork": false, + "url": "https://api.github.com/repos/farmdawgnation/github-api-test-1", + "forks_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/forks", + "keys_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/teams", + "hooks_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/hooks", + "issue_events_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/issues/events{/number}", + "events_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/events", + "assignees_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/assignees{/user}", + "branches_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/branches{/branch}", + "tags_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/tags", + "blobs_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/statuses/{sha}", + "languages_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/languages", + "stargazers_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/stargazers", + "contributors_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/contributors", + "subscribers_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/subscribers", + "subscription_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/subscription", + "commits_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/contents/{+path}", + "compare_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/merges", + "archive_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/downloads", + "issues_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/issues{/number}", + "pulls_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/pulls{/number}", + "milestones_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/milestones{/number}", + "notifications_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/labels{/name}", + "releases_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/releases{/id}", + "deployments_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/deployments", + "created_at": "2013-11-28T14:46:38Z", + "updated_at": "2016-02-05T13:33:23Z", + "pushed_at": "2013-11-28T14:55:36Z", + "git_url": "git://github.com/farmdawgnation/github-api-test-1.git", + "ssh_url": "git@github.com:farmdawgnation/github-api-test-1.git", + "clone_url": "https://github.com/farmdawgnation/github-api-test-1.git", + "svn_url": "https://github.com/farmdawgnation/github-api-test-1", + "homepage": null, + "size": 89, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 60, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 60, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "network_count": 60, + "subscribers_count": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/__files/repos_github-api-test-org_temp-testmimelonger-9160729e-acb8-4d03-95b8-dc0482236f2a.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/__files/repos_github-api-test-org_temp-testmimelonger-9160729e-acb8-4d03-95b8-dc0482236f2a.json new file mode 100644 index 000000000..0bbd55cd7 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/__files/repos_github-api-test-org_temp-testmimelonger-9160729e-acb8-4d03-95b8-dc0482236f2a.json @@ -0,0 +1,125 @@ +{ + "id": 229372207, + "node_id": "MDEwOlJlcG9zaXRvcnkyMjkzNzIyMDc=", + "name": "temp-testMIMELonger", + "full_name": "github-api-test-org/temp-testMIMELonger", + "private": false, + "owner": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github-api-test-org/temp-testMIMELonger", + "description": "A test repository for testing the github-api project: temp-testMIMELonger", + "fork": false, + "url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger", + "forks_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/forks", + "keys_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/teams", + "hooks_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/hooks", + "issue_events_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/issues/events{/number}", + "events_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/events", + "assignees_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/assignees{/user}", + "branches_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/branches{/branch}", + "tags_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/tags", + "blobs_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/languages", + "stargazers_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/stargazers", + "contributors_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/contributors", + "subscribers_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/subscribers", + "subscription_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/subscription", + "commits_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/contents/{+path}", + "compare_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/merges", + "archive_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/downloads", + "issues_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/issues{/number}", + "pulls_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/labels{/name}", + "releases_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/releases{/id}", + "deployments_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/deployments", + "created_at": "2019-12-21T03:44:10Z", + "updated_at": "2019-12-21T03:44:14Z", + "pushed_at": "2019-12-21T03:44:12Z", + "git_url": "git://github.com/github-api-test-org/temp-testMIMELonger.git", + "ssh_url": "git@github.com:github-api-test-org/temp-testMIMELonger.git", + "clone_url": "https://github.com/github-api-test-org/temp-testMIMELonger.git", + "svn_url": "https://github.com/github-api-test-org/temp-testMIMELonger", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "permissions": { + "admin": true, + "push": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "organization": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/__files/repos_github-api-test-org_temp-testmimelonger_contents_mime-longmd-1ff06594-1fa5-4715-8e13-036b87b43556.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/__files/repos_github-api-test-org_temp-testmimelonger_contents_mime-longmd-1ff06594-1fa5-4715-8e13-036b87b43556.json new file mode 100644 index 000000000..d74c4b800 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/__files/repos_github-api-test-org_temp-testmimelonger_contents_mime-longmd-1ff06594-1fa5-4715-8e13-036b87b43556.json @@ -0,0 +1,52 @@ +{ + "content": { + "name": "MIME-Long.md", + "path": "MIME-Long.md", + "sha": "44ebc5ca4ed19db1914770286bb94d30acfee5ad", + "size": 240, + "url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/contents/MIME-Long.md?ref=master", + "html_url": "https://github.com/github-api-test-org/temp-testMIMELonger/blob/master/MIME-Long.md", + "git_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/git/blobs/44ebc5ca4ed19db1914770286bb94d30acfee5ad", + "download_url": "https://raw.githubusercontent.com/github-api-test-org/temp-testMIMELonger/master/MIME-Long.md", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/contents/MIME-Long.md?ref=master", + "git": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/git/blobs/44ebc5ca4ed19db1914770286bb94d30acfee5ad", + "html": "https://github.com/github-api-test-org/temp-testMIMELonger/blob/master/MIME-Long.md" + } + }, + "commit": { + "sha": "8dbe34bfa6623c773722ee1d93755a71b9ebb2d4", + "node_id": "MDY6Q29tbWl0MjI5MzcyMjA3OjhkYmUzNGJmYTY2MjNjNzczNzIyZWUxZDkzNzU1YTcxYjllYmIyZDQ=", + "url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/git/commits/8dbe34bfa6623c773722ee1d93755a71b9ebb2d4", + "html_url": "https://github.com/github-api-test-org/temp-testMIMELonger/commit/8dbe34bfa6623c773722ee1d93755a71b9ebb2d4", + "author": { + "name": "Liam Newman", + "email": "bitwiseman@gmail.com", + "date": "2019-12-21T03:44:16Z" + }, + "committer": { + "name": "Liam Newman", + "email": "bitwiseman@gmail.com", + "date": "2019-12-21T03:44:16Z" + }, + "tree": { + "sha": "15647d5f583d8bacbf1dd186d211971951e02361", + "url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/git/trees/15647d5f583d8bacbf1dd186d211971951e02361" + }, + "message": "Some commit msg", + "parents": [ + { + "sha": "6c59b50bc1317481da8779f25932d5516115e2f9", + "url": "https://api.github.com/repos/github-api-test-org/temp-testMIMELonger/git/commits/6c59b50bc1317481da8779f25932d5516115e2f9", + "html_url": "https://github.com/github-api-test-org/temp-testMIMELonger/commit/6c59b50bc1317481da8779f25932d5516115e2f9" + } + ], + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/__files/user-1a0b1b14-7198-4fde-a559-64c0556a1aec.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/__files/user-1a0b1b14-7198-4fde-a559-64c0556a1aec.json new file mode 100644 index 000000000..98e8c76ba --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/__files/user-1a0b1b14-7198-4fde-a559-64c0556a1aec.json @@ -0,0 +1,45 @@ +{ + "login": "bitwiseman", + "id": 1958953, + "node_id": "MDQ6VXNlcjE5NTg5NTM=", + "avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/bitwiseman", + "html_url": "https://github.com/bitwiseman", + "followers_url": "https://api.github.com/users/bitwiseman/followers", + "following_url": "https://api.github.com/users/bitwiseman/following{/other_user}", + "gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}", + "starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions", + "organizations_url": "https://api.github.com/users/bitwiseman/orgs", + "repos_url": "https://api.github.com/users/bitwiseman/repos", + "events_url": "https://api.github.com/users/bitwiseman/events{/privacy}", + "received_events_url": "https://api.github.com/users/bitwiseman/received_events", + "type": "User", + "site_admin": false, + "name": "Liam Newman", + "company": "Cloudbees, Inc.", + "blog": "", + "location": "Seattle, WA, USA", + "email": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 144, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2019-12-18T01:26:55Z", + "private_gists": 7, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/mappings/repos_github-api-test-org_ghcontentintegrationtest-2-994283.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/mappings/repos_github-api-test-org_ghcontentintegrationtest-2-994283.json new file mode 100644 index 000000000..afba0cec2 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/mappings/repos_github-api-test-org_ghcontentintegrationtest-2-994283.json @@ -0,0 +1,48 @@ +{ + "id": "9942833c-45f6-4900-b491-bc457756e658", + "name": "repos_github-api-test-org_ghcontentintegrationtest", + "request": { + "url": "/repos/github-api-test-org/GHContentIntegrationTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest-9942833c-45f6-4900-b491-bc457756e658.json", + "headers": { + "Date": "Sat, 21 Dec 2019 03:44:10 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4953", + "X-RateLimit-Reset": "1576903221", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"1e430d4199aa33f3d4673fee6fee2709\"", + "Last-Modified": "Tue, 26 Nov 2019 01:09:49 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C9A0:123F:168DE5:1BDB88:5DFD9509" + } + }, + "uuid": "9942833c-45f6-4900-b491-bc457756e658", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/mappings/repos_github-api-test-org_temp-testmimelonger-3-916072.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/mappings/repos_github-api-test-org_temp-testmimelonger-3-916072.json new file mode 100644 index 000000000..8ca0b2f81 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/mappings/repos_github-api-test-org_temp-testmimelonger-3-916072.json @@ -0,0 +1,48 @@ +{ + "id": "9160729e-acb8-4d03-95b8-dc0482236f2a", + "name": "repos_github-api-test-org_temp-testmimelonger", + "request": { + "url": "/repos/github-api-test-org/temp-testMIMELonger", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_github-api-test-org_temp-testmimelonger-9160729e-acb8-4d03-95b8-dc0482236f2a.json", + "headers": { + "Date": "Sat, 21 Dec 2019 03:44:16 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4949", + "X-RateLimit-Reset": "1576903221", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f6e32e5acd526da0a3542ec9e21bd334\"", + "Last-Modified": "Sat, 21 Dec 2019 03:44:14 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C9A0:123F:168E14:1BDB96:5DFD950A" + } + }, + "uuid": "9160729e-acb8-4d03-95b8-dc0482236f2a", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/mappings/repos_github-api-test-org_temp-testmimelonger_contents_mime-longmd-4-1ff065.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/mappings/repos_github-api-test-org_temp-testmimelonger_contents_mime-longmd-4-1ff065.json new file mode 100644 index 000000000..bf31376fa --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/mappings/repos_github-api-test-org_temp-testmimelonger_contents_mime-longmd-4-1ff065.json @@ -0,0 +1,54 @@ +{ + "id": "1ff06594-1fa5-4715-8e13-036b87b43556", + "name": "repos_github-api-test-org_temp-testmimelonger_contents_mime-longmd", + "request": { + "url": "/repos/github-api-test-org/temp-testMIMELonger/contents/MIME-Long.md", + "method": "PUT", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"path\":\"MIME-Long.md\",\"message\":\"Some commit msg\",\"content\":\"MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkw\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": true + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_github-api-test-org_temp-testmimelonger_contents_mime-longmd-1ff06594-1fa5-4715-8e13-036b87b43556.json", + "headers": { + "Date": "Sat, 21 Dec 2019 03:44:16 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "201 Created", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4948", + "X-RateLimit-Reset": "1576903221", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "\"e57c13fcb987d7bcd8f73234879affe4\"", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C9A0:123F:168E16:1BDBC7:5DFD9510" + } + }, + "uuid": "1ff06594-1fa5-4715-8e13-036b87b43556", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/mappings/user-1-1a0b1b.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/mappings/user-1-1a0b1b.json new file mode 100644 index 000000000..b0c4f0acc --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMELonger/mappings/user-1-1a0b1b.json @@ -0,0 +1,48 @@ +{ + "id": "1a0b1b14-7198-4fde-a559-64c0556a1aec", + "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-1a0b1b14-7198-4fde-a559-64c0556a1aec.json", + "headers": { + "Date": "Sat, 21 Dec 2019 03:44:09 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4957", + "X-RateLimit-Reset": "1576903221", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"be4370b3c906450f450e411f567ee839\"", + "Last-Modified": "Wed, 18 Dec 2019 01:26:55 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C9A0:123F:168DDA:1BDB85:5DFD9508" + } + }, + "uuid": "1a0b1b14-7198-4fde-a559-64c0556a1aec", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/__files/repos_github-api-test-org_ghcontentintegrationtest-f60bd9fd-10cc-4488-b2ce-b618cac83ae2.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/__files/repos_github-api-test-org_ghcontentintegrationtest-f60bd9fd-10cc-4488-b2ce-b618cac83ae2.json new file mode 100644 index 000000000..2ea8f11cf --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/__files/repos_github-api-test-org_ghcontentintegrationtest-f60bd9fd-10cc-4488-b2ce-b618cac83ae2.json @@ -0,0 +1,313 @@ +{ + "id": 40763577, + "node_id": "MDEwOlJlcG9zaXRvcnk0MDc2MzU3Nw==", + "name": "GHContentIntegrationTest", + "full_name": "github-api-test-org/GHContentIntegrationTest", + "private": false, + "owner": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github-api-test-org/GHContentIntegrationTest", + "description": "Repository used for integration test of github-api", + "fork": true, + "url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest", + "forks_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/forks", + "keys_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/teams", + "hooks_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/hooks", + "issue_events_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/events", + "assignees_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/tags", + "blobs_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/languages", + "stargazers_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/stargazers", + "contributors_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/contributors", + "subscribers_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/subscribers", + "subscription_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/subscription", + "commits_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/merges", + "archive_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/downloads", + "issues_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/labels{/name}", + "releases_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/github-api-test-org/GHContentIntegrationTest/deployments", + "created_at": "2015-08-15T14:14:57Z", + "updated_at": "2019-11-26T01:09:49Z", + "pushed_at": "2019-11-26T01:09:48Z", + "git_url": "git://github.com/github-api-test-org/GHContentIntegrationTest.git", + "ssh_url": "git@github.com:github-api-test-org/GHContentIntegrationTest.git", + "clone_url": "https://github.com/github-api-test-org/GHContentIntegrationTest.git", + "svn_url": "https://github.com/github-api-test-org/GHContentIntegrationTest", + "homepage": null, + "size": 52, + "stargazers_count": 1, + "watchers_count": 1, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 41, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 41, + "open_issues": 0, + "watchers": 1, + "default_branch": "master", + "permissions": { + "admin": true, + "push": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "organization": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "parent": { + "id": 19653852, + "node_id": "MDEwOlJlcG9zaXRvcnkxOTY1Mzg1Mg==", + "name": "GHContentIntegrationTest", + "full_name": "kohsuke2/GHContentIntegrationTest", + "private": false, + "owner": { + "login": "kohsuke2", + "id": 1329242, + "node_id": "MDQ6VXNlcjEzMjkyNDI=", + "avatar_url": "https://avatars2.githubusercontent.com/u/1329242?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/kohsuke2", + "html_url": "https://github.com/kohsuke2", + "followers_url": "https://api.github.com/users/kohsuke2/followers", + "following_url": "https://api.github.com/users/kohsuke2/following{/other_user}", + "gists_url": "https://api.github.com/users/kohsuke2/gists{/gist_id}", + "starred_url": "https://api.github.com/users/kohsuke2/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/kohsuke2/subscriptions", + "organizations_url": "https://api.github.com/users/kohsuke2/orgs", + "repos_url": "https://api.github.com/users/kohsuke2/repos", + "events_url": "https://api.github.com/users/kohsuke2/events{/privacy}", + "received_events_url": "https://api.github.com/users/kohsuke2/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/kohsuke2/GHContentIntegrationTest", + "description": "Repository used for integration test of github-api", + "fork": true, + "url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest", + "forks_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/forks", + "keys_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/teams", + "hooks_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/hooks", + "issue_events_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/events", + "assignees_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/tags", + "blobs_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/languages", + "stargazers_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/stargazers", + "contributors_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/contributors", + "subscribers_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/subscribers", + "subscription_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/subscription", + "commits_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/merges", + "archive_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/downloads", + "issues_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/labels{/name}", + "releases_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/deployments", + "created_at": "2014-05-10T22:50:30Z", + "updated_at": "2018-11-07T15:36:19Z", + "pushed_at": "2018-11-07T15:36:18Z", + "git_url": "git://github.com/kohsuke2/GHContentIntegrationTest.git", + "ssh_url": "git@github.com:kohsuke2/GHContentIntegrationTest.git", + "clone_url": "https://github.com/kohsuke2/GHContentIntegrationTest.git", + "svn_url": "https://github.com/kohsuke2/GHContentIntegrationTest", + "homepage": null, + "size": 111, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "source": { + "id": 14779458, + "node_id": "MDEwOlJlcG9zaXRvcnkxNDc3OTQ1OA==", + "name": "github-api-test-1", + "full_name": "farmdawgnation/github-api-test-1", + "private": false, + "owner": { + "login": "farmdawgnation", + "id": 620189, + "node_id": "MDQ6VXNlcjYyMDE4OQ==", + "avatar_url": "https://avatars2.githubusercontent.com/u/620189?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/farmdawgnation", + "html_url": "https://github.com/farmdawgnation", + "followers_url": "https://api.github.com/users/farmdawgnation/followers", + "following_url": "https://api.github.com/users/farmdawgnation/following{/other_user}", + "gists_url": "https://api.github.com/users/farmdawgnation/gists{/gist_id}", + "starred_url": "https://api.github.com/users/farmdawgnation/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/farmdawgnation/subscriptions", + "organizations_url": "https://api.github.com/users/farmdawgnation/orgs", + "repos_url": "https://api.github.com/users/farmdawgnation/repos", + "events_url": "https://api.github.com/users/farmdawgnation/events{/privacy}", + "received_events_url": "https://api.github.com/users/farmdawgnation/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/farmdawgnation/github-api-test-1", + "description": "Repository used for integration test of github-api", + "fork": false, + "url": "https://api.github.com/repos/farmdawgnation/github-api-test-1", + "forks_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/forks", + "keys_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/teams", + "hooks_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/hooks", + "issue_events_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/issues/events{/number}", + "events_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/events", + "assignees_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/assignees{/user}", + "branches_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/branches{/branch}", + "tags_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/tags", + "blobs_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/statuses/{sha}", + "languages_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/languages", + "stargazers_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/stargazers", + "contributors_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/contributors", + "subscribers_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/subscribers", + "subscription_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/subscription", + "commits_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/contents/{+path}", + "compare_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/merges", + "archive_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/downloads", + "issues_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/issues{/number}", + "pulls_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/pulls{/number}", + "milestones_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/milestones{/number}", + "notifications_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/labels{/name}", + "releases_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/releases{/id}", + "deployments_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/deployments", + "created_at": "2013-11-28T14:46:38Z", + "updated_at": "2016-02-05T13:33:23Z", + "pushed_at": "2013-11-28T14:55:36Z", + "git_url": "git://github.com/farmdawgnation/github-api-test-1.git", + "ssh_url": "git@github.com:farmdawgnation/github-api-test-1.git", + "clone_url": "https://github.com/farmdawgnation/github-api-test-1.git", + "svn_url": "https://github.com/farmdawgnation/github-api-test-1", + "homepage": null, + "size": 89, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 60, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 60, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "network_count": 60, + "subscribers_count": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/__files/repos_github-api-test-org_temp-testmimesmall-41e8e5a0-d704-4832-87b2-8a5a89cce1a2.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/__files/repos_github-api-test-org_temp-testmimesmall-41e8e5a0-d704-4832-87b2-8a5a89cce1a2.json new file mode 100644 index 000000000..4084d23fc --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/__files/repos_github-api-test-org_temp-testmimesmall-41e8e5a0-d704-4832-87b2-8a5a89cce1a2.json @@ -0,0 +1,125 @@ +{ + "id": 229371968, + "node_id": "MDEwOlJlcG9zaXRvcnkyMjkzNzE5Njg=", + "name": "temp-testMIMESmall", + "full_name": "github-api-test-org/temp-testMIMESmall", + "private": false, + "owner": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github-api-test-org/temp-testMIMESmall", + "description": "A test repository for testing the github-api project: temp-testMIMESmall", + "fork": false, + "url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall", + "forks_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/forks", + "keys_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/teams", + "hooks_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/hooks", + "issue_events_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/issues/events{/number}", + "events_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/events", + "assignees_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/assignees{/user}", + "branches_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/branches{/branch}", + "tags_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/tags", + "blobs_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/languages", + "stargazers_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/stargazers", + "contributors_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/contributors", + "subscribers_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/subscribers", + "subscription_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/subscription", + "commits_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/contents/{+path}", + "compare_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/merges", + "archive_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/downloads", + "issues_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/issues{/number}", + "pulls_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/labels{/name}", + "releases_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/releases{/id}", + "deployments_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/deployments", + "created_at": "2019-12-21T03:41:25Z", + "updated_at": "2019-12-21T03:41:29Z", + "pushed_at": "2019-12-21T03:41:27Z", + "git_url": "git://github.com/github-api-test-org/temp-testMIMESmall.git", + "ssh_url": "git@github.com:github-api-test-org/temp-testMIMESmall.git", + "clone_url": "https://github.com/github-api-test-org/temp-testMIMESmall.git", + "svn_url": "https://github.com/github-api-test-org/temp-testMIMESmall", + "homepage": "http://github-api.kohsuke.org/", + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "permissions": { + "admin": true, + "push": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "organization": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/__files/repos_github-api-test-org_temp-testmimesmall_contents_mime-smallmd-931cbb72-6e12-4509-bfa6-612dbfaadac0.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/__files/repos_github-api-test-org_temp-testmimesmall_contents_mime-smallmd-931cbb72-6e12-4509-bfa6-612dbfaadac0.json new file mode 100644 index 000000000..849662c78 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/__files/repos_github-api-test-org_temp-testmimesmall_contents_mime-smallmd-931cbb72-6e12-4509-bfa6-612dbfaadac0.json @@ -0,0 +1,52 @@ +{ + "content": { + "name": "MIME-Small.md", + "path": "MIME-Small.md", + "sha": "378ea1c90acccc8371c391c7ad0639b20d6043ec", + "size": 57, + "url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/contents/MIME-Small.md?ref=master", + "html_url": "https://github.com/github-api-test-org/temp-testMIMESmall/blob/master/MIME-Small.md", + "git_url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/git/blobs/378ea1c90acccc8371c391c7ad0639b20d6043ec", + "download_url": "https://raw.githubusercontent.com/github-api-test-org/temp-testMIMESmall/master/MIME-Small.md", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/contents/MIME-Small.md?ref=master", + "git": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/git/blobs/378ea1c90acccc8371c391c7ad0639b20d6043ec", + "html": "https://github.com/github-api-test-org/temp-testMIMESmall/blob/master/MIME-Small.md" + } + }, + "commit": { + "sha": "be5302da80c15f8297cc990ae9b747fd5f7ce5fe", + "node_id": "MDY6Q29tbWl0MjI5MzcxOTY4OmJlNTMwMmRhODBjMTVmODI5N2NjOTkwYWU5Yjc0N2ZkNWY3Y2U1ZmU=", + "url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/git/commits/be5302da80c15f8297cc990ae9b747fd5f7ce5fe", + "html_url": "https://github.com/github-api-test-org/temp-testMIMESmall/commit/be5302da80c15f8297cc990ae9b747fd5f7ce5fe", + "author": { + "name": "Liam Newman", + "email": "bitwiseman@gmail.com", + "date": "2019-12-21T03:41:30Z" + }, + "committer": { + "name": "Liam Newman", + "email": "bitwiseman@gmail.com", + "date": "2019-12-21T03:41:30Z" + }, + "tree": { + "sha": "c112ac165d0d1431ffeec79f35065c24ddf4dbd9", + "url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/git/trees/c112ac165d0d1431ffeec79f35065c24ddf4dbd9" + }, + "message": "Some commit msg", + "parents": [ + { + "sha": "de89a11e58b6cb804c167eb23ebb926549c424bf", + "url": "https://api.github.com/repos/github-api-test-org/temp-testMIMESmall/git/commits/de89a11e58b6cb804c167eb23ebb926549c424bf", + "html_url": "https://github.com/github-api-test-org/temp-testMIMESmall/commit/de89a11e58b6cb804c167eb23ebb926549c424bf" + } + ], + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/__files/user-b9d02cd3-311a-4d49-8de8-aa4220400616.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/__files/user-b9d02cd3-311a-4d49-8de8-aa4220400616.json new file mode 100644 index 000000000..98e8c76ba --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/__files/user-b9d02cd3-311a-4d49-8de8-aa4220400616.json @@ -0,0 +1,45 @@ +{ + "login": "bitwiseman", + "id": 1958953, + "node_id": "MDQ6VXNlcjE5NTg5NTM=", + "avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/bitwiseman", + "html_url": "https://github.com/bitwiseman", + "followers_url": "https://api.github.com/users/bitwiseman/followers", + "following_url": "https://api.github.com/users/bitwiseman/following{/other_user}", + "gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}", + "starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions", + "organizations_url": "https://api.github.com/users/bitwiseman/orgs", + "repos_url": "https://api.github.com/users/bitwiseman/repos", + "events_url": "https://api.github.com/users/bitwiseman/events{/privacy}", + "received_events_url": "https://api.github.com/users/bitwiseman/received_events", + "type": "User", + "site_admin": false, + "name": "Liam Newman", + "company": "Cloudbees, Inc.", + "blog": "", + "location": "Seattle, WA, USA", + "email": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 144, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2019-12-18T01:26:55Z", + "private_gists": 7, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/mappings/repos_github-api-test-org_ghcontentintegrationtest-2-f60bd9.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/mappings/repos_github-api-test-org_ghcontentintegrationtest-2-f60bd9.json new file mode 100644 index 000000000..0331bee67 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/mappings/repos_github-api-test-org_ghcontentintegrationtest-2-f60bd9.json @@ -0,0 +1,48 @@ +{ + "id": "f60bd9fd-10cc-4488-b2ce-b618cac83ae2", + "name": "repos_github-api-test-org_ghcontentintegrationtest", + "request": { + "url": "/repos/github-api-test-org/GHContentIntegrationTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest-f60bd9fd-10cc-4488-b2ce-b618cac83ae2.json", + "headers": { + "Date": "Sat, 21 Dec 2019 03:41:25 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4981", + "X-RateLimit-Reset": "1576903221", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"1e430d4199aa33f3d4673fee6fee2709\"", + "Last-Modified": "Tue, 26 Nov 2019 01:09:49 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C977:4ACE:948C3A:B32669:5DFD9463" + } + }, + "uuid": "f60bd9fd-10cc-4488-b2ce-b618cac83ae2", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/mappings/repos_github-api-test-org_temp-testmimesmall-3-41e8e5.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/mappings/repos_github-api-test-org_temp-testmimesmall-3-41e8e5.json new file mode 100644 index 000000000..2fdda688a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/mappings/repos_github-api-test-org_temp-testmimesmall-3-41e8e5.json @@ -0,0 +1,48 @@ +{ + "id": "41e8e5a0-d704-4832-87b2-8a5a89cce1a2", + "name": "repos_github-api-test-org_temp-testmimesmall", + "request": { + "url": "/repos/github-api-test-org/temp-testMIMESmall", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_github-api-test-org_temp-testmimesmall-41e8e5a0-d704-4832-87b2-8a5a89cce1a2.json", + "headers": { + "Date": "Sat, 21 Dec 2019 03:41:30 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4977", + "X-RateLimit-Reset": "1576903221", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"c557a0c20701919fce23174db79017f3\"", + "Last-Modified": "Sat, 21 Dec 2019 03:41:29 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C977:4ACE:948CFA:B326A5:5DFD9465" + } + }, + "uuid": "41e8e5a0-d704-4832-87b2-8a5a89cce1a2", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/mappings/repos_github-api-test-org_temp-testmimesmall_contents_mime-smallmd-4-931cbb.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/mappings/repos_github-api-test-org_temp-testmimesmall_contents_mime-smallmd-4-931cbb.json new file mode 100644 index 000000000..03387206f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/mappings/repos_github-api-test-org_temp-testmimesmall_contents_mime-smallmd-4-931cbb.json @@ -0,0 +1,54 @@ +{ + "id": "931cbb72-6e12-4509-bfa6-612dbfaadac0", + "name": "repos_github-api-test-org_temp-testmimesmall_contents_mime-smallmd", + "request": { + "url": "/repos/github-api-test-org/temp-testMIMESmall/contents/MIME-Small.md", + "method": "PUT", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"path\":\"MIME-Small.md\",\"message\":\"Some commit msg\",\"content\":\"MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": true + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_github-api-test-org_temp-testmimesmall_contents_mime-smallmd-931cbb72-6e12-4509-bfa6-612dbfaadac0.json", + "headers": { + "Date": "Sat, 21 Dec 2019 03:41:31 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "201 Created", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4976", + "X-RateLimit-Reset": "1576903221", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "\"3365fc5e9b238559992839bdabae9db1\"", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C977:4ACE:948D01:B32783:5DFD946A" + } + }, + "uuid": "931cbb72-6e12-4509-bfa6-612dbfaadac0", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/mappings/user-1-b9d02c.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/mappings/user-1-b9d02c.json new file mode 100644 index 000000000..b94e3839e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testMIMESmall/mappings/user-1-b9d02c.json @@ -0,0 +1,48 @@ +{ + "id": "b9d02cd3-311a-4d49-8de8-aa4220400616", + "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-b9d02cd3-311a-4d49-8de8-aa4220400616.json", + "headers": { + "Date": "Sat, 21 Dec 2019 03:41:23 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4985", + "X-RateLimit-Reset": "1576903221", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"be4370b3c906450f450e411f567ee839\"", + "Last-Modified": "Wed, 18 Dec 2019 01:26:55 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C977:4ACE:948C05:B32660:5DFD9463" + } + }, + "uuid": "b9d02cd3-311a-4d49-8de8-aa4220400616", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file