From 272b87f04de3f650dba47066cb599e51a2a7f7bb Mon Sep 17 00:00:00 2001 From: Tadas Giniotis Date: Wed, 30 Sep 2020 23:21:05 +0300 Subject: [PATCH 1/3] add ability to attach a signature when creating a commit --- .../java/org/kohsuke/github/GHCommitBuilder.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/org/kohsuke/github/GHCommitBuilder.java b/src/main/java/org/kohsuke/github/GHCommitBuilder.java index c7b459a22d..ba25af53f2 100644 --- a/src/main/java/org/kohsuke/github/GHCommitBuilder.java +++ b/src/main/java/org/kohsuke/github/GHCommitBuilder.java @@ -89,6 +89,19 @@ public GHCommitBuilder author(String name, String email, Date date) { return this; } + /** + * Configures the PGP signature of this commit. + * + * @param signature + * the signature calculated from the commit + * + * @return the gh commit builder + */ + public GHCommitBuilder withSignature(String signature) { + req.with("signature", signature); + return this; + } + /** * Configures the committer of this commit. * From b78c37a695dbfaf0199c986a7fa3066942c9ab76 Mon Sep 17 00:00:00 2001 From: Tadas Giniotis Date: Wed, 30 Sep 2020 23:21:16 +0300 Subject: [PATCH 2/3] add tests --- .../org/kohsuke/github/GHRepositoryTest.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/test/java/org/kohsuke/github/GHRepositoryTest.java b/src/test/java/org/kohsuke/github/GHRepositoryTest.java index 2c579370dd..f65fa48956 100644 --- a/src/test/java/org/kohsuke/github/GHRepositoryTest.java +++ b/src/test/java/org/kohsuke/github/GHRepositoryTest.java @@ -13,6 +13,7 @@ import static org.hamcrest.Matchers.*; import static org.hamcrest.core.IsInstanceOf.instanceOf; +import static org.kohsuke.github.GHVerification.Reason.*; /** * @author Liam Newman @@ -75,6 +76,40 @@ public void getBranch_URLEncoded() throws Exception { assertThat(branch.getName(), is("test/#UrlEncode")); } + @Test + public void createSignedCommitVerifyError() throws IOException { + GHRepository repository = getRepository(); + + GHTree ghTree = new GHTreeBuilder(repository).textEntry("a", "", false).create(); + + GHVerification verification = repository.createCommit() + .message("test signing") + .withSignature("-----BEGIN PGP SIGNATURE-----\ninvalid\n-----END PGP SIGNATURE-----") + .tree(ghTree.getSha()) + .create() + .getCommitShortInfo() + .getVerification(); + + assertEquals(GPGVERIFY_ERROR, verification.getReason()); + } + + @Test + public void createSignedCommitUnknownSignatureType() throws IOException { + GHRepository repository = getRepository(); + + GHTree ghTree = new GHTreeBuilder(repository).textEntry("a", "", false).create(); + + GHVerification verification = repository.createCommit() + .message("test signing") + .withSignature("unknown") + .tree(ghTree.getSha()) + .create() + .getCommitShortInfo() + .getVerification(); + + assertEquals(UNKNOWN_SIGNATURE_TYPE, verification.getReason()); + } + // Issue #607 @Test public void getBranchNonExistentBut200Status() throws Exception { From c21bd5765ab800014f88c61a8cf5f1f8d76c1023 Mon Sep 17 00:00:00 2001 From: Tadas Giniotis Date: Thu, 1 Oct 2020 01:24:41 +0300 Subject: [PATCH 3/3] add wiremock snapshots --- .../__files/orgs_hub4j-test-org-1.json | 48 +++ .../repos_hub4j-test-org_github-api-2.json | 332 ++++++++++++++++++ ...f0c2e63c338a783d151d34884443269c2b7-5.json | 91 +++++ ...b4j-test-org_github-api_git_commits-4.json | 28 ++ ...hub4j-test-org_github-api_git_trees-3.json | 15 + .../mappings/orgs_hub4j-test-org-1.json | 46 +++ .../repos_hub4j-test-org_github-api-2.json | 46 +++ ...f0c2e63c338a783d151d34884443269c2b7-5.json | 46 +++ ...b4j-test-org_github-api_git_commits-4.json | 53 +++ ...hub4j-test-org_github-api_git_trees-3.json | 53 +++ .../__files/orgs_hub4j-test-org-1.json | 48 +++ .../repos_hub4j-test-org_github-api-2.json | 332 ++++++++++++++++++ ...fd7cdefc7ed36397e1082e38c53ba2a4477-5.json | 91 +++++ ...b4j-test-org_github-api_git_commits-4.json | 28 ++ ...hub4j-test-org_github-api_git_trees-3.json | 15 + .../mappings/orgs_hub4j-test-org-1.json | 46 +++ .../repos_hub4j-test-org_github-api-2.json | 46 +++ ...fd7cdefc7ed36397e1082e38c53ba2a4477-5.json | 46 +++ ...b4j-test-org_github-api_git_commits-4.json | 53 +++ ...hub4j-test-org_github-api_git_trees-3.json | 53 +++ 20 files changed, 1516 insertions(+) create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/orgs_hub4j-test-org-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/repos_hub4j-test-org_github-api-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/repos_hub4j-test-org_github-api_commits_4c84ff0c2e63c338a783d151d34884443269c2b7-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/repos_hub4j-test-org_github-api_git_commits-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/repos_hub4j-test-org_github-api_git_trees-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/orgs_hub4j-test-org-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/repos_hub4j-test-org_github-api-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/repos_hub4j-test-org_github-api_commits_4c84ff0c2e63c338a783d151d34884443269c2b7-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/repos_hub4j-test-org_github-api_git_commits-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/repos_hub4j-test-org_github-api_git_trees-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/orgs_hub4j-test-org-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/repos_hub4j-test-org_github-api-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/repos_hub4j-test-org_github-api_commits_b4c27fd7cdefc7ed36397e1082e38c53ba2a4477-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/repos_hub4j-test-org_github-api_git_commits-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/repos_hub4j-test-org_github-api_git_trees-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/orgs_hub4j-test-org-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/repos_hub4j-test-org_github-api-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/repos_hub4j-test-org_github-api_commits_b4c27fd7cdefc7ed36397e1082e38c53ba2a4477-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/repos_hub4j-test-org_github-api_git_commits-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/repos_hub4j-test-org_github-api_git_trees-3.json diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/orgs_hub4j-test-org-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/orgs_hub4j-test-org-1.json new file mode 100644 index 0000000000..bdba1fe825 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/orgs_hub4j-test-org-1.json @@ -0,0 +1,48 @@ +{ + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/hub4j-test-org", + "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", + "events_url": "https://api.github.com/orgs/hub4j-test-org/events", + "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", + "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", + "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": "Hub4j Test Org Description (this could be null or blank too)", + "name": "Hub4j Test Org Name (this could be null or blank too)", + "company": null, + "blog": "https://hub4j.url.io/could/be/null", + "location": "Hub4j Test Org Location (this could be null or blank too)", + "email": "hub4jtestorgemail@could.be.null.com", + "twitter_username": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 13, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/hub4j-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2020-06-04T05:56:10Z", + "type": "Organization", + "total_private_repos": 1, + "owned_private_repos": 1, + "private_gists": 0, + "disk_usage": 152, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "members_can_create_pages": true, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 10000, + "filled_seats": 18, + "seats": 3 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/repos_hub4j-test-org_github-api-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/repos_hub4j-test-org_github-api-2.json new file mode 100644 index 0000000000..cb34fc2cf5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/repos_hub4j-test-org_github-api-2.json @@ -0,0 +1,332 @@ +{ + "id": 206888201, + "node_id": "MDEwOlJlcG9zaXRvcnkyMDY4ODgyMDE=", + "name": "github-api", + "full_name": "hub4j-test-org/github-api", + "private": false, + "owner": { + "login": "hub4j-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/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/github-api", + "description": "Resetting", + "fork": true, + "url": "https://api.github.com/repos/hub4j-test-org/github-api", + "forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/github-api/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/github-api/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/github-api/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/github-api/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/github-api/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments", + "created_at": "2019-09-06T23:26:04Z", + "updated_at": "2020-06-10T23:27:59Z", + "pushed_at": "2020-09-03T19:05:17Z", + "git_url": "git://github.com/hub4j-test-org/github-api.git", + "ssh_url": "git@github.com:hub4j-test-org/github-api.git", + "clone_url": "https://github.com/hub4j-test-org/github-api.git", + "svn_url": "https://github.com/hub4j-test-org/github-api", + "homepage": "http://github-api.kohsuke.org/", + "size": 19052, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Java", + "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": 5, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 0, + "open_issues": 5, + "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, + "delete_branch_on_merge": false, + "organization": { + "login": "hub4j-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/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "parent": { + "id": 617210, + "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", + "name": "github-api", + "full_name": "hub4j/github-api", + "private": false, + "owner": { + "login": "hub4j", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j", + "html_url": "https://github.com/hub4j", + "followers_url": "https://api.github.com/users/hub4j/followers", + "following_url": "https://api.github.com/users/hub4j/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j/orgs", + "repos_url": "https://api.github.com/users/hub4j/repos", + "events_url": "https://api.github.com/users/hub4j/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j/github-api", + "description": "Java API for GitHub", + "fork": false, + "url": "https://api.github.com/repos/hub4j/github-api", + "forks_url": "https://api.github.com/repos/hub4j/github-api/forks", + "keys_url": "https://api.github.com/repos/hub4j/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j/github-api/teams", + "hooks_url": "https://api.github.com/repos/hub4j/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j/github-api/events", + "assignees_url": "https://api.github.com/repos/hub4j/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j/github-api/tags", + "blobs_url": "https://api.github.com/repos/hub4j/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j/github-api/languages", + "stargazers_url": "https://api.github.com/repos/hub4j/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j/github-api/subscription", + "commits_url": "https://api.github.com/repos/hub4j/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j/github-api/merges", + "archive_url": "https://api.github.com/repos/hub4j/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j/github-api/downloads", + "issues_url": "https://api.github.com/repos/hub4j/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", + "created_at": "2010-04-19T04:13:03Z", + "updated_at": "2020-09-28T14:19:03Z", + "pushed_at": "2020-09-30T22:02:16Z", + "git_url": "git://github.com/hub4j/github-api.git", + "ssh_url": "git@github.com:hub4j/github-api.git", + "clone_url": "https://github.com/hub4j/github-api.git", + "svn_url": "https://github.com/hub4j/github-api", + "homepage": "https://github-api.kohsuke.org/", + "size": 25263, + "stargazers_count": 701, + "watchers_count": 701, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 499, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 82, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 499, + "open_issues": 82, + "watchers": 701, + "default_branch": "master" + }, + "source": { + "id": 617210, + "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", + "name": "github-api", + "full_name": "hub4j/github-api", + "private": false, + "owner": { + "login": "hub4j", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j", + "html_url": "https://github.com/hub4j", + "followers_url": "https://api.github.com/users/hub4j/followers", + "following_url": "https://api.github.com/users/hub4j/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j/orgs", + "repos_url": "https://api.github.com/users/hub4j/repos", + "events_url": "https://api.github.com/users/hub4j/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j/github-api", + "description": "Java API for GitHub", + "fork": false, + "url": "https://api.github.com/repos/hub4j/github-api", + "forks_url": "https://api.github.com/repos/hub4j/github-api/forks", + "keys_url": "https://api.github.com/repos/hub4j/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j/github-api/teams", + "hooks_url": "https://api.github.com/repos/hub4j/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j/github-api/events", + "assignees_url": "https://api.github.com/repos/hub4j/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j/github-api/tags", + "blobs_url": "https://api.github.com/repos/hub4j/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j/github-api/languages", + "stargazers_url": "https://api.github.com/repos/hub4j/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j/github-api/subscription", + "commits_url": "https://api.github.com/repos/hub4j/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j/github-api/merges", + "archive_url": "https://api.github.com/repos/hub4j/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j/github-api/downloads", + "issues_url": "https://api.github.com/repos/hub4j/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", + "created_at": "2010-04-19T04:13:03Z", + "updated_at": "2020-09-28T14:19:03Z", + "pushed_at": "2020-09-30T22:02:16Z", + "git_url": "git://github.com/hub4j/github-api.git", + "ssh_url": "git@github.com:hub4j/github-api.git", + "clone_url": "https://github.com/hub4j/github-api.git", + "svn_url": "https://github.com/hub4j/github-api", + "homepage": "https://github-api.kohsuke.org/", + "size": 25263, + "stargazers_count": 701, + "watchers_count": 701, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 499, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 82, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 499, + "open_issues": 82, + "watchers": 701, + "default_branch": "master" + }, + "network_count": 499, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/repos_hub4j-test-org_github-api_commits_4c84ff0c2e63c338a783d151d34884443269c2b7-5.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/repos_hub4j-test-org_github-api_commits_4c84ff0c2e63c338a783d151d34884443269c2b7-5.json new file mode 100644 index 0000000000..5537f4d8cc --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/repos_hub4j-test-org_github-api_commits_4c84ff0c2e63c338a783d151d34884443269c2b7-5.json @@ -0,0 +1,91 @@ +{ + "sha": "4c84ff0c2e63c338a783d151d34884443269c2b7", + "node_id": "MDY6Q29tbWl0MjA2ODg4MjAxOjRjODRmZjBjMmU2M2MzMzhhNzgzZDE1MWQzNDg4NDQ0MzI2OWMyYjc=", + "commit": { + "author": { + "name": "Tadas Giniotis", + "email": "61763026+tginiotis-at-work@users.noreply.github.com", + "date": "2020-09-30T22:23:51Z" + }, + "committer": { + "name": "Tadas Giniotis", + "email": "61763026+tginiotis-at-work@users.noreply.github.com", + "date": "2020-09-30T22:23:51Z" + }, + "message": "test signing", + "tree": { + "sha": "496d6428b9cf92981dc9495211e6e1120fb6f2ba", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees/496d6428b9cf92981dc9495211e6e1120fb6f2ba" + }, + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/4c84ff0c2e63c338a783d151d34884443269c2b7", + "comment_count": 0, + "verification": { + "verified": false, + "reason": "unknown_signature_type", + "signature": "unknown", + "payload": "tree 496d6428b9cf92981dc9495211e6e1120fb6f2ba\nauthor Tadas Giniotis <61763026+tginiotis-at-work@users.noreply.github.com> 1601504631 +0300\ncommitter Tadas Giniotis <61763026+tginiotis-at-work@users.noreply.github.com> 1601504631 +0300\n\ntest signing" + } + }, + "url": "https://api.github.com/repos/hub4j-test-org/github-api/commits/4c84ff0c2e63c338a783d151d34884443269c2b7", + "html_url": "https://github.com/hub4j-test-org/github-api/commit/4c84ff0c2e63c338a783d151d34884443269c2b7", + "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/commits/4c84ff0c2e63c338a783d151d34884443269c2b7/comments", + "author": { + "login": "tginiotis-at-work", + "id": 61763026, + "node_id": "MDQ6VXNlcjYxNzYzMDI2", + "avatar_url": "https://avatars3.githubusercontent.com/u/61763026?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/tginiotis-at-work", + "html_url": "https://github.com/tginiotis-at-work", + "followers_url": "https://api.github.com/users/tginiotis-at-work/followers", + "following_url": "https://api.github.com/users/tginiotis-at-work/following{/other_user}", + "gists_url": "https://api.github.com/users/tginiotis-at-work/gists{/gist_id}", + "starred_url": "https://api.github.com/users/tginiotis-at-work/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/tginiotis-at-work/subscriptions", + "organizations_url": "https://api.github.com/users/tginiotis-at-work/orgs", + "repos_url": "https://api.github.com/users/tginiotis-at-work/repos", + "events_url": "https://api.github.com/users/tginiotis-at-work/events{/privacy}", + "received_events_url": "https://api.github.com/users/tginiotis-at-work/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "tginiotis-at-work", + "id": 61763026, + "node_id": "MDQ6VXNlcjYxNzYzMDI2", + "avatar_url": "https://avatars3.githubusercontent.com/u/61763026?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/tginiotis-at-work", + "html_url": "https://github.com/tginiotis-at-work", + "followers_url": "https://api.github.com/users/tginiotis-at-work/followers", + "following_url": "https://api.github.com/users/tginiotis-at-work/following{/other_user}", + "gists_url": "https://api.github.com/users/tginiotis-at-work/gists{/gist_id}", + "starred_url": "https://api.github.com/users/tginiotis-at-work/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/tginiotis-at-work/subscriptions", + "organizations_url": "https://api.github.com/users/tginiotis-at-work/orgs", + "repos_url": "https://api.github.com/users/tginiotis-at-work/repos", + "events_url": "https://api.github.com/users/tginiotis-at-work/events{/privacy}", + "received_events_url": "https://api.github.com/users/tginiotis-at-work/received_events", + "type": "User", + "site_admin": false + }, + "parents": [], + "stats": { + "total": 0, + "additions": 0, + "deletions": 0 + }, + "files": [ + { + "sha": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + "filename": "a", + "status": "added", + "additions": 0, + "deletions": 0, + "changes": 0, + "blob_url": "https://github.com/hub4j-test-org/github-api/blob/4c84ff0c2e63c338a783d151d34884443269c2b7/a", + "raw_url": "https://github.com/hub4j-test-org/github-api/raw/4c84ff0c2e63c338a783d151d34884443269c2b7/a", + "contents_url": "https://api.github.com/repos/hub4j-test-org/github-api/contents/a?ref=4c84ff0c2e63c338a783d151d34884443269c2b7" + } + ] +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/repos_hub4j-test-org_github-api_git_commits-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/repos_hub4j-test-org_github-api_git_commits-4.json new file mode 100644 index 0000000000..b40dd018a4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/repos_hub4j-test-org_github-api_git_commits-4.json @@ -0,0 +1,28 @@ +{ + "sha": "4c84ff0c2e63c338a783d151d34884443269c2b7", + "node_id": "MDY6Q29tbWl0MjA2ODg4MjAxOjRjODRmZjBjMmU2M2MzMzhhNzgzZDE1MWQzNDg4NDQ0MzI2OWMyYjc=", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/4c84ff0c2e63c338a783d151d34884443269c2b7", + "html_url": "https://github.com/hub4j-test-org/github-api/commit/4c84ff0c2e63c338a783d151d34884443269c2b7", + "author": { + "name": "Tadas Giniotis", + "email": "61763026+tginiotis-at-work@users.noreply.github.com", + "date": "2020-09-30T22:23:51Z" + }, + "committer": { + "name": "Tadas Giniotis", + "email": "61763026+tginiotis-at-work@users.noreply.github.com", + "date": "2020-09-30T22:23:51Z" + }, + "tree": { + "sha": "496d6428b9cf92981dc9495211e6e1120fb6f2ba", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees/496d6428b9cf92981dc9495211e6e1120fb6f2ba" + }, + "message": "test signing", + "parents": [], + "verification": { + "verified": false, + "reason": "unknown_signature_type", + "signature": "unknown", + "payload": "tree 496d6428b9cf92981dc9495211e6e1120fb6f2ba\nauthor Tadas Giniotis <61763026+tginiotis-at-work@users.noreply.github.com> 1601504631 +0300\ncommitter Tadas Giniotis <61763026+tginiotis-at-work@users.noreply.github.com> 1601504631 +0300\n\ntest signing" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/repos_hub4j-test-org_github-api_git_trees-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/repos_hub4j-test-org_github-api_git_trees-3.json new file mode 100644 index 0000000000..6be6810d74 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/__files/repos_hub4j-test-org_github-api_git_trees-3.json @@ -0,0 +1,15 @@ +{ + "sha": "496d6428b9cf92981dc9495211e6e1120fb6f2ba", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees/496d6428b9cf92981dc9495211e6e1120fb6f2ba", + "tree": [ + { + "path": "a", + "mode": "100644", + "type": "blob", + "sha": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + "size": 0, + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/blobs/e69de29bb2d1d6434b8b29ae775ad8c2e48c5391" + } + ], + "truncated": false +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/orgs_hub4j-test-org-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/orgs_hub4j-test-org-1.json new file mode 100644 index 0000000000..4883299057 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/orgs_hub4j-test-org-1.json @@ -0,0 +1,46 @@ +{ + "id": "a350645c-1938-4c8d-b164-fa9e0c67801f", + "name": "orgs_hub4j-test-org", + "request": { + "url": "/orgs/hub4j-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_hub4j-test-org-1.json", + "headers": { + "Date": "Wed, 30 Sep 2020 22:23:49 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"5c55d16bf1d59fa9c42072f73eac7e9484cb6b90e83ce9fecee1423b52bf612f\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4941", + "X-RateLimit-Reset": "1601504639", + "X-RateLimit-Used": "59", + "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": "EDA2:11A07:1BDDC5BB:212F8CC2:5F750575" + } + }, + "uuid": "a350645c-1938-4c8d-b164-fa9e0c67801f", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/repos_hub4j-test-org_github-api-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/repos_hub4j-test-org_github-api-2.json new file mode 100644 index 0000000000..8d7b73833b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/repos_hub4j-test-org_github-api-2.json @@ -0,0 +1,46 @@ +{ + "id": "3fb900d8-a015-469c-99f9-4f8a8464a3a1", + "name": "repos_hub4j-test-org_github-api", + "request": { + "url": "/repos/hub4j-test-org/github-api", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api-2.json", + "headers": { + "Date": "Wed, 30 Sep 2020 22:23:50 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"c8ad35a8cd7fe9644ddeb7b67d913887a2344f1572826dfde27f697035eba391\"", + "Last-Modified": "Wed, 10 Jun 2020 23:27:59 GMT", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4940", + "X-RateLimit-Reset": "1601504639", + "X-RateLimit-Used": "60", + "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": "EDA2:11A07:1BDDC698:212F8D26:5F750575" + } + }, + "uuid": "3fb900d8-a015-469c-99f9-4f8a8464a3a1", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/repos_hub4j-test-org_github-api_commits_4c84ff0c2e63c338a783d151d34884443269c2b7-5.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/repos_hub4j-test-org_github-api_commits_4c84ff0c2e63c338a783d151d34884443269c2b7-5.json new file mode 100644 index 0000000000..db2edcf117 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/repos_hub4j-test-org_github-api_commits_4c84ff0c2e63c338a783d151d34884443269c2b7-5.json @@ -0,0 +1,46 @@ +{ + "id": "38d3fd11-8cda-4aba-9106-2cb73c39c611", + "name": "repos_hub4j-test-org_github-api_commits_4c84ff0c2e63c338a783d151d34884443269c2b7", + "request": { + "url": "/repos/hub4j-test-org/github-api/commits/4c84ff0c2e63c338a783d151d34884443269c2b7", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_commits_4c84ff0c2e63c338a783d151d34884443269c2b7-5.json", + "headers": { + "Date": "Wed, 30 Sep 2020 22:23:51 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"e21dd140e0ddf1541936f44be456851f267d4ae1834dbf080d4bd7378cefbc57\"", + "Last-Modified": "Wed, 30 Sep 2020 22:23:51 GMT", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4937", + "X-RateLimit-Reset": "1601504639", + "X-RateLimit-Used": "63", + "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": "EDA2:11A07:1BDDC8A6:212F902E:5F750577" + } + }, + "uuid": "38d3fd11-8cda-4aba-9106-2cb73c39c611", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/repos_hub4j-test-org_github-api_git_commits-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/repos_hub4j-test-org_github-api_git_commits-4.json new file mode 100644 index 0000000000..9789c67be6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/repos_hub4j-test-org_github-api_git_commits-4.json @@ -0,0 +1,53 @@ +{ + "id": "e67d9457-6a15-48c0-9129-e4756a1f0270", + "name": "repos_hub4j-test-org_github-api_git_commits", + "request": { + "url": "/repos/hub4j-test-org/github-api/git/commits", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"signature\":\"unknown\",\"tree\":\"496d6428b9cf92981dc9495211e6e1120fb6f2ba\",\"message\":\"test signing\",\"parents\":[]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_github-api_git_commits-4.json", + "headers": { + "Date": "Wed, 30 Sep 2020 22:23:51 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "201 Created", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "\"a1619b0b838e3c06d760033e46addc8465219d564e8fe93bc13f03bc3bfd739d\"", + "Location": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/4c84ff0c2e63c338a783d151d34884443269c2b7", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4938", + "X-RateLimit-Reset": "1601504639", + "X-RateLimit-Used": "62", + "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": "EDA2:11A07:1BDDC7EE:212F8F3C:5F750577" + } + }, + "uuid": "e67d9457-6a15-48c0-9129-e4756a1f0270", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/repos_hub4j-test-org_github-api_git_trees-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/repos_hub4j-test-org_github-api_git_trees-3.json new file mode 100644 index 0000000000..9a4e52dc94 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitUnknownSignatureType/mappings/repos_hub4j-test-org_github-api_git_trees-3.json @@ -0,0 +1,53 @@ +{ + "id": "f3d95d49-1dcc-4236-a546-a2594afceeb8", + "name": "repos_hub4j-test-org_github-api_git_trees", + "request": { + "url": "/repos/hub4j-test-org/github-api/git/trees", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"tree\":[{\"path\":\"a\",\"mode\":\"100644\",\"type\":\"blob\",\"content\":\"\"}]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_github-api_git_trees-3.json", + "headers": { + "Date": "Wed, 30 Sep 2020 22:23:51 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "201 Created", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "\"c8502795da5880935eedfafda7dfc7974b605a4b0161b57b0c87f05668bb7e5d\"", + "Location": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees/496d6428b9cf92981dc9495211e6e1120fb6f2ba", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4939", + "X-RateLimit-Reset": "1601504639", + "X-RateLimit-Used": "61", + "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": "EDA2:11A07:1BDDC747:212F8E50:5F750576" + } + }, + "uuid": "f3d95d49-1dcc-4236-a546-a2594afceeb8", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/orgs_hub4j-test-org-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/orgs_hub4j-test-org-1.json new file mode 100644 index 0000000000..bdba1fe825 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/orgs_hub4j-test-org-1.json @@ -0,0 +1,48 @@ +{ + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/hub4j-test-org", + "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", + "events_url": "https://api.github.com/orgs/hub4j-test-org/events", + "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", + "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", + "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": "Hub4j Test Org Description (this could be null or blank too)", + "name": "Hub4j Test Org Name (this could be null or blank too)", + "company": null, + "blog": "https://hub4j.url.io/could/be/null", + "location": "Hub4j Test Org Location (this could be null or blank too)", + "email": "hub4jtestorgemail@could.be.null.com", + "twitter_username": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 13, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/hub4j-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2020-06-04T05:56:10Z", + "type": "Organization", + "total_private_repos": 1, + "owned_private_repos": 1, + "private_gists": 0, + "disk_usage": 152, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "members_can_create_pages": true, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 10000, + "filled_seats": 18, + "seats": 3 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/repos_hub4j-test-org_github-api-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/repos_hub4j-test-org_github-api-2.json new file mode 100644 index 0000000000..cb34fc2cf5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/repos_hub4j-test-org_github-api-2.json @@ -0,0 +1,332 @@ +{ + "id": 206888201, + "node_id": "MDEwOlJlcG9zaXRvcnkyMDY4ODgyMDE=", + "name": "github-api", + "full_name": "hub4j-test-org/github-api", + "private": false, + "owner": { + "login": "hub4j-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/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/github-api", + "description": "Resetting", + "fork": true, + "url": "https://api.github.com/repos/hub4j-test-org/github-api", + "forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/github-api/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/github-api/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/github-api/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/github-api/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/github-api/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments", + "created_at": "2019-09-06T23:26:04Z", + "updated_at": "2020-06-10T23:27:59Z", + "pushed_at": "2020-09-03T19:05:17Z", + "git_url": "git://github.com/hub4j-test-org/github-api.git", + "ssh_url": "git@github.com:hub4j-test-org/github-api.git", + "clone_url": "https://github.com/hub4j-test-org/github-api.git", + "svn_url": "https://github.com/hub4j-test-org/github-api", + "homepage": "http://github-api.kohsuke.org/", + "size": 19052, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Java", + "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": 5, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 0, + "open_issues": 5, + "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, + "delete_branch_on_merge": false, + "organization": { + "login": "hub4j-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/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "parent": { + "id": 617210, + "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", + "name": "github-api", + "full_name": "hub4j/github-api", + "private": false, + "owner": { + "login": "hub4j", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j", + "html_url": "https://github.com/hub4j", + "followers_url": "https://api.github.com/users/hub4j/followers", + "following_url": "https://api.github.com/users/hub4j/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j/orgs", + "repos_url": "https://api.github.com/users/hub4j/repos", + "events_url": "https://api.github.com/users/hub4j/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j/github-api", + "description": "Java API for GitHub", + "fork": false, + "url": "https://api.github.com/repos/hub4j/github-api", + "forks_url": "https://api.github.com/repos/hub4j/github-api/forks", + "keys_url": "https://api.github.com/repos/hub4j/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j/github-api/teams", + "hooks_url": "https://api.github.com/repos/hub4j/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j/github-api/events", + "assignees_url": "https://api.github.com/repos/hub4j/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j/github-api/tags", + "blobs_url": "https://api.github.com/repos/hub4j/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j/github-api/languages", + "stargazers_url": "https://api.github.com/repos/hub4j/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j/github-api/subscription", + "commits_url": "https://api.github.com/repos/hub4j/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j/github-api/merges", + "archive_url": "https://api.github.com/repos/hub4j/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j/github-api/downloads", + "issues_url": "https://api.github.com/repos/hub4j/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", + "created_at": "2010-04-19T04:13:03Z", + "updated_at": "2020-09-28T14:19:03Z", + "pushed_at": "2020-09-30T22:02:16Z", + "git_url": "git://github.com/hub4j/github-api.git", + "ssh_url": "git@github.com:hub4j/github-api.git", + "clone_url": "https://github.com/hub4j/github-api.git", + "svn_url": "https://github.com/hub4j/github-api", + "homepage": "https://github-api.kohsuke.org/", + "size": 25263, + "stargazers_count": 701, + "watchers_count": 701, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 499, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 82, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 499, + "open_issues": 82, + "watchers": 701, + "default_branch": "master" + }, + "source": { + "id": 617210, + "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", + "name": "github-api", + "full_name": "hub4j/github-api", + "private": false, + "owner": { + "login": "hub4j", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j", + "html_url": "https://github.com/hub4j", + "followers_url": "https://api.github.com/users/hub4j/followers", + "following_url": "https://api.github.com/users/hub4j/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j/orgs", + "repos_url": "https://api.github.com/users/hub4j/repos", + "events_url": "https://api.github.com/users/hub4j/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j/github-api", + "description": "Java API for GitHub", + "fork": false, + "url": "https://api.github.com/repos/hub4j/github-api", + "forks_url": "https://api.github.com/repos/hub4j/github-api/forks", + "keys_url": "https://api.github.com/repos/hub4j/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j/github-api/teams", + "hooks_url": "https://api.github.com/repos/hub4j/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j/github-api/events", + "assignees_url": "https://api.github.com/repos/hub4j/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j/github-api/tags", + "blobs_url": "https://api.github.com/repos/hub4j/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j/github-api/languages", + "stargazers_url": "https://api.github.com/repos/hub4j/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j/github-api/subscription", + "commits_url": "https://api.github.com/repos/hub4j/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j/github-api/merges", + "archive_url": "https://api.github.com/repos/hub4j/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j/github-api/downloads", + "issues_url": "https://api.github.com/repos/hub4j/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", + "created_at": "2010-04-19T04:13:03Z", + "updated_at": "2020-09-28T14:19:03Z", + "pushed_at": "2020-09-30T22:02:16Z", + "git_url": "git://github.com/hub4j/github-api.git", + "ssh_url": "git@github.com:hub4j/github-api.git", + "clone_url": "https://github.com/hub4j/github-api.git", + "svn_url": "https://github.com/hub4j/github-api", + "homepage": "https://github-api.kohsuke.org/", + "size": 25263, + "stargazers_count": 701, + "watchers_count": 701, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 499, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 82, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 499, + "open_issues": 82, + "watchers": 701, + "default_branch": "master" + }, + "network_count": 499, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/repos_hub4j-test-org_github-api_commits_b4c27fd7cdefc7ed36397e1082e38c53ba2a4477-5.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/repos_hub4j-test-org_github-api_commits_b4c27fd7cdefc7ed36397e1082e38c53ba2a4477-5.json new file mode 100644 index 0000000000..b2c8ae463f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/repos_hub4j-test-org_github-api_commits_b4c27fd7cdefc7ed36397e1082e38c53ba2a4477-5.json @@ -0,0 +1,91 @@ +{ + "sha": "b4c27fd7cdefc7ed36397e1082e38c53ba2a4477", + "node_id": "MDY6Q29tbWl0MjA2ODg4MjAxOmI0YzI3ZmQ3Y2RlZmM3ZWQzNjM5N2UxMDgyZTM4YzUzYmEyYTQ0Nzc=", + "commit": { + "author": { + "name": "Tadas Giniotis", + "email": "61763026+tginiotis-at-work@users.noreply.github.com", + "date": "2020-09-30T22:23:53Z" + }, + "committer": { + "name": "Tadas Giniotis", + "email": "61763026+tginiotis-at-work@users.noreply.github.com", + "date": "2020-09-30T22:23:53Z" + }, + "message": "test signing", + "tree": { + "sha": "496d6428b9cf92981dc9495211e6e1120fb6f2ba", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees/496d6428b9cf92981dc9495211e6e1120fb6f2ba" + }, + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/b4c27fd7cdefc7ed36397e1082e38c53ba2a4477", + "comment_count": 0, + "verification": { + "verified": false, + "reason": "gpgverify_error", + "signature": "-----BEGIN PGP SIGNATURE-----\ninvalid\n-----END PGP SIGNATURE-----", + "payload": "tree 496d6428b9cf92981dc9495211e6e1120fb6f2ba\nauthor Tadas Giniotis <61763026+tginiotis-at-work@users.noreply.github.com> 1601504633 +0300\ncommitter Tadas Giniotis <61763026+tginiotis-at-work@users.noreply.github.com> 1601504633 +0300\n\ntest signing" + } + }, + "url": "https://api.github.com/repos/hub4j-test-org/github-api/commits/b4c27fd7cdefc7ed36397e1082e38c53ba2a4477", + "html_url": "https://github.com/hub4j-test-org/github-api/commit/b4c27fd7cdefc7ed36397e1082e38c53ba2a4477", + "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/commits/b4c27fd7cdefc7ed36397e1082e38c53ba2a4477/comments", + "author": { + "login": "tginiotis-at-work", + "id": 61763026, + "node_id": "MDQ6VXNlcjYxNzYzMDI2", + "avatar_url": "https://avatars3.githubusercontent.com/u/61763026?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/tginiotis-at-work", + "html_url": "https://github.com/tginiotis-at-work", + "followers_url": "https://api.github.com/users/tginiotis-at-work/followers", + "following_url": "https://api.github.com/users/tginiotis-at-work/following{/other_user}", + "gists_url": "https://api.github.com/users/tginiotis-at-work/gists{/gist_id}", + "starred_url": "https://api.github.com/users/tginiotis-at-work/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/tginiotis-at-work/subscriptions", + "organizations_url": "https://api.github.com/users/tginiotis-at-work/orgs", + "repos_url": "https://api.github.com/users/tginiotis-at-work/repos", + "events_url": "https://api.github.com/users/tginiotis-at-work/events{/privacy}", + "received_events_url": "https://api.github.com/users/tginiotis-at-work/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "tginiotis-at-work", + "id": 61763026, + "node_id": "MDQ6VXNlcjYxNzYzMDI2", + "avatar_url": "https://avatars3.githubusercontent.com/u/61763026?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/tginiotis-at-work", + "html_url": "https://github.com/tginiotis-at-work", + "followers_url": "https://api.github.com/users/tginiotis-at-work/followers", + "following_url": "https://api.github.com/users/tginiotis-at-work/following{/other_user}", + "gists_url": "https://api.github.com/users/tginiotis-at-work/gists{/gist_id}", + "starred_url": "https://api.github.com/users/tginiotis-at-work/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/tginiotis-at-work/subscriptions", + "organizations_url": "https://api.github.com/users/tginiotis-at-work/orgs", + "repos_url": "https://api.github.com/users/tginiotis-at-work/repos", + "events_url": "https://api.github.com/users/tginiotis-at-work/events{/privacy}", + "received_events_url": "https://api.github.com/users/tginiotis-at-work/received_events", + "type": "User", + "site_admin": false + }, + "parents": [], + "stats": { + "total": 0, + "additions": 0, + "deletions": 0 + }, + "files": [ + { + "sha": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + "filename": "a", + "status": "added", + "additions": 0, + "deletions": 0, + "changes": 0, + "blob_url": "https://github.com/hub4j-test-org/github-api/blob/b4c27fd7cdefc7ed36397e1082e38c53ba2a4477/a", + "raw_url": "https://github.com/hub4j-test-org/github-api/raw/b4c27fd7cdefc7ed36397e1082e38c53ba2a4477/a", + "contents_url": "https://api.github.com/repos/hub4j-test-org/github-api/contents/a?ref=b4c27fd7cdefc7ed36397e1082e38c53ba2a4477" + } + ] +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/repos_hub4j-test-org_github-api_git_commits-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/repos_hub4j-test-org_github-api_git_commits-4.json new file mode 100644 index 0000000000..d9ffc359a2 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/repos_hub4j-test-org_github-api_git_commits-4.json @@ -0,0 +1,28 @@ +{ + "sha": "b4c27fd7cdefc7ed36397e1082e38c53ba2a4477", + "node_id": "MDY6Q29tbWl0MjA2ODg4MjAxOmI0YzI3ZmQ3Y2RlZmM3ZWQzNjM5N2UxMDgyZTM4YzUzYmEyYTQ0Nzc=", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/b4c27fd7cdefc7ed36397e1082e38c53ba2a4477", + "html_url": "https://github.com/hub4j-test-org/github-api/commit/b4c27fd7cdefc7ed36397e1082e38c53ba2a4477", + "author": { + "name": "Tadas Giniotis", + "email": "61763026+tginiotis-at-work@users.noreply.github.com", + "date": "2020-09-30T22:23:53Z" + }, + "committer": { + "name": "Tadas Giniotis", + "email": "61763026+tginiotis-at-work@users.noreply.github.com", + "date": "2020-09-30T22:23:53Z" + }, + "tree": { + "sha": "496d6428b9cf92981dc9495211e6e1120fb6f2ba", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees/496d6428b9cf92981dc9495211e6e1120fb6f2ba" + }, + "message": "test signing", + "parents": [], + "verification": { + "verified": false, + "reason": "gpgverify_error", + "signature": "-----BEGIN PGP SIGNATURE-----\ninvalid\n-----END PGP SIGNATURE-----", + "payload": "tree 496d6428b9cf92981dc9495211e6e1120fb6f2ba\nauthor Tadas Giniotis <61763026+tginiotis-at-work@users.noreply.github.com> 1601504633 +0300\ncommitter Tadas Giniotis <61763026+tginiotis-at-work@users.noreply.github.com> 1601504633 +0300\n\ntest signing" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/repos_hub4j-test-org_github-api_git_trees-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/repos_hub4j-test-org_github-api_git_trees-3.json new file mode 100644 index 0000000000..6be6810d74 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/__files/repos_hub4j-test-org_github-api_git_trees-3.json @@ -0,0 +1,15 @@ +{ + "sha": "496d6428b9cf92981dc9495211e6e1120fb6f2ba", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees/496d6428b9cf92981dc9495211e6e1120fb6f2ba", + "tree": [ + { + "path": "a", + "mode": "100644", + "type": "blob", + "sha": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + "size": 0, + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/blobs/e69de29bb2d1d6434b8b29ae775ad8c2e48c5391" + } + ], + "truncated": false +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/orgs_hub4j-test-org-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/orgs_hub4j-test-org-1.json new file mode 100644 index 0000000000..665f7aa78f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/orgs_hub4j-test-org-1.json @@ -0,0 +1,46 @@ +{ + "id": "45d9a026-bcde-488b-847a-b9dc8566c1fe", + "name": "orgs_hub4j-test-org", + "request": { + "url": "/orgs/hub4j-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_hub4j-test-org-1.json", + "headers": { + "Date": "Wed, 30 Sep 2020 22:23:52 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"5c55d16bf1d59fa9c42072f73eac7e9484cb6b90e83ce9fecee1423b52bf612f\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4936", + "X-RateLimit-Reset": "1601504639", + "X-RateLimit-Used": "64", + "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": "EDA6:C7ED:F35825D:1216D12F:5F750578" + } + }, + "uuid": "45d9a026-bcde-488b-847a-b9dc8566c1fe", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/repos_hub4j-test-org_github-api-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/repos_hub4j-test-org_github-api-2.json new file mode 100644 index 0000000000..ca987d69d1 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/repos_hub4j-test-org_github-api-2.json @@ -0,0 +1,46 @@ +{ + "id": "16ba50d2-75b3-4601-9693-c4e88f6b3d40", + "name": "repos_hub4j-test-org_github-api", + "request": { + "url": "/repos/hub4j-test-org/github-api", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api-2.json", + "headers": { + "Date": "Wed, 30 Sep 2020 22:23:52 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"c8ad35a8cd7fe9644ddeb7b67d913887a2344f1572826dfde27f697035eba391\"", + "Last-Modified": "Wed, 10 Jun 2020 23:27:59 GMT", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4935", + "X-RateLimit-Reset": "1601504639", + "X-RateLimit-Used": "65", + "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": "EDA6:C7ED:F3582A1:1216D168:5F750578" + } + }, + "uuid": "16ba50d2-75b3-4601-9693-c4e88f6b3d40", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/repos_hub4j-test-org_github-api_commits_b4c27fd7cdefc7ed36397e1082e38c53ba2a4477-5.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/repos_hub4j-test-org_github-api_commits_b4c27fd7cdefc7ed36397e1082e38c53ba2a4477-5.json new file mode 100644 index 0000000000..23f71e7951 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/repos_hub4j-test-org_github-api_commits_b4c27fd7cdefc7ed36397e1082e38c53ba2a4477-5.json @@ -0,0 +1,46 @@ +{ + "id": "99d81165-090c-46eb-97f2-0a10dc0bdb5f", + "name": "repos_hub4j-test-org_github-api_commits_b4c27fd7cdefc7ed36397e1082e38c53ba2a4477", + "request": { + "url": "/repos/hub4j-test-org/github-api/commits/b4c27fd7cdefc7ed36397e1082e38c53ba2a4477", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_commits_b4c27fd7cdefc7ed36397e1082e38c53ba2a4477-5.json", + "headers": { + "Date": "Wed, 30 Sep 2020 22:23:55 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"6edb0c10b12a188b27a1089d7574b4fa82524479e30cd96193f072b3b1923378\"", + "Last-Modified": "Wed, 30 Sep 2020 22:23:53 GMT", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4932", + "X-RateLimit-Reset": "1601504639", + "X-RateLimit-Used": "68", + "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": "EDA6:C7ED:F3583C5:1216D2B2:5F75057A" + } + }, + "uuid": "99d81165-090c-46eb-97f2-0a10dc0bdb5f", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/repos_hub4j-test-org_github-api_git_commits-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/repos_hub4j-test-org_github-api_git_commits-4.json new file mode 100644 index 0000000000..d398232721 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/repos_hub4j-test-org_github-api_git_commits-4.json @@ -0,0 +1,53 @@ +{ + "id": "da9ffd5e-a80c-4f7e-9e8b-967e616a0072", + "name": "repos_hub4j-test-org_github-api_git_commits", + "request": { + "url": "/repos/hub4j-test-org/github-api/git/commits", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"signature\":\"-----BEGIN PGP SIGNATURE-----\\ninvalid\\n-----END PGP SIGNATURE-----\",\"tree\":\"496d6428b9cf92981dc9495211e6e1120fb6f2ba\",\"message\":\"test signing\",\"parents\":[]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_github-api_git_commits-4.json", + "headers": { + "Date": "Wed, 30 Sep 2020 22:23:54 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "201 Created", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "\"f9e664f95ead419508ae686175cbbabdd9d4d2792863081aa1280eb2c520174d\"", + "Location": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/b4c27fd7cdefc7ed36397e1082e38c53ba2a4477", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4933", + "X-RateLimit-Reset": "1601504639", + "X-RateLimit-Used": "67", + "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": "EDA6:C7ED:F358341:1216D212:5F750579" + } + }, + "uuid": "da9ffd5e-a80c-4f7e-9e8b-967e616a0072", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/repos_hub4j-test-org_github-api_git_trees-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/repos_hub4j-test-org_github-api_git_trees-3.json new file mode 100644 index 0000000000..24ee16163b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/createSignedCommitVerifyError/mappings/repos_hub4j-test-org_github-api_git_trees-3.json @@ -0,0 +1,53 @@ +{ + "id": "901acc0b-9594-4772-90c3-ac914c289b54", + "name": "repos_hub4j-test-org_github-api_git_trees", + "request": { + "url": "/repos/hub4j-test-org/github-api/git/trees", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"tree\":[{\"path\":\"a\",\"mode\":\"100644\",\"type\":\"blob\",\"content\":\"\"}]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_github-api_git_trees-3.json", + "headers": { + "Date": "Wed, 30 Sep 2020 22:23:53 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "201 Created", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "\"c8502795da5880935eedfafda7dfc7974b605a4b0161b57b0c87f05668bb7e5d\"", + "Location": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees/496d6428b9cf92981dc9495211e6e1120fb6f2ba", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4934", + "X-RateLimit-Reset": "1601504639", + "X-RateLimit-Used": "66", + "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": "EDA6:C7ED:F3582ED:1216D1BE:5F750578" + } + }, + "uuid": "901acc0b-9594-4772-90c3-ac914c289b54", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file