Skip to content

Commit

Permalink
[NFC] Only fetch HEADs of tags & master for coverage computation
Browse files Browse the repository at this point in the history
Download 375M instead of 712M.
  • Loading branch information
marco-antognini-sonarsource committed Dec 11, 2024
1 parent 5675385 commit c5fdf49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rspec-tools/rspec_tools/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ def checkout_repo(repo):
if token:
git_url=f"https://oauth2:{token}@github.com/SonarSource/{repo}"
if not os.path.exists(repo):
return Repo.clone_from(git_url, repo)
repo = Repo.clone_from(git_url, repo, depth=1, single_branch=True)
repo.remote('origin').fetch('refs/tags/*:refs/tags/*', depth=1)
return repo
else:
return Repo(repo)

Expand Down

0 comments on commit c5fdf49

Please sign in to comment.