gitbase icon indicating copy to clipboard operation
gitbase copied to clipboard

[proposal] UDF to classify licenses

Open vmarkovtsev opened this issue 7 years ago • 9 comments

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

vmarkovtsev avatar Sep 23 '18 11:09 vmarkovtsev

I'm not sure about this, what's the use case?

campoy avatar Oct 11 '18 23:10 campoy

@campoy The use case is to classify the licenses. Wdym?

vmarkovtsev avatar Oct 12 '18 08:10 vmarkovtsev

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.

campoy avatar Oct 15 '18 17:10 campoy

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.

ajnavarro avatar Oct 16 '18 09:10 ajnavarro

It can work at the row level analyzing one file at a time @ajnavarro

vmarkovtsev avatar Oct 16 '18 09:10 vmarkovtsev

@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).

vmarkovtsev avatar Oct 16 '18 09:10 vmarkovtsev

FWIW tagging @marnovo as he is supposed to decide on the product features.

vmarkovtsev avatar Oct 16 '18 09:10 vmarkovtsev

@ajnavarro what shall we do with this?

erizocosmico avatar Oct 09 '19 08:10 erizocosmico

If it is just implementing a library, we can create a function like LICENSE(repository_id)

ajnavarro avatar Oct 09 '19 09:10 ajnavarro