Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scorecard Patch #2935

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -6,7 +6,7 @@
from augur.tasks.git.dependency_tasks.dependency_util import dependency_calculator as dep_calc
from augur.tasks.util.worker_util import parse_json_from_subprocess_call
from augur.tasks.git.util.facade_worker.facade_worker.utilitymethods import get_absolute_repo_path
from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth

Check warning on line 9 in augur/tasks/git/dependency_tasks/core.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0611: Unused GithubRandomKeyAuth imported from augur.tasks.github.util.github_random_key_auth (unused-import) Raw Output: augur/tasks/git/dependency_tasks/core.py:9:0: W0611: Unused GithubRandomKeyAuth imported from augur.tasks.github.util.github_random_key_auth (unused-import)
from augur.tasks.util.metadata_exception import MetadataException


Expand Down Expand Up @@ -76,7 +76,7 @@
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 @@
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
Loading