Skip to content

Commit

Permalink
fix scorecard flag from repo to local as well as syntax in metadata e…
Browse files Browse the repository at this point in the history
…xception

Signed-off-by: Isaac Milarsky <[email protected]>
  • Loading branch information
IsaacMilarky committed Oct 15, 2024
1 parent 222ec5e commit c1036aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions augur/tasks/git/dependency_tasks/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def generate_scorecard(logger, repo_git):
path = repo_git[8:]
if path[-4:] == '.git':
path = path.replace(".git", "")
command = '--repo=' + path
command = '--local=' + path

#this is path where our scorecard project is located
path_to_scorecard = os.environ['HOME'] + '/scorecard'
Expand All @@ -99,7 +99,7 @@ def generate_scorecard(logger, repo_git):
logger.info('adding to database...')
logger.debug(f"output: {required_output}")

if not required_output['checks']:
if not required_output.get('checks'):
logger.info('No scorecard checks found!')
return

Expand Down
2 changes: 1 addition & 1 deletion augur/tasks/git/dependency_tasks/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def process_ossf_dependency_metrics(self, repo_git):
logger.warning(f'Exception generating scorecard: {e}')
tracer = ''.join(traceback.format_exception(type(e), e, e.__traceback__))
logger.warning(f'Full stack trace of OpenSSF scorecard error: {tracer}')
raise MetadataException(f"An error occurred while generating the scorecard: {str(e)}")
raise MetadataException(e,f"An error occurred while generating the scorecard: {str(e)}")

"""
This try/except block is an attempt to get more information about this occasional error:
Expand Down

0 comments on commit c1036aa

Please sign in to comment.