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

if working with a directory, do not download the whole thing #5

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

deitch
Copy link
Contributor

@deitch deitch commented Nov 1, 2023

The github-sbom-generator currently figures out the download URL based on the passed arg, either a URL like https://github.com/foo/bar#commit or a path. In the case of a URL, it obviously has to download it to scan for license files. But in the case of a path, it doesn't need to download it, since it already is there. Yet it is generating the download URL and then downloading and scanning.

This PR changes it so that if it is a directory, it scans for the license files in the directory rather than downloading them.

This makes it much faster, especially for big repos, like eve-kernel.

cc @rucoder @eriknordmark

@deitch deitch requested a review from eriknordmark as a code owner November 1, 2023 09:04
@deitch
Copy link
Contributor Author

deitch commented Nov 1, 2023

@eriknordmark I do not understand enough about the codeql setup to know what it is complaining about. Do you?

@eriknordmark
Copy link
Contributor

@eriknordmark I do not understand enough about the codeql setup to know what it is complaining about. Do you?

No and I have to compare the codeql setup for this repo with other ones to figure out what I did differently when I enabled it.

Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eriknordmark eriknordmark merged commit 2848bb8 into lf-edge:main Nov 1, 2023
6 of 7 checks passed
@deitch deitch deleted the avoid-double-download branch November 1, 2023 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants