From ffecc390eb1519fae64852c75566e26c117a6ee6 Mon Sep 17 00:00:00 2001 From: "M. Abdullah Onus" Date: Sun, 3 Jan 2021 15:35:00 +0300 Subject: [PATCH 1/5] Fix the type of the id parameter of Github#getRepositoryById --- src/main/java/org/kohsuke/github/GitHub.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/kohsuke/github/GitHub.java b/src/main/java/org/kohsuke/github/GitHub.java index 382d629264..ad0c54c407 100644 --- a/src/main/java/org/kohsuke/github/GitHub.java +++ b/src/main/java/org/kohsuke/github/GitHub.java @@ -558,7 +558,7 @@ public GHRepository getRepository(String name) throws IOException { * @throws IOException * the io exception */ - public GHRepository getRepositoryById(String id) throws IOException { + public GHRepository getRepositoryById(long id) throws IOException { return createRequest().withUrlPath("/repositories/" + id).fetch(GHRepository.class).wrap(this); } From 26d30663c42ffb323112e4eb37c6806c1a5d935a Mon Sep 17 00:00:00 2001 From: "M. Abdullah Onus" Date: Sun, 3 Jan 2021 15:44:28 +0300 Subject: [PATCH 2/5] Add deprecated not to Github#getRepositoryById --- src/main/java/org/kohsuke/github/GitHub.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main/java/org/kohsuke/github/GitHub.java b/src/main/java/org/kohsuke/github/GitHub.java index ad0c54c407..f69cd0b3df 100644 --- a/src/main/java/org/kohsuke/github/GitHub.java +++ b/src/main/java/org/kohsuke/github/GitHub.java @@ -549,6 +549,23 @@ public GHRepository getRepository(String name) throws IOException { return GHRepository.read(this, tokens[0], tokens[1]); } + /** + * Gets the repository object from its ID + * + * @param id + * the id + * @return the repository by id + * @throws IOException + * the io exception + * + * @deprecated Do not use this method. It was added due to misunderstanding of the type of parameter. + * Use the alternative getRepositoryById method with long type parameter instead + */ + @Deprecated + public GHRepository getRepositoryById(String id) throws IOException { + return createRequest().withUrlPath("/repositories/" + id).fetch(GHRepository.class).wrap(this); + } + /** * Gets the repository object from its ID * From b50ab56f9e86dfdf9552f74ca04f47340b590b63 Mon Sep 17 00:00:00 2001 From: "M. Abdullah Onus" Date: Sun, 3 Jan 2021 15:52:06 +0300 Subject: [PATCH 3/5] Fix linting --- src/main/java/org/kohsuke/github/GitHub.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/kohsuke/github/GitHub.java b/src/main/java/org/kohsuke/github/GitHub.java index f69cd0b3df..c19224dfb2 100644 --- a/src/main/java/org/kohsuke/github/GitHub.java +++ b/src/main/java/org/kohsuke/github/GitHub.java @@ -558,8 +558,8 @@ public GHRepository getRepository(String name) throws IOException { * @throws IOException * the io exception * - * @deprecated Do not use this method. It was added due to misunderstanding of the type of parameter. - * Use the alternative getRepositoryById method with long type parameter instead + * @deprecated Do not use this method. It was added due to misunderstanding of the type of parameter. Use the + * alternative getRepositoryById method with long type parameter instead */ @Deprecated public GHRepository getRepositoryById(String id) throws IOException { From a1461f401a56eaf4dd20c2b4092c234e6ca75636 Mon Sep 17 00:00:00 2001 From: "M. Abdullah Onus" Date: Sat, 6 Feb 2021 20:13:33 +0300 Subject: [PATCH 4/5] Update src/main/java/org/kohsuke/github/GitHub.java Co-authored-by: Liam Newman --- src/main/java/org/kohsuke/github/GitHub.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/kohsuke/github/GitHub.java b/src/main/java/org/kohsuke/github/GitHub.java index c19224dfb2..2baef5793d 100644 --- a/src/main/java/org/kohsuke/github/GitHub.java +++ b/src/main/java/org/kohsuke/github/GitHub.java @@ -558,8 +558,8 @@ public GHRepository getRepository(String name) throws IOException { * @throws IOException * the io exception * - * @deprecated Do not use this method. It was added due to misunderstanding of the type of parameter. Use the - * alternative getRepositoryById method with long type parameter instead + * @deprecated Do not use this method. It was added due to misunderstanding of the type of parameter. Use + * {@link #getRepositoryById(long)} instead */ @Deprecated public GHRepository getRepositoryById(String id) throws IOException { From 0647df2d2b3e2b0895d36c54b97aef537bed4300 Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Fri, 26 Feb 2021 13:01:43 -0800 Subject: [PATCH 5/5] Add tests for getRepositoryById --- .../github/GHContentIntegrationTest.java | 8 + ...j-test-org_ghcontentintegrationtest-2.json | 314 ++++++++++++++++++ .../__files/repositories_40763577-3.json | 314 ++++++++++++++++++ .../__files/repositories_40763577-4.json | 314 ++++++++++++++++++ .../testGetRepository/__files/user-1.json | 46 +++ ...j-test-org_ghcontentintegrationtest-2.json | 46 +++ .../mappings/repositories_40763577-3.json | 49 +++ .../mappings/repositories_40763577-4.json | 48 +++ .../testGetRepository/mappings/user-1.json | 46 +++ 9 files changed, 1185 insertions(+) create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/__files/repos_hub4j-test-org_ghcontentintegrationtest-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/__files/repositories_40763577-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/__files/repositories_40763577-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/__files/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/mappings/repos_hub4j-test-org_ghcontentintegrationtest-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/mappings/repositories_40763577-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/mappings/repositories_40763577-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/mappings/user-1.json diff --git a/src/test/java/org/kohsuke/github/GHContentIntegrationTest.java b/src/test/java/org/kohsuke/github/GHContentIntegrationTest.java index dd11e90ecf..8f870cccad 100644 --- a/src/test/java/org/kohsuke/github/GHContentIntegrationTest.java +++ b/src/test/java/org/kohsuke/github/GHContentIntegrationTest.java @@ -45,6 +45,14 @@ public void setUp() throws Exception { repo = gitHub.getRepository("hub4j-test-org/GHContentIntegrationTest"); } + @Test + public void testGetRepository() throws Exception { + GHRepository testRepo = gitHub.getRepositoryById(repo.getId()); + assertThat(testRepo.getName(), equalTo(repo.getName())); + testRepo = gitHub.getRepositoryById(Long.toString(repo.getId())); + assertThat(testRepo.getName(), equalTo(repo.getName())); + } + @Test public void testGetFileContent() throws Exception { repo = gitHub.getRepository("hub4j-test-org/GHContentIntegrationTest"); diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/__files/repos_hub4j-test-org_ghcontentintegrationtest-2.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/__files/repos_hub4j-test-org_ghcontentintegrationtest-2.json new file mode 100644 index 0000000000..8d42dbe0eb --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/__files/repos_hub4j-test-org_ghcontentintegrationtest-2.json @@ -0,0 +1,314 @@ +{ + "id": 40763577, + "node_id": "MDEwOlJlcG9zaXRvcnk0MDc2MzU3Nw==", + "name": "GHContentIntegrationTest", + "full_name": "hub4j-test-org/GHContentIntegrationTest", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHContentIntegrationTest", + "description": "Repository used for integration test of github-api", + "fork": true, + "url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/deployments", + "created_at": "2015-08-15T14:14:57Z", + "updated_at": "2020-07-02T15:49:49Z", + "pushed_at": "2020-07-02T15:49:47Z", + "git_url": "git://github.com/hub4j-test-org/GHContentIntegrationTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHContentIntegrationTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHContentIntegrationTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHContentIntegrationTest", + "homepage": null, + "size": 55, + "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": 41, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 41, + "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, + "delete_branch_on_merge": false, + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "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://avatars.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://avatars.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": 59, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 59, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "network_count": 59, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/__files/repositories_40763577-3.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/__files/repositories_40763577-3.json new file mode 100644 index 0000000000..8d42dbe0eb --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/__files/repositories_40763577-3.json @@ -0,0 +1,314 @@ +{ + "id": 40763577, + "node_id": "MDEwOlJlcG9zaXRvcnk0MDc2MzU3Nw==", + "name": "GHContentIntegrationTest", + "full_name": "hub4j-test-org/GHContentIntegrationTest", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHContentIntegrationTest", + "description": "Repository used for integration test of github-api", + "fork": true, + "url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/deployments", + "created_at": "2015-08-15T14:14:57Z", + "updated_at": "2020-07-02T15:49:49Z", + "pushed_at": "2020-07-02T15:49:47Z", + "git_url": "git://github.com/hub4j-test-org/GHContentIntegrationTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHContentIntegrationTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHContentIntegrationTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHContentIntegrationTest", + "homepage": null, + "size": 55, + "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": 41, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 41, + "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, + "delete_branch_on_merge": false, + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "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://avatars.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://avatars.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": 59, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 59, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "network_count": 59, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/__files/repositories_40763577-4.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/__files/repositories_40763577-4.json new file mode 100644 index 0000000000..8d42dbe0eb --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/__files/repositories_40763577-4.json @@ -0,0 +1,314 @@ +{ + "id": 40763577, + "node_id": "MDEwOlJlcG9zaXRvcnk0MDc2MzU3Nw==", + "name": "GHContentIntegrationTest", + "full_name": "hub4j-test-org/GHContentIntegrationTest", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHContentIntegrationTest", + "description": "Repository used for integration test of github-api", + "fork": true, + "url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/deployments", + "created_at": "2015-08-15T14:14:57Z", + "updated_at": "2020-07-02T15:49:49Z", + "pushed_at": "2020-07-02T15:49:47Z", + "git_url": "git://github.com/hub4j-test-org/GHContentIntegrationTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHContentIntegrationTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHContentIntegrationTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHContentIntegrationTest", + "homepage": null, + "size": 55, + "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": 41, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 41, + "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, + "delete_branch_on_merge": false, + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "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://avatars.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://avatars.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": 59, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 59, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "network_count": 59, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/__files/user-1.json new file mode 100644 index 0000000000..045960ff93 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/__files/user-1.json @@ -0,0 +1,46 @@ +{ + "login": "bitwiseman", + "id": 1958953, + "node_id": "MDQ6VXNlcjE5NTg5NTM=", + "avatar_url": "https://avatars.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": null, + "twitter_username": "bitwiseman", + "public_repos": 202, + "public_gists": 8, + "followers": 179, + "following": 11, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2021-02-25T18:01:06Z", + "private_gists": 19, + "total_private_repos": 18, + "owned_private_repos": 0, + "disk_usage": 33700, + "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/testGetRepository/mappings/repos_hub4j-test-org_ghcontentintegrationtest-2.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/mappings/repos_hub4j-test-org_ghcontentintegrationtest-2.json new file mode 100644 index 0000000000..cd6a24bf4f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/mappings/repos_hub4j-test-org_ghcontentintegrationtest-2.json @@ -0,0 +1,46 @@ +{ + "id": "87a2df39-f7a4-4ab1-b525-18280943063b", + "name": "repos_hub4j-test-org_ghcontentintegrationtest", + "request": { + "url": "/repos/hub4j-test-org/GHContentIntegrationTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghcontentintegrationtest-2.json", + "headers": { + "Server": "GitHub.com", + "Date": "Fri, 26 Feb 2021 21:01:20 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"81f9a2e101e45e0cf1d1a6dad02a3cd1b7fade390acc969b0be9ecf5f9baf78f\"", + "last-modified": "Thu, 02 Jul 2020 15:49:49 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4985", + "X-RateLimit-Reset": "1614376173", + "x-ratelimit-used": "15", + "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": "E09B:19E1:19D680:1BB3AE:603961A0" + } + }, + "uuid": "87a2df39-f7a4-4ab1-b525-18280943063b", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/mappings/repositories_40763577-3.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/mappings/repositories_40763577-3.json new file mode 100644 index 0000000000..5e087ef19d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/mappings/repositories_40763577-3.json @@ -0,0 +1,49 @@ +{ + "id": "e70b6cc9-f74f-4912-8d68-a7f86ac02fc5", + "name": "repositories_40763577", + "request": { + "url": "/repositories/40763577", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repositories_40763577-3.json", + "headers": { + "Server": "GitHub.com", + "Date": "Fri, 26 Feb 2021 21:01:21 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"81f9a2e101e45e0cf1d1a6dad02a3cd1b7fade390acc969b0be9ecf5f9baf78f\"", + "last-modified": "Thu, 02 Jul 2020 15:49:49 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4984", + "X-RateLimit-Reset": "1614376173", + "x-ratelimit-used": "16", + "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": "E09B:19E1:19D697:1BB3C7:603961A0" + } + }, + "uuid": "e70b6cc9-f74f-4912-8d68-a7f86ac02fc5", + "persistent": true, + "scenarioName": "scenario-1-repositories-40763577", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repositories-40763577-2", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/mappings/repositories_40763577-4.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/mappings/repositories_40763577-4.json new file mode 100644 index 0000000000..ca0f14147c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/mappings/repositories_40763577-4.json @@ -0,0 +1,48 @@ +{ + "id": "7349ea56-3864-40ac-b264-392233b2b220", + "name": "repositories_40763577", + "request": { + "url": "/repositories/40763577", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repositories_40763577-4.json", + "headers": { + "Server": "GitHub.com", + "Date": "Fri, 26 Feb 2021 21:01:21 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"81f9a2e101e45e0cf1d1a6dad02a3cd1b7fade390acc969b0be9ecf5f9baf78f\"", + "last-modified": "Thu, 02 Jul 2020 15:49:49 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4983", + "X-RateLimit-Reset": "1614376173", + "x-ratelimit-used": "17", + "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": "E09B:19E1:19D6B4:1BB3E2:603961A1" + } + }, + "uuid": "7349ea56-3864-40ac-b264-392233b2b220", + "persistent": true, + "scenarioName": "scenario-1-repositories-40763577", + "requiredScenarioState": "scenario-1-repositories-40763577-2", + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/mappings/user-1.json new file mode 100644 index 0000000000..da0c698822 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetRepository/mappings/user-1.json @@ -0,0 +1,46 @@ +{ + "id": "33bf871a-36a1-40d2-8a85-93241987a09a", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-1.json", + "headers": { + "Server": "GitHub.com", + "Date": "Fri, 26 Feb 2021 21:01:19 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"55ec271927b9b427b6dc1946829a82631f592d13765bb00fa4015784b3ef58bd\"", + "last-modified": "Thu, 25 Feb 2021 18:01:06 GMT", + "X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4989", + "X-RateLimit-Reset": "1614376173", + "x-ratelimit-used": "11", + "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": "E09B:19E1:19D5FB:1BB32E:6039619F" + } + }, + "uuid": "33bf871a-36a1-40d2-8a85-93241987a09a", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file