diff --git a/common/lib/dependabot/file_fetchers/base.rb b/common/lib/dependabot/file_fetchers/base.rb index a5d8f6266aa..77596918b28 100644 --- a/common/lib/dependabot/file_fetchers/base.rb +++ b/common/lib/dependabot/file_fetchers/base.rb @@ -69,6 +69,7 @@ def files end def commit + return cloned_commit if cloned_commit return source.commit if source.commit branch = target_branch || default_branch_for_repo @@ -473,6 +474,16 @@ def _fetch_file_content_from_github(path, repo, commit) end # rubocop:enable Metrics/AbcSize + def cloned_commit + return if repo_contents_path.nil? || !File.directory?(File.join(repo_contents_path, ".git")) + + SharedHelpers.with_git_configured(credentials: credentials) do + Dir.chdir(repo_contents_path) do + return SharedHelpers.run_shell_command("git rev-parse HEAD")&.strip + end + end + end + def default_branch_for_repo @default_branch_for_repo ||= client_for_provider. fetch_default_branch(repo) diff --git a/updater/lib/dependabot/file_fetcher_job.rb b/updater/lib/dependabot/file_fetcher_job.rb index 88d1ad1707e..a6be8631962 100644 --- a/updater/lib/dependabot/file_fetcher_job.rb +++ b/updater/lib/dependabot/file_fetcher_job.rb @@ -10,9 +10,9 @@ class FileFetcherJob < BaseJob def perform_job begin connectivity_check if ENV["ENABLE_CONNECTIVITY_CHECK"] == "1" + clone_repo_contents base_commit_sha dependency_files - clone_repo_contents rescue StandardError => e if Octokit::RATE_LIMITED_ERRORS.include?(e.class) remaining = rate_limit_error_remaining(e) @@ -94,12 +94,14 @@ def base_commit_sha end def file_fetcher + return @file_fetcher if defined? @file_fetcher + args = { source: job.source, credentials: job_definition.fetch("credentials", []), options: job.experiments } - args[:repo_contents_path] = Environment.repo_contents_path if job.clone? + args[:repo_contents_path] = Environment.repo_contents_path if job.clone? || job.already_cloned? @file_fetcher ||= Dependabot::FileFetchers.for_package_manager(job.package_manager). new(**args) diff --git a/updater/lib/dependabot/job.rb b/updater/lib/dependabot/job.rb index 04b186dd9c2..5e42f0825cf 100644 --- a/updater/lib/dependabot/job.rb +++ b/updater/lib/dependabot/job.rb @@ -43,6 +43,13 @@ def clone? Dependabot::Utils.always_clone_for_package_manager?(@package_manager) end + def already_cloned? + return unless Environment.repo_contents_path + + # For testing, the source repo may already be mounted. + @already_cloned ||= File.directory?(File.join(Environment.repo_contents_path, ".git")) + end + def lockfile_only? @lockfile_only end diff --git a/updater/spec/fixtures/vcr_cassettes/Dependabot_FileFetcherJob/_perform_job/when_package_ecosystem_always_clones/cleans_up_any_files_left_after_the_job_errors.yml b/updater/spec/fixtures/vcr_cassettes/Dependabot_FileFetcherJob/_perform_job/when_package_ecosystem_always_clones/cleans_up_any_files_left_after_the_job_errors.yml deleted file mode 100644 index e1235120ccb..00000000000 --- a/updater/spec/fixtures/vcr_cassettes/Dependabot_FileFetcherJob/_perform_job/when_package_ecosystem_always_clones/cleans_up_any_files_left_after_the_job_errors.yml +++ /dev/null @@ -1,155 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: https://api.github.com/repos/dependabot-fixtures/go-modules-lib - body: - encoding: US-ASCII - string: '' - headers: - User-Agent: - - Octokit Ruby Gem 4.21.0 - Accept: - - application/vnd.github.v3+json - Content-Type: - - application/json - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - response: - status: - code: 200 - message: OK - headers: - Server: - - GitHub.com - Date: - - Wed, 17 Nov 2021 12:40:17 GMT - Content-Type: - - application/json; charset=utf-8 - Cache-Control: - - public, max-age=60, s-maxage=60 - Vary: - - Accept, Accept-Encoding, Accept, X-Requested-With - Etag: - - W/"0b87317ead9a654aeddc1dcc7bcab1daacf22aa88923364fcb86eca675b76004" - Last-Modified: - - Thu, 18 Oct 2018 21:49:07 GMT - X-Github-Media-Type: - - github.v3; format=json - Access-Control-Expose-Headers: - - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, - X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, - X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, - Sunset - Access-Control-Allow-Origin: - - "*" - Strict-Transport-Security: - - max-age=31536000; includeSubdomains; preload - X-Frame-Options: - - deny - X-Content-Type-Options: - - nosniff - X-Xss-Protection: - - '0' - Referrer-Policy: - - origin-when-cross-origin, strict-origin-when-cross-origin - Content-Security-Policy: - - default-src 'none' - X-Ratelimit-Limit: - - '60' - X-Ratelimit-Remaining: - - '37' - X-Ratelimit-Reset: - - '1637155033' - X-Ratelimit-Resource: - - core - X-Ratelimit-Used: - - '23' - Accept-Ranges: - - bytes - Content-Length: - - '1273' - X-Github-Request-Id: - - D48F:FC63:4B33A76:4C9CDA5:6194F831 - body: - encoding: ASCII-8BIT - string: '{"id":153008541,"node_id":"MDEwOlJlcG9zaXRvcnkxNTMwMDg1NDE=","name":"go-modules-lib","full_name":"dependabot-fixtures/go-modules-lib","private":false,"owner":{"login":"dependabot-fixtures","id":44116593,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MTE2NTkz","avatar_url":"https://avatars.githubusercontent.com/u/44116593?v=4","gravatar_id":"","url":"https://api.github.com/users/dependabot-fixtures","html_url":"https://github.com/dependabot-fixtures","followers_url":"https://api.github.com/users/dependabot-fixtures/followers","following_url":"https://api.github.com/users/dependabot-fixtures/following{/other_user}","gists_url":"https://api.github.com/users/dependabot-fixtures/gists{/gist_id}","starred_url":"https://api.github.com/users/dependabot-fixtures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dependabot-fixtures/subscriptions","organizations_url":"https://api.github.com/users/dependabot-fixtures/orgs","repos_url":"https://api.github.com/users/dependabot-fixtures/repos","events_url":"https://api.github.com/users/dependabot-fixtures/events{/privacy}","received_events_url":"https://api.github.com/users/dependabot-fixtures/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dependabot-fixtures/go-modules-lib","description":null,"fork":false,"url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib","forks_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/forks","keys_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/teams","hooks_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/hooks","issue_events_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/issues/events{/number}","events_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/events","assignees_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/assignees{/user}","branches_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/branches{/branch}","tags_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/tags","blobs_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/git/refs{/sha}","trees_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/statuses/{sha}","languages_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/languages","stargazers_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/stargazers","contributors_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/contributors","subscribers_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/subscribers","subscription_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/subscription","commits_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/commits{/sha}","git_commits_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/git/commits{/sha}","comments_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/comments{/number}","issue_comment_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/issues/comments{/number}","contents_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/contents/{+path}","compare_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/merges","archive_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/downloads","issues_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/issues{/number}","pulls_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/pulls{/number}","milestones_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/milestones{/number}","notifications_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/labels{/name}","releases_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/releases{/id}","deployments_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/deployments","created_at":"2018-10-14T19:03:22Z","updated_at":"2018-10-18T21:49:07Z","pushed_at":"2021-06-16T18:58:56Z","git_url":"git://github.com/dependabot-fixtures/go-modules-lib.git","ssh_url":"git@github.com:dependabot-fixtures/go-modules-lib.git","clone_url":"https://github.com/dependabot-fixtures/go-modules-lib.git","svn_url":"https://github.com/dependabot-fixtures/go-modules-lib","homepage":null,"size":2,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"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,"allow_forking":true,"is_template":false,"topics":[],"visibility":"public","forks":1,"open_issues":0,"watchers":0,"default_branch":"master","temp_clone_token":null,"organization":{"login":"dependabot-fixtures","id":44116593,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MTE2NTkz","avatar_url":"https://avatars.githubusercontent.com/u/44116593?v=4","gravatar_id":"","url":"https://api.github.com/users/dependabot-fixtures","html_url":"https://github.com/dependabot-fixtures","followers_url":"https://api.github.com/users/dependabot-fixtures/followers","following_url":"https://api.github.com/users/dependabot-fixtures/following{/other_user}","gists_url":"https://api.github.com/users/dependabot-fixtures/gists{/gist_id}","starred_url":"https://api.github.com/users/dependabot-fixtures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dependabot-fixtures/subscriptions","organizations_url":"https://api.github.com/users/dependabot-fixtures/orgs","repos_url":"https://api.github.com/users/dependabot-fixtures/repos","events_url":"https://api.github.com/users/dependabot-fixtures/events{/privacy}","received_events_url":"https://api.github.com/users/dependabot-fixtures/received_events","type":"Organization","site_admin":false},"network_count":1,"subscribers_count":1}' - recorded_at: Wed, 17 Nov 2021 12:40:17 GMT -- request: - method: get - uri: https://api.github.com/repos/dependabot-fixtures/go-modules-lib/git/refs/heads/master - body: - encoding: US-ASCII - string: '' - headers: - User-Agent: - - Octokit Ruby Gem 4.21.0 - Accept: - - application/vnd.github.v3+json - Content-Type: - - application/json - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - response: - status: - code: 200 - message: OK - headers: - Server: - - GitHub.com - Date: - - Wed, 17 Nov 2021 12:40:17 GMT - Content-Type: - - application/json; charset=utf-8 - Cache-Control: - - public, max-age=60, s-maxage=60 - Vary: - - Accept, Accept-Encoding, Accept, X-Requested-With - Etag: - - W/"469a0496e7fe8fc3a9eec96b43115f66c1921ec6bd966a9fa014f48657cbaced" - Last-Modified: - - Thu, 18 Oct 2018 21:49:07 GMT - X-Poll-Interval: - - '300' - X-Github-Media-Type: - - github.v3; format=json - Access-Control-Expose-Headers: - - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, - X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, - X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, - Sunset - Access-Control-Allow-Origin: - - "*" - Strict-Transport-Security: - - max-age=31536000; includeSubdomains; preload - X-Frame-Options: - - deny - X-Content-Type-Options: - - nosniff - X-Xss-Protection: - - '0' - Referrer-Policy: - - origin-when-cross-origin, strict-origin-when-cross-origin - Content-Security-Policy: - - default-src 'none' - X-Ratelimit-Limit: - - '60' - X-Ratelimit-Remaining: - - '36' - X-Ratelimit-Reset: - - '1637155032' - X-Ratelimit-Resource: - - core - X-Ratelimit-Used: - - '24' - Accept-Ranges: - - bytes - Content-Length: - - '237' - X-Github-Request-Id: - - D490:7847:6236DA:6B1093:6194F831 - body: - encoding: ASCII-8BIT - string: '{"ref":"refs/heads/master","node_id":"MDM6UmVmMTUzMDA4NTQxOnJlZnMvaGVhZHMvbWFzdGVy","url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/git/refs/heads/master","object":{"sha":"160300187fedba9292e56b0277db8fffa369b560","type":"commit","url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/git/commits/160300187fedba9292e56b0277db8fffa369b560"}}' - recorded_at: Wed, 17 Nov 2021 12:40:17 GMT -recorded_with: VCR 6.0.0 diff --git a/updater/spec/fixtures/vcr_cassettes/Dependabot_FileFetcherJob/_perform_job/when_package_ecosystem_always_clones/clones_the_repo.yml b/updater/spec/fixtures/vcr_cassettes/Dependabot_FileFetcherJob/_perform_job/when_package_ecosystem_always_clones/clones_the_repo.yml deleted file mode 100644 index cbab1d5a072..00000000000 --- a/updater/spec/fixtures/vcr_cassettes/Dependabot_FileFetcherJob/_perform_job/when_package_ecosystem_always_clones/clones_the_repo.yml +++ /dev/null @@ -1,153 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: https://api.github.com/repos/dependabot-fixtures/go-modules-lib - body: - encoding: US-ASCII - string: '' - headers: - User-Agent: - - Octokit Ruby Gem 4.19.0 - Accept: - - application/vnd.github.v3+json - Content-Type: - - application/json - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - response: - status: - code: 200 - message: OK - headers: - Server: - - GitHub.com - Date: - - Thu, 29 Oct 2020 19:16:47 GMT - Content-Type: - - application/json; charset=utf-8 - Status: - - 200 OK - Cache-Control: - - public, max-age=60, s-maxage=60 - Vary: - - Accept, Accept-Encoding, Accept, X-Requested-With - Etag: - - W/"b531dfa6aa0f0a5745dfb82327e7106362f8d945f6bc982a6a4573fb55b363f8" - Last-Modified: - - Thu, 18 Oct 2018 21:49:07 GMT - X-Github-Media-Type: - - github.v3; format=json - Access-Control-Expose-Headers: - - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, - X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, - X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset - Access-Control-Allow-Origin: - - "*" - Strict-Transport-Security: - - max-age=31536000; includeSubdomains; preload - X-Frame-Options: - - deny - X-Content-Type-Options: - - nosniff - X-Xss-Protection: - - 1; mode=block - Referrer-Policy: - - origin-when-cross-origin, strict-origin-when-cross-origin - Content-Security-Policy: - - default-src 'none' - X-Ratelimit-Limit: - - '60' - X-Ratelimit-Remaining: - - '54' - X-Ratelimit-Reset: - - '1603999545' - X-Ratelimit-Used: - - '6' - Accept-Ranges: - - bytes - Content-Length: - - '1216' - X-Github-Request-Id: - - C7D4:0DB0:11A7A:35521:5F9B151E - body: - encoding: ASCII-8BIT - string: '{"id":153008541,"node_id":"MDEwOlJlcG9zaXRvcnkxNTMwMDg1NDE=","name":"go-modules-lib","full_name":"dependabot-fixtures/go-modules-lib","private":false,"owner":{"login":"dependabot-fixtures","id":44116593,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MTE2NTkz","avatar_url":"https://avatars0.githubusercontent.com/u/44116593?v=4","gravatar_id":"","url":"https://api.github.com/users/dependabot-fixtures","html_url":"https://github.com/dependabot-fixtures","followers_url":"https://api.github.com/users/dependabot-fixtures/followers","following_url":"https://api.github.com/users/dependabot-fixtures/following{/other_user}","gists_url":"https://api.github.com/users/dependabot-fixtures/gists{/gist_id}","starred_url":"https://api.github.com/users/dependabot-fixtures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dependabot-fixtures/subscriptions","organizations_url":"https://api.github.com/users/dependabot-fixtures/orgs","repos_url":"https://api.github.com/users/dependabot-fixtures/repos","events_url":"https://api.github.com/users/dependabot-fixtures/events{/privacy}","received_events_url":"https://api.github.com/users/dependabot-fixtures/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dependabot-fixtures/go-modules-lib","description":null,"fork":false,"url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib","forks_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/forks","keys_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/teams","hooks_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/hooks","issue_events_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/issues/events{/number}","events_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/events","assignees_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/assignees{/user}","branches_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/branches{/branch}","tags_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/tags","blobs_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/git/refs{/sha}","trees_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/statuses/{sha}","languages_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/languages","stargazers_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/stargazers","contributors_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/contributors","subscribers_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/subscribers","subscription_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/subscription","commits_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/commits{/sha}","git_commits_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/git/commits{/sha}","comments_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/comments{/number}","issue_comment_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/issues/comments{/number}","contents_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/contents/{+path}","compare_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/merges","archive_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/downloads","issues_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/issues{/number}","pulls_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/pulls{/number}","milestones_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/milestones{/number}","notifications_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/labels{/name}","releases_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/releases{/id}","deployments_url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/deployments","created_at":"2018-10-14T19:03:22Z","updated_at":"2018-10-18T21:49:07Z","pushed_at":"2018-10-18T21:49:05Z","git_url":"git://github.com/dependabot-fixtures/go-modules-lib.git","ssh_url":"git@github.com:dependabot-fixtures/go-modules-lib.git","clone_url":"https://github.com/dependabot-fixtures/go-modules-lib.git","svn_url":"https://github.com/dependabot-fixtures/go-modules-lib","homepage":null,"size":2,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master","temp_clone_token":null,"organization":{"login":"dependabot-fixtures","id":44116593,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MTE2NTkz","avatar_url":"https://avatars0.githubusercontent.com/u/44116593?v=4","gravatar_id":"","url":"https://api.github.com/users/dependabot-fixtures","html_url":"https://github.com/dependabot-fixtures","followers_url":"https://api.github.com/users/dependabot-fixtures/followers","following_url":"https://api.github.com/users/dependabot-fixtures/following{/other_user}","gists_url":"https://api.github.com/users/dependabot-fixtures/gists{/gist_id}","starred_url":"https://api.github.com/users/dependabot-fixtures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dependabot-fixtures/subscriptions","organizations_url":"https://api.github.com/users/dependabot-fixtures/orgs","repos_url":"https://api.github.com/users/dependabot-fixtures/repos","events_url":"https://api.github.com/users/dependabot-fixtures/events{/privacy}","received_events_url":"https://api.github.com/users/dependabot-fixtures/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":0}' - recorded_at: Thu, 29 Oct 2020 19:16:47 GMT -- request: - method: get - uri: https://api.github.com/repos/dependabot-fixtures/go-modules-lib/git/refs/heads/master - body: - encoding: US-ASCII - string: '' - headers: - User-Agent: - - Octokit Ruby Gem 4.19.0 - Accept: - - application/vnd.github.v3+json - Content-Type: - - application/json - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - response: - status: - code: 200 - message: OK - headers: - Server: - - GitHub.com - Date: - - Thu, 29 Oct 2020 19:16:47 GMT - Content-Type: - - application/json; charset=utf-8 - Status: - - 200 OK - Cache-Control: - - public, max-age=60, s-maxage=60 - Vary: - - Accept, Accept-Encoding, Accept, X-Requested-With - Etag: - - W/"469a0496e7fe8fc3a9eec96b43115f66c1921ec6bd966a9fa014f48657cbaced" - Last-Modified: - - Thu, 18 Oct 2018 21:49:07 GMT - X-Poll-Interval: - - '300' - X-Github-Media-Type: - - github.v3; format=json - Access-Control-Expose-Headers: - - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, - X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, - X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset - Access-Control-Allow-Origin: - - "*" - Strict-Transport-Security: - - max-age=31536000; includeSubdomains; preload - X-Frame-Options: - - deny - X-Content-Type-Options: - - nosniff - X-Xss-Protection: - - 1; mode=block - Referrer-Policy: - - origin-when-cross-origin, strict-origin-when-cross-origin - Content-Security-Policy: - - default-src 'none' - X-Ratelimit-Limit: - - '60' - X-Ratelimit-Remaining: - - '53' - X-Ratelimit-Reset: - - '1603999545' - X-Ratelimit-Used: - - '7' - Accept-Ranges: - - bytes - Content-Length: - - '237' - X-Github-Request-Id: - - C7D5:1CFD:18366:409A2:5F9B151F - body: - encoding: ASCII-8BIT - string: '{"ref":"refs/heads/master","node_id":"MDM6UmVmMTUzMDA4NTQxOnJlZnMvaGVhZHMvbWFzdGVy","url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/git/refs/heads/master","object":{"sha":"160300187fedba9292e56b0277db8fffa369b560","type":"commit","url":"https://api.github.com/repos/dependabot-fixtures/go-modules-lib/git/commits/160300187fedba9292e56b0277db8fffa369b560"}}' - recorded_at: Thu, 29 Oct 2020 19:16:47 GMT -recorded_with: VCR 6.0.0 diff --git a/updater/spec/fixtures/vcr_cassettes/Dependabot_FileFetcherJob/_perform_job/when_vendoring_dependencies/clones_the_repo.yml b/updater/spec/fixtures/vcr_cassettes/Dependabot_FileFetcherJob/_perform_job/when_vendoring_dependencies/clones_the_repo.yml deleted file mode 100644 index eafe1a387f3..00000000000 --- a/updater/spec/fixtures/vcr_cassettes/Dependabot_FileFetcherJob/_perform_job/when_vendoring_dependencies/clones_the_repo.yml +++ /dev/null @@ -1,156 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package - body: - encoding: US-ASCII - string: '' - headers: - User-Agent: - - Octokit Ruby Gem 4.21.0 - Accept: - - application/vnd.github.v3+json - Content-Type: - - application/json - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - response: - status: - code: 200 - message: OK - headers: - Server: - - GitHub.com - Date: - - Thu, 15 Jul 2021 14:06:13 GMT - Content-Type: - - application/json; charset=utf-8 - Cache-Control: - - public, max-age=60, s-maxage=60 - Vary: - - Accept, Accept-Encoding, Accept, X-Requested-With - Etag: - - W/"1af1160a3291ee19d25636a391de9337b9b5a582bfc66f1baabd3b3c8c8f7b93" - Last-Modified: - - Wed, 27 May 2020 11:17:06 GMT - X-Github-Media-Type: - - github.v3; format=json - Access-Control-Expose-Headers: - - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, - X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, - X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, - Sunset - Access-Control-Allow-Origin: - - "*" - Strict-Transport-Security: - - max-age=31536000; includeSubdomains; preload - X-Frame-Options: - - deny - X-Content-Type-Options: - - nosniff - X-Xss-Protection: - - '0' - Referrer-Policy: - - origin-when-cross-origin, strict-origin-when-cross-origin - Content-Security-Policy: - - default-src 'none' - X-Ratelimit-Limit: - - '60' - X-Ratelimit-Remaining: - - '58' - X-Ratelimit-Reset: - - '1626360905' - X-Ratelimit-Resource: - - core - X-Ratelimit-Used: - - '2' - Accept-Ranges: - - bytes - Content-Length: - - '1253' - X-Github-Request-Id: - - D4F1:11D27:32DCF45:33DFA45:60F040D5 - body: - encoding: ASCII-8BIT - string: '{"id":267290099,"node_id":"MDEwOlJlcG9zaXRvcnkyNjcyOTAwOTk=","name":"dependabot-test-ruby-package","full_name":"dependabot-fixtures/dependabot-test-ruby-package","private":false,"owner":{"login":"dependabot-fixtures","id":44116593,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MTE2NTkz","avatar_url":"https://avatars.githubusercontent.com/u/44116593?v=4","gravatar_id":"","url":"https://api.github.com/users/dependabot-fixtures","html_url":"https://github.com/dependabot-fixtures","followers_url":"https://api.github.com/users/dependabot-fixtures/followers","following_url":"https://api.github.com/users/dependabot-fixtures/following{/other_user}","gists_url":"https://api.github.com/users/dependabot-fixtures/gists{/gist_id}","starred_url":"https://api.github.com/users/dependabot-fixtures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dependabot-fixtures/subscriptions","organizations_url":"https://api.github.com/users/dependabot-fixtures/orgs","repos_url":"https://api.github.com/users/dependabot-fixtures/repos","events_url":"https://api.github.com/users/dependabot-fixtures/events{/privacy}","received_events_url":"https://api.github.com/users/dependabot-fixtures/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dependabot-fixtures/dependabot-test-ruby-package","description":"A - ruby gem for testing dependabot","fork":false,"url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package","forks_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/forks","keys_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/teams","hooks_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/hooks","issue_events_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/issues/events{/number}","events_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/events","assignees_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/assignees{/user}","branches_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/branches{/branch}","tags_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/tags","blobs_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/git/refs{/sha}","trees_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/statuses/{sha}","languages_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/languages","stargazers_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/stargazers","contributors_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/contributors","subscribers_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/subscribers","subscription_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/subscription","commits_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/commits{/sha}","git_commits_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/git/commits{/sha}","comments_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/comments{/number}","issue_comment_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/issues/comments{/number}","contents_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/contents/{+path}","compare_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/merges","archive_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/downloads","issues_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/issues{/number}","pulls_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/pulls{/number}","milestones_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/milestones{/number}","notifications_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/labels{/name}","releases_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/releases{/id}","deployments_url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/deployments","created_at":"2020-05-27T10:32:22Z","updated_at":"2020-05-27T11:17:06Z","pushed_at":"2020-05-27T11:23:26Z","git_url":"git://github.com/dependabot-fixtures/dependabot-test-ruby-package.git","ssh_url":"git@github.com:dependabot-fixtures/dependabot-test-ruby-package.git","clone_url":"https://github.com/dependabot-fixtures/dependabot-test-ruby-package.git","svn_url":"https://github.com/dependabot-fixtures/dependabot-test-ruby-package","homepage":null,"size":1,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master","temp_clone_token":null,"organization":{"login":"dependabot-fixtures","id":44116593,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MTE2NTkz","avatar_url":"https://avatars.githubusercontent.com/u/44116593?v=4","gravatar_id":"","url":"https://api.github.com/users/dependabot-fixtures","html_url":"https://github.com/dependabot-fixtures","followers_url":"https://api.github.com/users/dependabot-fixtures/followers","following_url":"https://api.github.com/users/dependabot-fixtures/following{/other_user}","gists_url":"https://api.github.com/users/dependabot-fixtures/gists{/gist_id}","starred_url":"https://api.github.com/users/dependabot-fixtures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dependabot-fixtures/subscriptions","organizations_url":"https://api.github.com/users/dependabot-fixtures/orgs","repos_url":"https://api.github.com/users/dependabot-fixtures/repos","events_url":"https://api.github.com/users/dependabot-fixtures/events{/privacy}","received_events_url":"https://api.github.com/users/dependabot-fixtures/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1}' - recorded_at: Thu, 15 Jul 2021 14:06:13 GMT -- request: - method: get - uri: https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/git/refs/heads/master - body: - encoding: US-ASCII - string: '' - headers: - User-Agent: - - Octokit Ruby Gem 4.21.0 - Accept: - - application/vnd.github.v3+json - Content-Type: - - application/json - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - response: - status: - code: 200 - message: OK - headers: - Server: - - GitHub.com - Date: - - Thu, 15 Jul 2021 14:06:13 GMT - Content-Type: - - application/json; charset=utf-8 - Cache-Control: - - public, max-age=60, s-maxage=60 - Vary: - - Accept, Accept-Encoding, Accept, X-Requested-With - Etag: - - W/"4ec4b41160548cc0f86c2459b25f9dd74f27df28fc425f9786cdb4ab70be7e01" - Last-Modified: - - Wed, 27 May 2020 11:17:06 GMT - X-Poll-Interval: - - '300' - X-Github-Media-Type: - - github.v3; format=json - Access-Control-Expose-Headers: - - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, - X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, - X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, - Sunset - Access-Control-Allow-Origin: - - "*" - Strict-Transport-Security: - - max-age=31536000; includeSubdomains; preload - X-Frame-Options: - - deny - X-Content-Type-Options: - - nosniff - X-Xss-Protection: - - '0' - Referrer-Policy: - - origin-when-cross-origin, strict-origin-when-cross-origin - Content-Security-Policy: - - default-src 'none' - X-Ratelimit-Limit: - - '60' - X-Ratelimit-Remaining: - - '57' - X-Ratelimit-Reset: - - '1626360905' - X-Ratelimit-Resource: - - core - X-Ratelimit-Used: - - '3' - Accept-Ranges: - - bytes - Content-Length: - - '237' - X-Github-Request-Id: - - D4F2:74C5:B45918:BD4730:60F040D5 - body: - encoding: ASCII-8BIT - string: '{"ref":"refs/heads/master","node_id":"MDM6UmVmMjY3MjkwMDk5OnJlZnMvaGVhZHMvbWFzdGVy","url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/git/refs/heads/master","object":{"sha":"1c6331732c41e4557a16dacb82534f1d1c831848","type":"commit","url":"https://api.github.com/repos/dependabot-fixtures/dependabot-test-ruby-package/git/commits/1c6331732c41e4557a16dacb82534f1d1c831848"}}' - recorded_at: Thu, 15 Jul 2021 14:06:13 GMT -recorded_with: VCR 6.0.0