Skip to content

Commit

Permalink
Merge pull request #2935 from chaoss/patch-ossf-scorecard-main
Browse files Browse the repository at this point in the history
Scorecard Patch
  • Loading branch information
sgoggins authored Oct 15, 2024
2 parents 222ec5e + c1036aa commit efda1bd
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 efda1bd

Please sign in to comment.