{"id":18581890,"url":"https://github.com/coder/starquery","last_synced_at":"2025-04-10T11:35:36.608Z","repository":{"id":250020239,"uuid":"823188370","full_name":"coder/starquery","owner":"coder","description":"Query in near-realtime if a user has starred a GitHub repository.","archived":false,"fork":false,"pushed_at":"2025-03-13T00:30:47.000Z","size":180,"stargazers_count":5,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T22:35:30.691Z","etag":null,"topics":["github-stars","golang"],"latest_commit_sha":null,"homepage":"https://starquery.coder.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-02T14:49:04.000Z","updated_at":"2025-02-15T04:42:49.000Z","dependencies_parsed_at":"2024-07-24T19:43:57.717Z","dependency_job_id":null,"html_url":"https://github.com/coder/starquery","commit_stats":null,"previous_names":["coder/starquery"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fstarquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fstarquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fstarquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fstarquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coder","download_url":"https://codeload.github.com/coder/starquery/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208688,"owners_count":21065205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-stars","golang"],"created_at":"2024-11-07T00:08:06.053Z","updated_at":"2025-04-10T11:35:31.589Z","avatar_url":"https://github.com/coder.png","language":"Go","readme":"\u003ch1\u003e\n    \u003cimg src=\"./icon.png\" width=\"48px\" style=\"margin-right: 12px;\" align=\"center\"\u003e\n    starquery\n\u003c/h1\u003e\n\n[![\"Join us on\nDiscord\"](https://badgen.net/discord/online-members/coder)](https://coder.com/chat?utm_source=github.com/coder/vscode-coder\u0026utm_medium=github\u0026utm_campaign=readme.md)\n\nQuery in near-realtime if a user has starred a GitHub repository.\n\n```\nhttps://starquery.coder.com/coder/coder/user/kylecarbs\n```\n\n- Uses GitHub Webhooks for near-realtime accuracy.\n- Periodically refreshes all stargazers using GitHub's GraphQL API for accuracy.\n- Start tracking a repository by [adding it to the list](https://github.com/coder/starquery/blob/main/cmd/starquery/main.go#L52)!\n\nThis service is used by [coder/coder](https://github.com/coder/coder) to prompt users to star the repository if they haven't already!\n\n## Deployment\n\nstarquery is hosted at [starquery.coder.com](https://starquery.coder.com). Not all repositories are tracked by default (that'd be a lot to handle!). Feel free to repositories [here](https://github.com/coder/starquery/blob/main/cmd/starquery/main.go#L52).\n\nTo run starquery, `GITHUB_TOKEN` and `REDIS_URL` are required. `WEBHOOK_SECRET` must be set if accepting Webhooks from GitHub's API.\n\n### Hosted\n\nThe `./deploy.sh` script can be used to update the service (probably should be automated at some point).\n\n`/run/starquery/environ` must exist. Here is a template:\n\n```env\nREDIS_URL=127.0.0.1:6379\nBIND_ADDRESS=127.0.0.1:8080\n# use cdrci account\nGITHUB_TOKEN=\nWEBHOOK_SECRET=\n```\n\nTo set up the Cloudflare Tunnel, see [the config file](./cloudflared.yaml). `cloudflared` is ran in `screen -S cloudflared`:\n\n```sh\ncloudflared tunnel run 7e5e3b0d-4eb3-4aff-9924-e5f6efebcc2d\n```\n\nTo set up a GitHub webhook:\n\n1. Head to the \"New Webhook\" page (e.g. https://github.com/coder/starquery/settings/hooks/new).\n2. Set the payload URL to `https://starquery.coder.com/webhook`.\n3. Click \"Let me select individual events.\", uncheck \"Push\", check \"Stars\".\n\nDelivery should succeed for the initial ping!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder%2Fstarquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoder%2Fstarquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder%2Fstarquery/lists"}