Skip to content

ghsync fails when running sourced init local #54

@dpordomingo

Description

@dpordomingo

src-d/gitcollector#64

When source{d} CE is inited with a local workdir, shsync is started and then it fails fast because it was not passed an org.

$ export GHSYNC_POSTGRES_DB=metadata
$ export GHSYNC_POSTGRES_USER=metadata
$ export GHSYNC_POSTGRES_PASSWORD=metadata
$ export GHSYNC_POSTGRES_HOST=127.0.0.1
$ export GHSYNC_POSTGRES_PORT=5433
$ export GHSYNC_TOKEN=
$ export GHSYNC_ORGS=
$ ghsync shallow
INFO connection with the DB established
INFO status table 'status' created
GET https://api.github.com/orgs/: 401 Bad credentials []

It should have the same behavior than gitcollector, and imo it should be the following:
if an empty org is passed, it should exit 0 (as gitcollector does), and log a warning,
e.g. no organizations to scrape

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions