Skip to content

Commit

Permalink
chore: addressed PR feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Selwyn-Smith <benselwynsmith@googlemail.com>
  • Loading branch information
benmss committed Nov 15, 2024
1 parent 24f2393 commit c1c4eea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
7 changes: 0 additions & 7 deletions src/macaron/repo_finder/repo_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,6 @@ def get_tags_via_git_remote(repo: str) -> dict[str, str] | None:
if not tag_data:
return None
tags = {}
# try:
# command = git.cmd.Git()
# command.update_environment(GIT_TERMINAL_PROMPT="")
# tag_data = command.ls_remote("--tags", repo)
# except git.exc.GitCommandError as error:
# logger.debug("Failed to retrieve tags: %s", error)
# return None

for tag_line in tag_data.splitlines():
tag_line = tag_line.strip()
Expand Down
4 changes: 3 additions & 1 deletion src/macaron/slsa_analyzer/git_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,11 @@ def list_remote_references(arguments: list[str], repo: str) -> str | None:
if result.returncode != 0:
error_string = result.stderr.decode("utf-8").strip()
if error_string.startswith("fatal: could not read Username"):
# Occurs when a repository cannot be accesses either because it does not exist, or it requires a login
# Occurs when a repository cannot be accessed either because it does not exist, or it requires a login
# that is blocked.
logger.error("Could not access repository: %s", repo)
else:
logger.error("Failed to retrieve remote references from repo: %s", repo)
return None

return result.stdout.decode("utf-8")
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/cases/find_source_fail/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.

description: |
Analyzing the find source command on the a non-existent repository.
Analyzing the find source command on a non-existent repository.
tags:
- macaron-python-package
Expand Down

0 comments on commit c1c4eea

Please sign in to comment.