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

[Feature Request] Add a flag to handle Unknown licenses #264

Closed
jcasner opened this issue Sep 29, 2022 · 7 comments
Closed

[Feature Request] Add a flag to handle Unknown licenses #264

jcasner opened this issue Sep 29, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@jcasner
Copy link

jcasner commented Sep 29, 2022

Because it is so difficult to build and maintain a database of all licenses for all packages, it would be great if there were some options for what to do when a package with an unknown license is added.

Option 1: Comment on the PR so someone at least gets a heads up to double check the license manually

Option 2: Allow the option to explicitly deny packages with unknown licenses.

  • Note - we'd probably need to also add a feature to explicitly allow specific packages in this situation...

I'm open to other options, too :)

Thanks

@febuiles febuiles added the enhancement New feature or request label Sep 30, 2022
@febuiles
Copy link
Contributor

More details about unknown licenses in #182 (comment)

@febuiles
Copy link
Contributor

febuiles commented Oct 4, 2022

@jcasner I'm currently working on improving the license support to get much more complete coverage of projects hosted in GitHub/supported by GitHub's Licenses API. Your second proposal sounds reasonable even with better license coverage, so I think we can do something about this soon.

The packages allowlist sounds like a "nice to have", but not mandatory in order to block PRs on null licenses. Is this a "someone could want" feature, or would it affect you if we only shipped what's outlined in your "Option 2"?

@febuiles
Copy link
Contributor

PR in progress here.

@febuiles
Copy link
Contributor

@jcasner we've improved license detection following the approach outlined above. We are also reporting unknown licenses in the output, I hope this helps. Closing this issue, please re-open if needed.

@wmmc88
Copy link

wmmc88 commented Jan 23, 2024

I think a flag to explicitly deny unknown licenses is still warranted.

The following run fails to be able to detect the license of anstyle:
https://github.com/wmmc88/windows-drivers-rs/actions/runs/7632001216/job/20791223328?pr=18

I am unsure why this is the case since the license is available here.

In any case, I still think there should be a wail to fail the job if unknown license is encountered. There are situations where you wont catch this in PR comments (ex. if triggered on push, or if triggered on PR from a fork)

@febuiles
Copy link
Contributor

@wmmc88 Thanks for your input. Do you mind creating a new issue for your Cargo runs so the problem doesn't get lost in the comments here?

@wmmc88
Copy link

wmmc88 commented Jan 26, 2024

@wmmc88 Thanks for your input. Do you mind creating a new issue for your Cargo runs so the problem doesn't get lost in the comments here?

@febuiles created new issue to track: #672

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants