diff --git a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java index 6dc522c57..8aed55981 100644 --- a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java +++ b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java @@ -1034,6 +1034,15 @@ public void visitSources(SCMSourceObserver observer) throws IOException, Interru continue; // ignore repos in other orgs when using GHMyself } + try { + // We do getSource() in order to force a populate() + // populate() can sometimes fail (eg. if the repository has a DMCA), + // so if it does we skip it. + repo.getSource(); + } catch (HttpException ignored) { + continue; + } + if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchivedRepositories()) { witness.record(repo.getName(), false); listener.getLogger() @@ -1117,6 +1126,15 @@ public void visitSources(SCMSourceObserver observer) throws IOException, Interru repositories = org.listRepositories(100); } for (GHRepository repo : repositories) { + try { + // We do getSource() in order to force a populate() + // populate() can sometimes fail (eg. if the repository has a DMCA), + // so if it does we skip it. + repo.getSource(); + } catch (HttpException ignored) { + continue; + } + if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchivedRepositories()) { // exclude archived repositories witness.record(repo.getName(), false); @@ -1179,6 +1197,15 @@ public void visitSources(SCMSourceObserver observer) throws IOException, Interru if (user != null && repoOwner.equalsIgnoreCase(user.getLogin())) { listener.getLogger().format("Looking up repositories of user %s%n%n", repoOwner); for (GHRepository repo : user.listRepositories(100)) { + try { + // We do getSource() in order to force a populate() + // populate() can sometimes fail (eg. if the repository has a DMCA), + // so if it does we skip it. + repo.getSource(); + } catch (HttpException ignored) { + continue; + } + if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchivedRepositories()) { witness.record(repo.getName(), false); listener.getLogger() diff --git a/src/test/resources/api/__files/body-cloudbeers-app-store-demo.json b/src/test/resources/api/__files/body-cloudbeers-app-store-demo.json new file mode 100644 index 000000000..5b4c5240e --- /dev/null +++ b/src/test/resources/api/__files/body-cloudbeers-app-store-demo.json @@ -0,0 +1,350 @@ +{ + "id": 67571638, + "node_id": "MDEwOlJlcG9zaXRvcnk2NzU3MTYzOA==", + "name": "app-store-demo", + "full_name": "cloudbeers/app-store-demo", + "private": false, + "owner": { + "login": "cloudbeers", + "id": 4181899, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjQxODE4OTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/4181899?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/cloudbeers", + "html_url": "https://github.com/cloudbeers", + "followers_url": "https://api.github.com/users/cloudbeers/followers", + "following_url": "https://api.github.com/users/cloudbeers/following{/other_user}", + "gists_url": "https://api.github.com/users/cloudbeers/gists{/gist_id}", + "starred_url": "https://api.github.com/users/cloudbeers/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/cloudbeers/subscriptions", + "organizations_url": "https://api.github.com/users/cloudbeers/orgs", + "repos_url": "https://api.github.com/users/cloudbeers/repos", + "events_url": "https://api.github.com/users/cloudbeers/events{/privacy}", + "received_events_url": "https://api.github.com/users/cloudbeers/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/cloudbeers/app-store-demo", + "description": "A demo repository", + "fork": true, + "url": "https://api.github.com/repos/cloudbeers/app-store-demo", + "forks_url": "https://api.github.com/repos/cloudbeers/app-store-demo/forks", + "keys_url": "https://api.github.com/repos/cloudbeers/app-store-demo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/cloudbeers/app-store-demo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/cloudbeers/app-store-demo/teams", + "hooks_url": "https://api.github.com/repos/cloudbeers/app-store-demo/hooks", + "issue_events_url": "https://api.github.com/repos/cloudbeers/app-store-demo/issues/events{/number}", + "events_url": "https://api.github.com/repos/cloudbeers/app-store-demo/events", + "assignees_url": "https://api.github.com/repos/cloudbeers/app-store-demo/assignees{/user}", + "branches_url": "https://api.github.com/repos/cloudbeers/app-store-demo/branches{/branch}", + "tags_url": "https://api.github.com/repos/cloudbeers/app-store-demo/tags", + "blobs_url": "https://api.github.com/repos/cloudbeers/app-store-demo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/cloudbeers/app-store-demo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/cloudbeers/app-store-demo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/cloudbeers/app-store-demo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/cloudbeers/app-store-demo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/cloudbeers/app-store-demo/languages", + "stargazers_url": "https://api.github.com/repos/cloudbeers/app-store-demo/stargazers", + "contributors_url": "https://api.github.com/repos/cloudbeers/app-store-demo/contributors", + "subscribers_url": "https://api.github.com/repos/cloudbeers/app-store-demo/subscribers", + "subscription_url": "https://api.github.com/repos/cloudbeers/app-store-demo/subscription", + "commits_url": "https://api.github.com/repos/cloudbeers/app-store-demo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/cloudbeers/app-store-demo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/cloudbeers/app-store-demo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/cloudbeers/app-store-demo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/cloudbeers/app-store-demo/contents/{+path}", + "compare_url": "https://api.github.com/repos/cloudbeers/app-store-demo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/cloudbeers/app-store-demo/merges", + "archive_url": "https://api.github.com/repos/cloudbeers/app-store-demo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/cloudbeers/app-store-demo/downloads", + "issues_url": "https://api.github.com/repos/cloudbeers/app-store-demo/issues{/number}", + "pulls_url": "https://api.github.com/repos/cloudbeers/app-store-demo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/cloudbeers/app-store-demo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/cloudbeers/app-store-demo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/cloudbeers/app-store-demo/labels{/name}", + "releases_url": "https://api.github.com/repos/cloudbeers/app-store-demo/releases{/id}", + "deployments_url": "https://api.github.com/repos/cloudbeers/app-store-demo/deployments", + "created_at": "2016-09-07T04:20:14Z", + "updated_at": "2016-09-07T04:20:15Z", + "pushed_at": "2017-02-07T21:04:41Z", + "git_url": "git://github.com/cloudbeers/app-store-demo.git", + "ssh_url": "git@github.com:cloudbeers/app-store-demo.git", + "clone_url": "https://github.com/cloudbeers/app-store-demo.git", + "svn_url": "https://github.com/cloudbeers/app-store-demo", + "homepage": null, + "size": 19, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Java", + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": { + "key": "other", + "name": "Other", + "spdx_id": "NOASSERTION", + "url": null, + "node_id": "MDc6TGljZW5zZTA=" + }, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + + ], + "visibility": "public", + "forks": 1, + "open_issues": 1, + "watchers": 0, + "default_branch": "master", + "temp_clone_token": null, + "custom_properties": { + + }, + "organization": { + "login": "cloudbeers", + "id": 4181899, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjQxODE4OTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/4181899?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/cloudbeers", + "html_url": "https://github.com/cloudbeers", + "followers_url": "https://api.github.com/users/cloudbeers/followers", + "following_url": "https://api.github.com/users/cloudbeers/following{/other_user}", + "gists_url": "https://api.github.com/users/cloudbeers/gists{/gist_id}", + "starred_url": "https://api.github.com/users/cloudbeers/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/cloudbeers/subscriptions", + "organizations_url": "https://api.github.com/users/cloudbeers/orgs", + "repos_url": "https://api.github.com/users/cloudbeers/repos", + "events_url": "https://api.github.com/users/cloudbeers/events{/privacy}", + "received_events_url": "https://api.github.com/users/cloudbeers/received_events", + "type": "Organization", + "site_admin": false + }, + "parent": { + "id": 67481301, + "node_id": "MDEwOlJlcG9zaXRvcnk2NzQ4MTMwMQ==", + "name": "app-store-demo", + "full_name": "i386/app-store-demo", + "private": false, + "owner": { + "login": "i386", + "id": 50156, + "node_id": "MDQ6VXNlcjUwMTU2", + "avatar_url": "https://avatars.githubusercontent.com/u/50156?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/i386", + "html_url": "https://github.com/i386", + "followers_url": "https://api.github.com/users/i386/followers", + "following_url": "https://api.github.com/users/i386/following{/other_user}", + "gists_url": "https://api.github.com/users/i386/gists{/gist_id}", + "starred_url": "https://api.github.com/users/i386/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/i386/subscriptions", + "organizations_url": "https://api.github.com/users/i386/orgs", + "repos_url": "https://api.github.com/users/i386/repos", + "events_url": "https://api.github.com/users/i386/events{/privacy}", + "received_events_url": "https://api.github.com/users/i386/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/i386/app-store-demo", + "description": "A demo repository", + "fork": false, + "url": "https://api.github.com/repos/i386/app-store-demo", + "forks_url": "https://api.github.com/repos/i386/app-store-demo/forks", + "keys_url": "https://api.github.com/repos/i386/app-store-demo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/i386/app-store-demo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/i386/app-store-demo/teams", + "hooks_url": "https://api.github.com/repos/i386/app-store-demo/hooks", + "issue_events_url": "https://api.github.com/repos/i386/app-store-demo/issues/events{/number}", + "events_url": "https://api.github.com/repos/i386/app-store-demo/events", + "assignees_url": "https://api.github.com/repos/i386/app-store-demo/assignees{/user}", + "branches_url": "https://api.github.com/repos/i386/app-store-demo/branches{/branch}", + "tags_url": "https://api.github.com/repos/i386/app-store-demo/tags", + "blobs_url": "https://api.github.com/repos/i386/app-store-demo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/i386/app-store-demo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/i386/app-store-demo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/i386/app-store-demo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/i386/app-store-demo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/i386/app-store-demo/languages", + "stargazers_url": "https://api.github.com/repos/i386/app-store-demo/stargazers", + "contributors_url": "https://api.github.com/repos/i386/app-store-demo/contributors", + "subscribers_url": "https://api.github.com/repos/i386/app-store-demo/subscribers", + "subscription_url": "https://api.github.com/repos/i386/app-store-demo/subscription", + "commits_url": "https://api.github.com/repos/i386/app-store-demo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/i386/app-store-demo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/i386/app-store-demo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/i386/app-store-demo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/i386/app-store-demo/contents/{+path}", + "compare_url": "https://api.github.com/repos/i386/app-store-demo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/i386/app-store-demo/merges", + "archive_url": "https://api.github.com/repos/i386/app-store-demo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/i386/app-store-demo/downloads", + "issues_url": "https://api.github.com/repos/i386/app-store-demo/issues{/number}", + "pulls_url": "https://api.github.com/repos/i386/app-store-demo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/i386/app-store-demo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/i386/app-store-demo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/i386/app-store-demo/labels{/name}", + "releases_url": "https://api.github.com/repos/i386/app-store-demo/releases{/id}", + "deployments_url": "https://api.github.com/repos/i386/app-store-demo/deployments", + "created_at": "2016-09-06T06:48:24Z", + "updated_at": "2017-01-16T04:02:45Z", + "pushed_at": "2017-11-23T00:38:11Z", + "git_url": "git://github.com/i386/app-store-demo.git", + "ssh_url": "git@github.com:i386/app-store-demo.git", + "clone_url": "https://github.com/i386/app-store-demo.git", + "svn_url": "https://github.com/i386/app-store-demo", + "homepage": null, + "size": 25, + "stargazers_count": 1, + "watchers_count": 1, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 27, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 4, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + + ], + "visibility": "public", + "forks": 27, + "open_issues": 4, + "watchers": 1, + "default_branch": "master" + }, + "source": { + "id": 67481301, + "node_id": "MDEwOlJlcG9zaXRvcnk2NzQ4MTMwMQ==", + "name": "app-store-demo", + "full_name": "i386/app-store-demo", + "private": false, + "owner": { + "login": "i386", + "id": 50156, + "node_id": "MDQ6VXNlcjUwMTU2", + "avatar_url": "https://avatars.githubusercontent.com/u/50156?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/i386", + "html_url": "https://github.com/i386", + "followers_url": "https://api.github.com/users/i386/followers", + "following_url": "https://api.github.com/users/i386/following{/other_user}", + "gists_url": "https://api.github.com/users/i386/gists{/gist_id}", + "starred_url": "https://api.github.com/users/i386/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/i386/subscriptions", + "organizations_url": "https://api.github.com/users/i386/orgs", + "repos_url": "https://api.github.com/users/i386/repos", + "events_url": "https://api.github.com/users/i386/events{/privacy}", + "received_events_url": "https://api.github.com/users/i386/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/i386/app-store-demo", + "description": "A demo repository", + "fork": false, + "url": "https://api.github.com/repos/i386/app-store-demo", + "forks_url": "https://api.github.com/repos/i386/app-store-demo/forks", + "keys_url": "https://api.github.com/repos/i386/app-store-demo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/i386/app-store-demo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/i386/app-store-demo/teams", + "hooks_url": "https://api.github.com/repos/i386/app-store-demo/hooks", + "issue_events_url": "https://api.github.com/repos/i386/app-store-demo/issues/events{/number}", + "events_url": "https://api.github.com/repos/i386/app-store-demo/events", + "assignees_url": "https://api.github.com/repos/i386/app-store-demo/assignees{/user}", + "branches_url": "https://api.github.com/repos/i386/app-store-demo/branches{/branch}", + "tags_url": "https://api.github.com/repos/i386/app-store-demo/tags", + "blobs_url": "https://api.github.com/repos/i386/app-store-demo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/i386/app-store-demo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/i386/app-store-demo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/i386/app-store-demo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/i386/app-store-demo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/i386/app-store-demo/languages", + "stargazers_url": "https://api.github.com/repos/i386/app-store-demo/stargazers", + "contributors_url": "https://api.github.com/repos/i386/app-store-demo/contributors", + "subscribers_url": "https://api.github.com/repos/i386/app-store-demo/subscribers", + "subscription_url": "https://api.github.com/repos/i386/app-store-demo/subscription", + "commits_url": "https://api.github.com/repos/i386/app-store-demo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/i386/app-store-demo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/i386/app-store-demo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/i386/app-store-demo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/i386/app-store-demo/contents/{+path}", + "compare_url": "https://api.github.com/repos/i386/app-store-demo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/i386/app-store-demo/merges", + "archive_url": "https://api.github.com/repos/i386/app-store-demo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/i386/app-store-demo/downloads", + "issues_url": "https://api.github.com/repos/i386/app-store-demo/issues{/number}", + "pulls_url": "https://api.github.com/repos/i386/app-store-demo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/i386/app-store-demo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/i386/app-store-demo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/i386/app-store-demo/labels{/name}", + "releases_url": "https://api.github.com/repos/i386/app-store-demo/releases{/id}", + "deployments_url": "https://api.github.com/repos/i386/app-store-demo/deployments", + "created_at": "2016-09-06T06:48:24Z", + "updated_at": "2017-01-16T04:02:45Z", + "pushed_at": "2017-11-23T00:38:11Z", + "git_url": "git://github.com/i386/app-store-demo.git", + "ssh_url": "git@github.com:i386/app-store-demo.git", + "clone_url": "https://github.com/i386/app-store-demo.git", + "svn_url": "https://github.com/i386/app-store-demo", + "homepage": null, + "size": 25, + "stargazers_count": 1, + "watchers_count": 1, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 27, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 4, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + + ], + "visibility": "public", + "forks": 27, + "open_issues": 4, + "watchers": 1, + "default_branch": "master" + }, + "network_count": 27, + "subscribers_count": 1 +} diff --git a/src/test/resources/api/__files/body-cloudbeers-hellonode.json b/src/test/resources/api/__files/body-cloudbeers-hellonode.json new file mode 100644 index 000000000..c736af928 --- /dev/null +++ b/src/test/resources/api/__files/body-cloudbeers-hellonode.json @@ -0,0 +1,332 @@ +{ + "id": 72910233, + "node_id": "MDEwOlJlcG9zaXRvcnk3MjkxMDIzMw==", + "name": "hellonode", + "full_name": "cloudbeers/hellonode", + "private": false, + "owner": { + "login": "cloudbeers", + "id": 4181899, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjQxODE4OTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/4181899?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/cloudbeers", + "html_url": "https://github.com/cloudbeers", + "followers_url": "https://api.github.com/users/cloudbeers/followers", + "following_url": "https://api.github.com/users/cloudbeers/following{/other_user}", + "gists_url": "https://api.github.com/users/cloudbeers/gists{/gist_id}", + "starred_url": "https://api.github.com/users/cloudbeers/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/cloudbeers/subscriptions", + "organizations_url": "https://api.github.com/users/cloudbeers/orgs", + "repos_url": "https://api.github.com/users/cloudbeers/repos", + "events_url": "https://api.github.com/users/cloudbeers/events{/privacy}", + "received_events_url": "https://api.github.com/users/cloudbeers/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/cloudbeers/hellonode", + "description": "A very small node example useful for a variety of purposes", + "fork": true, + "url": "https://api.github.com/repos/cloudbeers/hellonode", + "forks_url": "https://api.github.com/repos/cloudbeers/hellonode/forks", + "keys_url": "https://api.github.com/repos/cloudbeers/hellonode/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/cloudbeers/hellonode/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/cloudbeers/hellonode/teams", + "hooks_url": "https://api.github.com/repos/cloudbeers/hellonode/hooks", + "issue_events_url": "https://api.github.com/repos/cloudbeers/hellonode/issues/events{/number}", + "events_url": "https://api.github.com/repos/cloudbeers/hellonode/events", + "assignees_url": "https://api.github.com/repos/cloudbeers/hellonode/assignees{/user}", + "branches_url": "https://api.github.com/repos/cloudbeers/hellonode/branches{/branch}", + "tags_url": "https://api.github.com/repos/cloudbeers/hellonode/tags", + "blobs_url": "https://api.github.com/repos/cloudbeers/hellonode/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/cloudbeers/hellonode/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/cloudbeers/hellonode/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/cloudbeers/hellonode/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/cloudbeers/hellonode/statuses/{sha}", + "languages_url": "https://api.github.com/repos/cloudbeers/hellonode/languages", + "stargazers_url": "https://api.github.com/repos/cloudbeers/hellonode/stargazers", + "contributors_url": "https://api.github.com/repos/cloudbeers/hellonode/contributors", + "subscribers_url": "https://api.github.com/repos/cloudbeers/hellonode/subscribers", + "subscription_url": "https://api.github.com/repos/cloudbeers/hellonode/subscription", + "commits_url": "https://api.github.com/repos/cloudbeers/hellonode/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/cloudbeers/hellonode/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/cloudbeers/hellonode/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/cloudbeers/hellonode/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/cloudbeers/hellonode/contents/{+path}", + "compare_url": "https://api.github.com/repos/cloudbeers/hellonode/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/cloudbeers/hellonode/merges", + "archive_url": "https://api.github.com/repos/cloudbeers/hellonode/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/cloudbeers/hellonode/downloads", + "issues_url": "https://api.github.com/repos/cloudbeers/hellonode/issues{/number}", + "pulls_url": "https://api.github.com/repos/cloudbeers/hellonode/pulls{/number}", + "milestones_url": "https://api.github.com/repos/cloudbeers/hellonode/milestones{/number}", + "notifications_url": "https://api.github.com/repos/cloudbeers/hellonode/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/cloudbeers/hellonode/labels{/name}", + "releases_url": "https://api.github.com/repos/cloudbeers/hellonode/releases{/id}", + "deployments_url": "https://api.github.com/repos/cloudbeers/hellonode/deployments", + "created_at": "2016-11-05T06:52:01Z", + "updated_at": "2016-11-05T06:52:02Z", + "pushed_at": "2016-11-05T09:31:05Z", + "git_url": "git://github.com/cloudbeers/hellonode.git", + "ssh_url": "git@github.com:cloudbeers/hellonode.git", + "clone_url": "https://github.com/cloudbeers/hellonode.git", + "svn_url": "https://github.com/cloudbeers/hellonode", + "homepage": "", + "size": 9, + "stargazers_count": 0, + "watchers_count": 0, + "language": "JavaScript", + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 3, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + + ], + "visibility": "public", + "forks": 0, + "open_issues": 3, + "watchers": 0, + "default_branch": "master", + "temp_clone_token": null, + "custom_properties": { + + }, + "organization": { + "login": "cloudbeers", + "id": 4181899, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjQxODE4OTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/4181899?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/cloudbeers", + "html_url": "https://github.com/cloudbeers", + "followers_url": "https://api.github.com/users/cloudbeers/followers", + "following_url": "https://api.github.com/users/cloudbeers/following{/other_user}", + "gists_url": "https://api.github.com/users/cloudbeers/gists{/gist_id}", + "starred_url": "https://api.github.com/users/cloudbeers/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/cloudbeers/subscriptions", + "organizations_url": "https://api.github.com/users/cloudbeers/orgs", + "repos_url": "https://api.github.com/users/cloudbeers/repos", + "events_url": "https://api.github.com/users/cloudbeers/events{/privacy}", + "received_events_url": "https://api.github.com/users/cloudbeers/received_events", + "type": "Organization", + "site_admin": false + }, + "parent": { + "id": 53987838, + "node_id": "MDEwOlJlcG9zaXRvcnk1Mzk4NzgzOA==", + "name": "hellonode", + "full_name": "i386/hellonode", + "private": false, + "owner": { + "login": "i386", + "id": 50156, + "node_id": "MDQ6VXNlcjUwMTU2", + "avatar_url": "https://avatars.githubusercontent.com/u/50156?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/i386", + "html_url": "https://github.com/i386", + "followers_url": "https://api.github.com/users/i386/followers", + "following_url": "https://api.github.com/users/i386/following{/other_user}", + "gists_url": "https://api.github.com/users/i386/gists{/gist_id}", + "starred_url": "https://api.github.com/users/i386/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/i386/subscriptions", + "organizations_url": "https://api.github.com/users/i386/orgs", + "repos_url": "https://api.github.com/users/i386/repos", + "events_url": "https://api.github.com/users/i386/events{/privacy}", + "received_events_url": "https://api.github.com/users/i386/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/i386/hellonode", + "description": "A very small node example useful for a variety of purposes", + "fork": false, + "url": "https://api.github.com/repos/i386/hellonode", + "forks_url": "https://api.github.com/repos/i386/hellonode/forks", + "keys_url": "https://api.github.com/repos/i386/hellonode/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/i386/hellonode/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/i386/hellonode/teams", + "hooks_url": "https://api.github.com/repos/i386/hellonode/hooks", + "issue_events_url": "https://api.github.com/repos/i386/hellonode/issues/events{/number}", + "events_url": "https://api.github.com/repos/i386/hellonode/events", + "assignees_url": "https://api.github.com/repos/i386/hellonode/assignees{/user}", + "branches_url": "https://api.github.com/repos/i386/hellonode/branches{/branch}", + "tags_url": "https://api.github.com/repos/i386/hellonode/tags", + "blobs_url": "https://api.github.com/repos/i386/hellonode/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/i386/hellonode/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/i386/hellonode/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/i386/hellonode/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/i386/hellonode/statuses/{sha}", + "languages_url": "https://api.github.com/repos/i386/hellonode/languages", + "stargazers_url": "https://api.github.com/repos/i386/hellonode/stargazers", + "contributors_url": "https://api.github.com/repos/i386/hellonode/contributors", + "subscribers_url": "https://api.github.com/repos/i386/hellonode/subscribers", + "subscription_url": "https://api.github.com/repos/i386/hellonode/subscription", + "commits_url": "https://api.github.com/repos/i386/hellonode/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/i386/hellonode/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/i386/hellonode/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/i386/hellonode/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/i386/hellonode/contents/{+path}", + "compare_url": "https://api.github.com/repos/i386/hellonode/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/i386/hellonode/merges", + "archive_url": "https://api.github.com/repos/i386/hellonode/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/i386/hellonode/downloads", + "issues_url": "https://api.github.com/repos/i386/hellonode/issues{/number}", + "pulls_url": "https://api.github.com/repos/i386/hellonode/pulls{/number}", + "milestones_url": "https://api.github.com/repos/i386/hellonode/milestones{/number}", + "notifications_url": "https://api.github.com/repos/i386/hellonode/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/i386/hellonode/labels{/name}", + "releases_url": "https://api.github.com/repos/i386/hellonode/releases{/id}", + "deployments_url": "https://api.github.com/repos/i386/hellonode/deployments", + "created_at": "2016-03-16T00:16:50Z", + "updated_at": "2016-11-23T07:46:54Z", + "pushed_at": "2018-01-10T01:58:44Z", + "git_url": "git://github.com/i386/hellonode.git", + "ssh_url": "git@github.com:i386/hellonode.git", + "clone_url": "https://github.com/i386/hellonode.git", + "svn_url": "https://github.com/i386/hellonode", + "homepage": "", + "size": 12, + "stargazers_count": 0, + "watchers_count": 0, + "language": "JavaScript", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + + ], + "visibility": "public", + "forks": 1, + "open_issues": 1, + "watchers": 0, + "default_branch": "master" + }, + "source": { + "id": 53987838, + "node_id": "MDEwOlJlcG9zaXRvcnk1Mzk4NzgzOA==", + "name": "hellonode", + "full_name": "i386/hellonode", + "private": false, + "owner": { + "login": "i386", + "id": 50156, + "node_id": "MDQ6VXNlcjUwMTU2", + "avatar_url": "https://avatars.githubusercontent.com/u/50156?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/i386", + "html_url": "https://github.com/i386", + "followers_url": "https://api.github.com/users/i386/followers", + "following_url": "https://api.github.com/users/i386/following{/other_user}", + "gists_url": "https://api.github.com/users/i386/gists{/gist_id}", + "starred_url": "https://api.github.com/users/i386/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/i386/subscriptions", + "organizations_url": "https://api.github.com/users/i386/orgs", + "repos_url": "https://api.github.com/users/i386/repos", + "events_url": "https://api.github.com/users/i386/events{/privacy}", + "received_events_url": "https://api.github.com/users/i386/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/i386/hellonode", + "description": "A very small node example useful for a variety of purposes", + "fork": false, + "url": "https://api.github.com/repos/i386/hellonode", + "forks_url": "https://api.github.com/repos/i386/hellonode/forks", + "keys_url": "https://api.github.com/repos/i386/hellonode/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/i386/hellonode/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/i386/hellonode/teams", + "hooks_url": "https://api.github.com/repos/i386/hellonode/hooks", + "issue_events_url": "https://api.github.com/repos/i386/hellonode/issues/events{/number}", + "events_url": "https://api.github.com/repos/i386/hellonode/events", + "assignees_url": "https://api.github.com/repos/i386/hellonode/assignees{/user}", + "branches_url": "https://api.github.com/repos/i386/hellonode/branches{/branch}", + "tags_url": "https://api.github.com/repos/i386/hellonode/tags", + "blobs_url": "https://api.github.com/repos/i386/hellonode/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/i386/hellonode/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/i386/hellonode/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/i386/hellonode/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/i386/hellonode/statuses/{sha}", + "languages_url": "https://api.github.com/repos/i386/hellonode/languages", + "stargazers_url": "https://api.github.com/repos/i386/hellonode/stargazers", + "contributors_url": "https://api.github.com/repos/i386/hellonode/contributors", + "subscribers_url": "https://api.github.com/repos/i386/hellonode/subscribers", + "subscription_url": "https://api.github.com/repos/i386/hellonode/subscription", + "commits_url": "https://api.github.com/repos/i386/hellonode/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/i386/hellonode/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/i386/hellonode/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/i386/hellonode/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/i386/hellonode/contents/{+path}", + "compare_url": "https://api.github.com/repos/i386/hellonode/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/i386/hellonode/merges", + "archive_url": "https://api.github.com/repos/i386/hellonode/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/i386/hellonode/downloads", + "issues_url": "https://api.github.com/repos/i386/hellonode/issues{/number}", + "pulls_url": "https://api.github.com/repos/i386/hellonode/pulls{/number}", + "milestones_url": "https://api.github.com/repos/i386/hellonode/milestones{/number}", + "notifications_url": "https://api.github.com/repos/i386/hellonode/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/i386/hellonode/labels{/name}", + "releases_url": "https://api.github.com/repos/i386/hellonode/releases{/id}", + "deployments_url": "https://api.github.com/repos/i386/hellonode/deployments", + "created_at": "2016-03-16T00:16:50Z", + "updated_at": "2016-11-23T07:46:54Z", + "pushed_at": "2018-01-10T01:58:44Z", + "git_url": "git://github.com/i386/hellonode.git", + "ssh_url": "git@github.com:i386/hellonode.git", + "clone_url": "https://github.com/i386/hellonode.git", + "svn_url": "https://github.com/i386/hellonode", + "homepage": "", + "size": 12, + "stargazers_count": 0, + "watchers_count": 0, + "language": "JavaScript", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + + ], + "visibility": "public", + "forks": 1, + "open_issues": 1, + "watchers": 0, + "default_branch": "master" + }, + "network_count": 1, + "subscribers_count": 1 +} diff --git a/src/test/resources/api/__files/body-cloudbeers-pipeline-model-definition-plugin.json b/src/test/resources/api/__files/body-cloudbeers-pipeline-model-definition-plugin.json new file mode 100644 index 000000000..ee352142c --- /dev/null +++ b/src/test/resources/api/__files/body-cloudbeers-pipeline-model-definition-plugin.json @@ -0,0 +1,334 @@ +{ + "id": 73097623, + "node_id": "MDEwOlJlcG9zaXRvcnk3MzA5NzYyMw==", + "name": "pipeline-model-definition-plugin", + "full_name": "cloudbeers/pipeline-model-definition-plugin", + "private": false, + "owner": { + "login": "cloudbeers", + "id": 4181899, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjQxODE4OTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/4181899?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/cloudbeers", + "html_url": "https://github.com/cloudbeers", + "followers_url": "https://api.github.com/users/cloudbeers/followers", + "following_url": "https://api.github.com/users/cloudbeers/following{/other_user}", + "gists_url": "https://api.github.com/users/cloudbeers/gists{/gist_id}", + "starred_url": "https://api.github.com/users/cloudbeers/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/cloudbeers/subscriptions", + "organizations_url": "https://api.github.com/users/cloudbeers/orgs", + "repos_url": "https://api.github.com/users/cloudbeers/repos", + "events_url": "https://api.github.com/users/cloudbeers/events{/privacy}", + "received_events_url": "https://api.github.com/users/cloudbeers/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/cloudbeers/pipeline-model-definition-plugin", + "description": null, + "fork": true, + "url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin", + "forks_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/forks", + "keys_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/teams", + "hooks_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/hooks", + "issue_events_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/issues/events{/number}", + "events_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/events", + "assignees_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/assignees{/user}", + "branches_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/branches{/branch}", + "tags_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/tags", + "blobs_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/statuses/{sha}", + "languages_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/languages", + "stargazers_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/stargazers", + "contributors_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/contributors", + "subscribers_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/subscribers", + "subscription_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/subscription", + "commits_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/contents/{+path}", + "compare_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/merges", + "archive_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/downloads", + "issues_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/issues{/number}", + "pulls_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/pulls{/number}", + "milestones_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/milestones{/number}", + "notifications_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/labels{/name}", + "releases_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/releases{/id}", + "deployments_url": "https://api.github.com/repos/cloudbeers/pipeline-model-definition-plugin/deployments", + "created_at": "2016-11-07T16:21:06Z", + "updated_at": "2016-11-07T16:21:08Z", + "pushed_at": "2016-11-07T16:42:09Z", + "git_url": "git://github.com/cloudbeers/pipeline-model-definition-plugin.git", + "ssh_url": "git@github.com:cloudbeers/pipeline-model-definition-plugin.git", + "clone_url": "https://github.com/cloudbeers/pipeline-model-definition-plugin.git", + "svn_url": "https://github.com/cloudbeers/pipeline-model-definition-plugin", + "homepage": "", + "size": 659, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Groovy", + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 2, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + + ], + "visibility": "public", + "forks": 2, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "temp_clone_token": null, + "custom_properties": { + + }, + "organization": { + "login": "cloudbeers", + "id": 4181899, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjQxODE4OTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/4181899?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/cloudbeers", + "html_url": "https://github.com/cloudbeers", + "followers_url": "https://api.github.com/users/cloudbeers/followers", + "following_url": "https://api.github.com/users/cloudbeers/following{/other_user}", + "gists_url": "https://api.github.com/users/cloudbeers/gists{/gist_id}", + "starred_url": "https://api.github.com/users/cloudbeers/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/cloudbeers/subscriptions", + "organizations_url": "https://api.github.com/users/cloudbeers/orgs", + "repos_url": "https://api.github.com/users/cloudbeers/repos", + "events_url": "https://api.github.com/users/cloudbeers/events{/privacy}", + "received_events_url": "https://api.github.com/users/cloudbeers/received_events", + "type": "Organization", + "site_admin": false + }, + "parent": { + "id": 66677338, + "node_id": "MDEwOlJlcG9zaXRvcnk2NjY3NzMzOA==", + "name": "pipeline-model-definition-plugin", + "full_name": "jenkinsci/pipeline-model-definition-plugin", + "private": false, + "owner": { + "login": "jenkinsci", + "id": 107424, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjEwNzQyNA==", + "avatar_url": "https://avatars.githubusercontent.com/u/107424?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/jenkinsci", + "html_url": "https://github.com/jenkinsci", + "followers_url": "https://api.github.com/users/jenkinsci/followers", + "following_url": "https://api.github.com/users/jenkinsci/following{/other_user}", + "gists_url": "https://api.github.com/users/jenkinsci/gists{/gist_id}", + "starred_url": "https://api.github.com/users/jenkinsci/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/jenkinsci/subscriptions", + "organizations_url": "https://api.github.com/users/jenkinsci/orgs", + "repos_url": "https://api.github.com/users/jenkinsci/repos", + "events_url": "https://api.github.com/users/jenkinsci/events{/privacy}", + "received_events_url": "https://api.github.com/users/jenkinsci/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/jenkinsci/pipeline-model-definition-plugin", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin", + "forks_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/forks", + "keys_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/teams", + "hooks_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/hooks", + "issue_events_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues/events{/number}", + "events_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/events", + "assignees_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/assignees{/user}", + "branches_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/branches{/branch}", + "tags_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/tags", + "blobs_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/statuses/{sha}", + "languages_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/languages", + "stargazers_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/stargazers", + "contributors_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/contributors", + "subscribers_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/subscribers", + "subscription_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/subscription", + "commits_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/contents/{+path}", + "compare_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/merges", + "archive_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/downloads", + "issues_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues{/number}", + "pulls_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls{/number}", + "milestones_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/milestones{/number}", + "notifications_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/labels{/name}", + "releases_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/releases{/id}", + "deployments_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/deployments", + "created_at": "2016-08-26T20:28:39Z", + "updated_at": "2024-04-24T15:35:13Z", + "pushed_at": "2024-06-10T08:45:53Z", + "git_url": "git://github.com/jenkinsci/pipeline-model-definition-plugin.git", + "ssh_url": "git@github.com:jenkinsci/pipeline-model-definition-plugin.git", + "clone_url": "https://github.com/jenkinsci/pipeline-model-definition-plugin.git", + "svn_url": "https://github.com/jenkinsci/pipeline-model-definition-plugin", + "homepage": "https://plugins.jenkins.io/pipeline-model-definition", + "size": 4923, + "stargazers_count": 559, + "watchers_count": 559, + "language": "Groovy", + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 242, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 14, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + "declarative-pipeline", + "jenkins-pipeline" + ], + "visibility": "public", + "forks": 242, + "open_issues": 14, + "watchers": 559, + "default_branch": "master" + }, + "source": { + "id": 66677338, + "node_id": "MDEwOlJlcG9zaXRvcnk2NjY3NzMzOA==", + "name": "pipeline-model-definition-plugin", + "full_name": "jenkinsci/pipeline-model-definition-plugin", + "private": false, + "owner": { + "login": "jenkinsci", + "id": 107424, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjEwNzQyNA==", + "avatar_url": "https://avatars.githubusercontent.com/u/107424?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/jenkinsci", + "html_url": "https://github.com/jenkinsci", + "followers_url": "https://api.github.com/users/jenkinsci/followers", + "following_url": "https://api.github.com/users/jenkinsci/following{/other_user}", + "gists_url": "https://api.github.com/users/jenkinsci/gists{/gist_id}", + "starred_url": "https://api.github.com/users/jenkinsci/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/jenkinsci/subscriptions", + "organizations_url": "https://api.github.com/users/jenkinsci/orgs", + "repos_url": "https://api.github.com/users/jenkinsci/repos", + "events_url": "https://api.github.com/users/jenkinsci/events{/privacy}", + "received_events_url": "https://api.github.com/users/jenkinsci/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/jenkinsci/pipeline-model-definition-plugin", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin", + "forks_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/forks", + "keys_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/teams", + "hooks_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/hooks", + "issue_events_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues/events{/number}", + "events_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/events", + "assignees_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/assignees{/user}", + "branches_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/branches{/branch}", + "tags_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/tags", + "blobs_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/statuses/{sha}", + "languages_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/languages", + "stargazers_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/stargazers", + "contributors_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/contributors", + "subscribers_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/subscribers", + "subscription_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/subscription", + "commits_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/contents/{+path}", + "compare_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/merges", + "archive_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/downloads", + "issues_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues{/number}", + "pulls_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls{/number}", + "milestones_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/milestones{/number}", + "notifications_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/labels{/name}", + "releases_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/releases{/id}", + "deployments_url": "https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/deployments", + "created_at": "2016-08-26T20:28:39Z", + "updated_at": "2024-04-24T15:35:13Z", + "pushed_at": "2024-06-10T08:45:53Z", + "git_url": "git://github.com/jenkinsci/pipeline-model-definition-plugin.git", + "ssh_url": "git@github.com:jenkinsci/pipeline-model-definition-plugin.git", + "clone_url": "https://github.com/jenkinsci/pipeline-model-definition-plugin.git", + "svn_url": "https://github.com/jenkinsci/pipeline-model-definition-plugin", + "homepage": "https://plugins.jenkins.io/pipeline-model-definition", + "size": 4923, + "stargazers_count": 559, + "watchers_count": 559, + "language": "Groovy", + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 242, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 14, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + "declarative-pipeline", + "jenkins-pipeline" + ], + "visibility": "public", + "forks": 242, + "open_issues": 14, + "watchers": 559, + "default_branch": "master" + }, + "network_count": 242, + "subscribers_count": 1 +} diff --git a/src/test/resources/api/mappings/mapping-cloudbeers-app-store-demo.json b/src/test/resources/api/mappings/mapping-cloudbeers-app-store-demo.json new file mode 100644 index 000000000..2e68e75f0 --- /dev/null +++ b/src/test/resources/api/mappings/mapping-cloudbeers-app-store-demo.json @@ -0,0 +1,34 @@ +{ + "request": { + "url": "/repos/cloudbeers/app-store-demo", + "method": "GET" + }, + "response": { + "status": 200, + "bodyFileName": "body-cloudbeers-app-store-demo.json", + "headers": { + "Server": "GitHub.com", + "Date": "Wed, 12 Jun 2024 00:09:01 GMT", + "Content-Type": "application/json; charset=utf-8", + "Transfer-Encoding": "chunked", + "Status": "200 OK", + "X-RateLimit-Limit": "600", + "X-RateLimit-Remaining": "600", + "X-RateLimit-Reset": "1481039762", + "Cache-Control": "public, max-age=60, s-maxage=60", + "Vary": ["Accept", "Accept-Encoding"], + "ETag": "W/\"a59a6c9d309683ec22eea939ae2521e6\"", + "Last-Modified": "Wed, 07 Sep 2016 04:20:15 GMT", + "X-GitHub-Media-Type": "github.v3; format=json", + "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", + "Access-Control-Allow-Origin": "*", + "Content-Security-Policy": "default-src 'none'", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "deny", + "X-XSS-Protection": "1; mode=block", + "X-Served-By": "2d7a5e35115884240089368322196939", + "X-GitHub-Request-Id": "98B4:3BBEBD:9BEC1D:1015A96:6668E71D" + } + } +} diff --git a/src/test/resources/api/mappings/mapping-cloudbeers-hellonode.json b/src/test/resources/api/mappings/mapping-cloudbeers-hellonode.json new file mode 100644 index 000000000..c6e0532fd --- /dev/null +++ b/src/test/resources/api/mappings/mapping-cloudbeers-hellonode.json @@ -0,0 +1,34 @@ +{ + "request": { + "url": "/repos/cloudbeers/hellonode", + "method": "GET" + }, + "response": { + "status": 200, + "bodyFileName": "body-cloudbeers-hellonode.json", + "headers": { + "Server": "GitHub.com", + "Date": "Wed, 12 Jun 2024 00:17:02 GMT", + "Content-Type": "application/json; charset=utf-8", + "Transfer-Encoding": "chunked", + "Status": "200 OK", + "X-RateLimit-Limit": "600", + "X-RateLimit-Remaining": "600", + "X-RateLimit-Reset": "1495039662", + "Cache-Control": "public, max-age=60, s-maxage=60", + "Vary": ["Accept", "Accept-Encoding"], + "ETag": "W/\"a59a6c9d309683ec22eea939ae2521e6\"", + "Last-Modified": "Sat, 05 Nov 2016 06:52:02 GMT", + "X-GitHub-Media-Type": "github.v3; format=json", + "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", + "Access-Control-Allow-Origin": "*", + "Content-Security-Policy": "default-src 'none'", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "deny", + "X-XSS-Protection": "1; mode=block", + "X-Served-By": "2d7a5e35115884240089368322196939", + "X-GitHub-Request-Id": "8AE8:1DC2D0:BAF884:13636A2:6668E8FE" + } + } +} diff --git a/src/test/resources/api/mappings/mapping-cloudbeers-pipeline-model-definition-plugin.json b/src/test/resources/api/mappings/mapping-cloudbeers-pipeline-model-definition-plugin.json new file mode 100644 index 000000000..8caf9abb8 --- /dev/null +++ b/src/test/resources/api/mappings/mapping-cloudbeers-pipeline-model-definition-plugin.json @@ -0,0 +1,34 @@ +{ + "request": { + "url": "/repos/cloudbeers/pipeline-model-definition-plugin", + "method": "GET" + }, + "response": { + "status": 200, + "bodyFileName": "body-cloudbeers-pipeline-model-definition-plugin.json", + "headers": { + "Server": "GitHub.com", + "Date": "Wed, 12 Jun 2024 01:16:15 GMT", + "Content-Type": "application/json; charset=utf-8", + "Transfer-Encoding": "chunked", + "Status": "200 OK", + "X-RateLimit-Limit": "600", + "X-RateLimit-Remaining": "600", + "X-RateLimit-Reset": "1495039662", + "Cache-Control": "public, max-age=60, s-maxage=60", + "Vary": ["Accept", "Accept-Encoding"], + "ETag": "W/\"a59a6c9d309683ec22eea939ae2521e6\"", + "Last-Modified": "Mon, 07 Nov 2016 16:21:08 GMT", + "X-GitHub-Media-Type": "github.v3; format=json", + "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", + "Access-Control-Allow-Origin": "*", + "Content-Security-Policy": "default-src 'none'", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "deny", + "X-XSS-Protection": "1; mode=block", + "X-Served-By": "2d7a5e35115884240089368322196939", + "X-GitHub-Request-Id": "DB5C:2FAD06:FBFFAF:1A2FE8D:6668F6DF" + } + } +}