Skip to content

ad2ien/help-the-stars

Repository files navigation

Help the stars

Golang Gitmoji Docker License Build status

What

Given a github token and matrix credentials

  • Once a day, check configured labels like help-wanted issues of the repo stared by the user
  • Update info in an sqlite database
  • Send message to a matrix room with link and title
  • Serves an interface listing help wanting repos

Configuration

go run main.go --help

Matrix config is optional

How

Github graphql request : https://github.com/ad2ien/help-the-stars/blob/main/internal/stars.go#L53

Run

Create an env file

GITHUB_TOKEN=
DB_FILE="db/help-the-stars-dev.db"
LABELS='"help-wanted", "help wanted","junior friendly","good first issue"'

# optionally
MATRIX_HOMESERVER=
MATRIX_USERNAME=
MATRIX_PASSWORD=
MATRIX_ROOM_ID=

Start

source .env
go run *.go --debug \
--gh-token $GITHUB_TOKEN \
--db-file $DB_FILE \
--labels "${LABELS}" \
--matrix-server $MATRIX_HOMESERVER \
--matrix-username $MATRIX_USERNAME \
--matrix-password $MATRIX_PASSWORD \
--matrix-room $MATRIX_ROOM_ID

Or with docker

docker compose build
docker compose up

Generate code after queries modifications

alias sqlc="docker run --rm -v $PWD:/src -w /src sqlc/sqlc"
sqlc generate

Create migration

docker run -v $(pwd)/migrations:/migrations --network host migrate/migrate -path=/migrations -database "sqlite://db/help-the-stars.db" create -ext sql -dir /migrations -seq MIGRATION_NAME

About

Don't miss help wanted issues of the repo you stared

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors