Query in near-realtime if a user has starred a GitHub repository.
https://starquery.coder.com/coder/coder/user/kylecarbs
- Uses GitHub Webhooks for near-realtime accuracy.
- Periodically refreshes all stargazers using GitHub's GraphQL API for accuracy.
- Start tracking a repository by adding it to the list!
This service is used by coder/coder to prompt users to star the repository if they haven't already!
starquery is hosted at starquery.coder.com. Not all repositories are tracked by default (that'd be a lot to handle!). Feel free to repositories here.
To run starquery, GITHUB_TOKEN
and REDIS_URL
are required. WEBHOOK_SECRET
must be set if accepting Webhooks from GitHub's API.
The ./deploy.sh
script can be used to update the service (probably should be automated at some point).
/run/starquery/environ
must exist. Here is a template:
REDIS_URL=127.0.0.1:6379
BIND_ADDRESS=127.0.0.1:8080
# use cdrci account
GITHUB_TOKEN=
WEBHOOK_SECRET=
To set up the Cloudflare Tunnel, see the config file. cloudflared
is ran in screen -S cloudflared
:
cloudflared tunnel run 7e5e3b0d-4eb3-4aff-9924-e5f6efebcc2d
To set up a GitHub webhook:
- Head to the "New Webhook" page (e.g. https://github.com/coder/starquery/settings/hooks/new).
- Set the payload URL to
https://starquery.coder.com/webhook
. - Click "Let me select individual events.", uncheck "Push", check "Stars".
Delivery should succeed for the initial ping!