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

Generate license text when missing for detected license #223

Merged
merged 1 commit into from
Nov 9, 2019

Conversation

jonabc
Copy link
Contributor

@jonabc jonabc commented Nov 9, 2019

closes #189

This PR takes an alternate approach to reducing friction when license data is only found in a package manager file. Rather than writing the package manager content to the cached data, this takes an approach of caching the default license text, as known and provided by licensee.

The generated data is only included if no other license contents are found (from LICENSE files, readme text, etc) and a non-"other" license is found for a dependency.

This means that for the (hopefully) majority of cases where license text isn't included, the tool will be able to provide some default text. The only complication is that many package managers don't include publish dates or authors as part of the package metadata, which makes generating any copyright clauses hard. As a result I am stripping any copyright contents from the license templates when caching data.

I've set the sources property for the text to specify that the text is auto generated, rather than coming from a file.

@mlinksva is this approach viable? I'm not sure if this would be ok, given that the license content isn't coming from the package author and doesn't include a copyright.

@jonabc jonabc requested a review from mlinksva November 9, 2019 18:14
@jonabc jonabc merged commit 516908e into master Nov 9, 2019
@jonabc jonabc deleted the autogenerate-data-for-package-license branch November 9, 2019 23:56
@jonabc jonabc mentioned this pull request Nov 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Include package manager content in cached record
2 participants