Skip to content

Commit

Permalink
Suppport all default branches name
Browse files Browse the repository at this point in the history
  • Loading branch information
juliendoutre committed Jan 30, 2025
1 parent 23ed0ed commit a6853a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guarddog/scanners/npm_package_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def _parse_git_url(self, package_name: str) -> str:

def _get_git_data_and_tarball_url(self, package_name: str, version=None) -> typing.Tuple[dict, str]:
if version is None:
return {}, f"https://github.com/{package_name}/archive/refs/heads/main.zip"
return {}, f"https://api.github.com/repos/{package_name}/zipball"
else:
return {}, f"https://github.com/{package_name}/archive/refs/tags/{version}.zip"

Expand Down

0 comments on commit a6853a5

Please sign in to comment.