jpeddicord / askalono

A tool & library to detect open source licenses from texts
Apache License 2.0
261 stars 26 forks source link

CLAs #64

Open hyandell opened 3 years ago

hyandell commented 3 years ago

I miss not having the CLA side of things in the diff tool.

How can we get to a CLA-askalono? Happy to do some work if you can mentor :)

jpeddicord commented 3 years ago

Yep! I'm open to it. There's a couple approaches off the top of my head:

  1. If this is for your own internal use, we can hack on something to import those into a Store (and compile it into the binary) and keep that in the examples directory. This would basically be abusing the LicenseEntry struct to store a CLA instead -- they're close enough that it's not too hacky.

  2. If you want to upstream this with CLA support baked in by default, there are a couple more tasks: a. Some kind of marker or abstraction to indicate that a stored LicenseEntry is actually a CLA. I'd be OK with an enum that indicates the type of a license (which for now would be something like SoftwareLicense or ContributorLicenseAgreement, etc). b. Perhaps some fields on the API that distinguish whether you want to search licenses, CLAs, or both/all types. But that is a more invasive change that probably doesn't need to happen yet (I doubt askalono will get confused differentiating licenses vs CLAs). c. Some kind of authoritative source of CLA texts, ala SPDX. Doesn't have to be the same format, just a location to refer to from here. I don't want to store that directly in this repository, and would prefer to not maintain a textual repository of that data elsewhere (but might cave on that).

    • The CLA data set could be omitted if that's something you'd want to insert at build time on your systems.