publiccode-crawler icon indicating copy to clipboard operation
publiccode-crawler copied to clipboard

Refactor (and rename) the `one` command

Open libremente opened this issue 5 years ago • 1 comments

When running the crawler on a single repo (using one), and the target repo is bitbucket, the remote repo is not cloned correctly. Error prompted:

ERRO[0002] [art-uniroma2/vocbench3] error while cloning: cannot clone a repository without git URL

libremente avatar Oct 24 '19 12:10 libremente

one needs to be refactored, starting from its name (why is it not a verb?), then continuing through the arguments it gets (a URL and... a file?), and finally document it properly.

I don't think it ever worked properly and besides, it has a lot of gotchas that make it pretty much useless.

In this particular case I think the catch is https://bitbucket.org/art-uniroma2/vocbench3.git didn't exist in the YAML file, because it gets detected after the crawling as it's inside an organization - that it does know about, not the repo.

The error just fails to explain the situation.

Passing the URL of an org could be a workaround, but one only works for single repos, the --help even seems to be mad about it.

❯ ./publiccode-crawler one --help
Crawl publiccode.yml from a single repository defined with [repo url]
		according to the supplied file(s).
		No organizations! Only single repositories!

Good news is that with the API we do have the single URL entity (Software) and we can refactor it properly.

bfabio avatar Mar 01 '23 18:03 bfabio