Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# GitHub data scraper

## Quickstart

Set environment variables for `github` CLI and postgres.

```shell
export GITHUB_TOKEN=
export POSTGRES_USER=user
export POSTGRES_PASSWORD=password
export POSTGRES_DB=database
```

Build binary.

```shell
go build -v -o dist/github .
```

Start local database.

```shell
make
```

Start local database.

```shell
./dist/github issues -f sql -o postgres://user:password@localhost:5432/database hashicorp consul
```

## Releases

Retrieve releases created in the repository:
Expand Down
2 changes: 1 addition & 1 deletion scripts/init-database.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -225,5 +225,5 @@ CREATE TABLE IF NOT EXISTS github_metrics_referrers (
PRIMARY KEY (repository, owner, referrer, date)
);

GRANT ALL ON ALL TABLES IN SCHEMA "public" TO $POSTGRES_USER;
GRANT ALL ON ALL TABLES IN SCHEMA "public" TO "$POSTGRES_USER";
EOSQL