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

Add licenses plugin #118

Merged
merged 21 commits into from
Feb 11, 2021
Merged

Add licenses plugin #118

merged 21 commits into from
Feb 11, 2021

Conversation

lowlighter
Copy link
Owner

@lowlighter lowlighter commented Feb 9, 2021

Add a new 📜 licenses plugin, targetted for repositories' metrics to inform about licenses compliancy, permissions, limitations and conditions based on current license and licenses from used dependencies.

  • Base metrics will display a few stats (nb of dependencies, known licenses and unknown licenses)
  • plugin_licenses_ratio lets you display total ratio of each used licenses
  • plugin_licenses_legal lets you display which permissions, limitations and conditions are implied by current license and licenses from used dependencies (inherited limitations and conditions will be indicated with a different icon while conflicting permissions will be removed)

It use github/licensed to detect licenses.

Examples output:

Permissions, limitations and conditions:

Ratio:

Both can be of course combined in a single SVG output.

Disclaimer: This is not legal advice. Use at your own risk

@lowlighter lowlighter changed the title Add licenses plugins Add licenses plugin Feb 9, 2021
@Milo123459
Copy link
Contributor

I'm confused, this is just going to tell you the license you use the most?

@lowlighter
Copy link
Owner Author

lowlighter commented Feb 10, 2021

What you mention is already available in user's metrics 🙂

This one is targetted exclusively for repositories metrics to display licenses compliancy, permissions, limitations and conditions (a bit like what is currently displayed by GitHub when going on a LICENSE page, but metrics will also try to analyze dependencies licenses).

It's still not finished yet as I'm waiting for github/licensed v2.14.4 release, but it'll probably end up looking like this :

As you can see, there's legal rights from "base" license but also "inherited limitations" in this case, which would preventing patenting the code as a whole (i.e. including dependencies) since it is explicitely forbidden.

But it's just for informative purposes though, it cannot be used as legal advice 🙂

@Milo123459
Copy link
Contributor

That PR is merged

@lowlighter lowlighter mentioned this pull request Feb 11, 2021
@lowlighter lowlighter marked this pull request as ready for review February 11, 2021 20:28
@lowlighter lowlighter merged commit 783e2b4 into master Feb 11, 2021
@lowlighter lowlighter deleted the feat-plugin-licenses branch February 11, 2021 20:39
@lowlighter
Copy link
Owner Author

@jonabc
Thought you might be interested seeing end result 🙂 :

There is still room for improvements, but I'll probably check again in the future.
Seems that GitHub is missing some "common" licenses in their GraphQL API though (like ISC license for example)

Thanks again for your work!

@jonabc
Copy link

jonabc commented Feb 12, 2021

very cool, thanks for the ping!

@github-actions github-actions bot locked and limited conversation to collaborators Mar 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants