gitbase
gitbase copied to clipboard
[proposal] UDF to classify licenses
This proposes to add a UDF based on go-license-detector to classify licenses of repositories to gitbase core. That UDF requires all the files in HEAD belonging to a repository.
cc @mcuadros @campoy
I'm not sure about this, what's the use case?
@campoy The use case is to classify the licenses. Wdym?
I wouldn't want to add extra features that do not have a specific persona / use case in mind. There's many useful things we could add to the engine, we need to ensure that those added have enough value to compensate for the extra API / documentation, etc.
If that functionality requires all the HEAD files from a repository cannot be implemented using a UDF.
A UDF is working at the row level. You can process from 0 to N fields from a row, and generate a new value from that.
It can work at the row level analyzing one file at a time @ajnavarro
@campoy Regarding the functions. License audit is one of those nasty problems everybody hates to do in the enterprises yet many have to do (and pay for it).
FWIW tagging @marnovo as he is supposed to decide on the product features.
@ajnavarro what shall we do with this?
If it is just implementing a library, we can create a function like LICENSE(repository_id)