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

Support git_subdir dependency (and referring to a branch) #15

Merged
merged 3 commits into from
Apr 30, 2024

Conversation

sstrollo
Copy link
Contributor

@sstrollo sstrollo commented Apr 4, 2024

Hi,

I have a couple of git_subdir dependencies in my project, and I noticed they were not included in the bom. This pull request should take care of that.

Best regards,

/Sebastian

@voltone
Copy link
Owner

voltone commented Apr 17, 2024

Thanks for you contribution! Fetching license info from GH is an interesting idea, definitely easier than trying to determine the license from parsing the LICENSE or README file. But what happens if the GH API is unavailable (e.g. because the plugin is run in a local sandboxed CI environment, or because the API call is unauthenticated and therefore, presumably, rate-limited)?

@sstrollo
Copy link
Contributor Author

Hi,
Right, sorry, meant to put the license fetching in a separate branch (my original problem was the support for the git_subdir targets in rebar).

The reason I started on the "fetching license form Github" path is that I realized that the licenses in the app files were only available in projects that are also hex packages (since it is required for hex packages), and in our project we were using a bunch of packages from github directly (instead of hex packages). The code to fetch the license, as it is now, is written very defensively - if rebar3 is run in offline mode, or if any errors happen during the api call (e.g. Github has a limit of 60 api requests per hour for unauthenticated requests) then the license will stay as before (empty).

I'd be happy to modify the pull-request in any way you see make sense for your plugin - including breaking out the github license fetching to a separate pull request.

@voltone voltone merged commit 8879de8 into voltone:master Apr 30, 2024
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.

None yet

2 participants