{"id":50697227,"url":"https://github.com/tylercb/gitrelate","last_synced_at":"2026-06-09T07:04:48.209Z","repository":{"id":297164304,"uuid":"881445436","full_name":"tylercb/gitrelate","owner":"tylercb","description":"Find Related GitHub Repositories","archived":false,"fork":false,"pushed_at":"2026-03-27T02:38:52.000Z","size":595,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-27T14:58:42.720Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gitrelated.com","language":"TypeScript","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/tylercb.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":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-31T15:31:42.000Z","updated_at":"2026-03-05T21:29:02.000Z","dependencies_parsed_at":"2025-06-08T05:03:57.566Z","dependency_job_id":null,"html_url":"https://github.com/tylercb/gitrelate","commit_stats":null,"previous_names":["tylercb/gitrelate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tylercb/gitrelate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylercb%2Fgitrelate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylercb%2Fgitrelate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylercb%2Fgitrelate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylercb%2Fgitrelate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tylercb","download_url":"https://codeload.github.com/tylercb/gitrelate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylercb%2Fgitrelate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34095252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-06-09T07:04:46.855Z","updated_at":"2026-06-09T07:04:48.203Z","avatar_url":"https://github.com/tylercb.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Getting Started\n\nInstall node v20+, bun v1.2+, then install package dependencies:\n\n```bash\nbun install\n```\n\nRun the development server:\n\n```bash\nbun dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\n## Environment Variables\n\nCreate a `.env.local` file with the following variables:\n\n```bash\n# Client-side ClickHouse fetching (optional)\nNEXT_PUBLIC_USE_CLIENT_CLICKHOUSE=true\n\n# GitHub API access (optional - for rate limiting)\nGITHUB_TOKEN=your_github_personal_access_token_here\n```\n\n### Environment Variable Details:\n\n- `NEXT_PUBLIC_USE_CLIENT_CLICKHOUSE`: Set to `true` to fetch ClickHouse data directly from the browser instead of the server. This reduces server load and provides faster navigation between pages.\n- `GITHUB_TOKEN`: Optional GitHub personal access token to increase API rate limits when fetching repository metadata.\n\n## Update node packages\n\nTo check for outdated packages:\n\n```bash\nbun outdated\n```\n\nTo update packages:\n\n```bash\nbunx npm-check-updates --interactive --format group --packageManager=bun --target minor\n```\n\n## GitHub Event Type:\n\n[WatchEvent](https://docs.github.com/en/rest/using-the-rest-api/github-event-types?apiVersion=2022-11-28#watchevent) - when someone stars a repository. The type of activity is specified in the action property of the payload object. For more information, see \"REST API endpoints for activity.\"\n\nThe event object includes properties that are common for all events. Each event object includes a payload property and the value is unique to each event type. The payload object for this event is described below.\n\n## GitHub List stargazers\n\nWhen requesting a [list of stargazers](https://docs.github.com/en/rest/activity/starring?apiVersion=2022-11-28#list-stargazers), you can set a custom media type to find out when each user starred your repo.\n\n`application/vnd.github.star+json` - Includes a timestamp of when the star was created.\n\n## ClickHouse\n\n[GitHub Events](https://ghe.clickhouse.tech/) - ClickHouse dataset for GitHub events from GH Archive.\n\n### Repository affinity list:\n\nWhat are the top repositories sorted by the number of stars from people who starred the ClickHouse repository?\n\n```sql\nSELECT\n    repo_name,\n    count() AS stars\nFROM github_events\nWHERE (event_type = 'WatchEvent') AND (actor_login IN\n(\n    SELECT actor_login\n    FROM github_events\n    WHERE (event_type = 'WatchEvent') AND (repo_name IN ('ClickHouse/ClickHouse', 'yandex/ClickHouse'))\n)) AND (repo_name NOT IN ('ClickHouse/ClickHouse', 'yandex/ClickHouse'))\nGROUP BY repo_name\nORDER BY stars DESC\nLIMIT 50\n```\n\nLet's calculate the affinity index: the ratio of stars to repositories that were given by users that gave a star to ClickHouse.\n\n```sql\nSELECT\n    repo_name,\n    uniq(actor_login) AS total_stars,\n    uniqIf(actor_login, actor_login IN\n    (\n        SELECT actor_login\n        FROM github_events\n        WHERE (event_type = 'WatchEvent') AND (repo_name IN ('ClickHouse/ClickHouse', 'yandex/ClickHouse'))\n    )) AS clickhouse_stars,\n    round(clickhouse_stars / total_stars, 2) AS ratio\nFROM github_events\nWHERE (event_type = 'WatchEvent') AND (repo_name NOT IN ('ClickHouse/ClickHouse', 'yandex/ClickHouse'))\nGROUP BY repo_name\nHAVING total_stars \u003e= 100\nORDER BY ratio DESC\nLIMIT 50\n```\n\nThis is the perfect exploration tool for related repositories!\n\n### Finding friends through counting stars:\n\nLet me find a friend by the intersection on starred repositories.\n\n```sql\nWITH repo_name IN\n    (\n        SELECT repo_name\n        FROM github_events\n        WHERE (event_type = 'WatchEvent') AND (actor_login IN ('alexey-milovidov'))\n    ) AS is_my_repo\nSELECT\n    actor_login,\n    sum(is_my_repo) AS stars_my,\n    sum(NOT is_my_repo) AS stars_other,\n    round(stars_my / (203 + stars_other), 3) AS ratio\nFROM github_events\nWHERE event_type = 'WatchEvent'\nGROUP BY actor_login\nORDER BY ratio DESC\nLIMIT 50\n```\n\n### Affinity by issues and PRs\n\nAuthors that contributed to ClickHouse also contributed to what repositories?\n\n```sql\nSELECT\n    repo_name,\n    count() AS prs,\n    uniq(actor_login) AS authors\nFROM github_events\nWHERE (event_type = 'PullRequestEvent') AND (action = 'opened') AND (actor_login IN\n(\n    SELECT actor_login\n    FROM github_events\n    WHERE (event_type = 'PullRequestEvent') AND (action = 'opened') AND (repo_name IN ('yandex/ClickHouse', 'ClickHouse/ClickHouse'))\n)) AND (repo_name NOT ILIKE '%ClickHouse%')\nGROUP BY repo_name\nORDER BY authors DESC\nLIMIT 50\n```\n\nAuthors that filed an issue in ClickHouse also filed issues in what repositories?\n\n```sql\nSELECT\n    repo_name,\n    count() AS prs,\n    uniq(actor_login) AS authors\nFROM github_events\nWHERE (event_type = 'IssuesEvent') AND (action = 'opened') AND (actor_login IN\n(\n    SELECT actor_login\n    FROM github_events\n    WHERE (event_type = 'IssuesEvent') AND (action = 'opened') AND (repo_name IN ('yandex/ClickHouse', 'ClickHouse/ClickHouse'))\n)) AND (repo_name NOT ILIKE '%ClickHouse%')\nGROUP BY repo_name\nORDER BY authors DESC\nLIMIT 50\n```\n\nLet's check the proportion of stars to forks.\n\n```sql\nSELECT\n    repo_name,\n    sum(event_type = 'ForkEvent') AS forks,\n    sum(event_type = 'WatchEvent') AS stars,\n    round(stars / forks, 3) AS ratio\nFROM github_events\nWHERE event_type IN ('ForkEvent', 'WatchEvent')\nGROUP BY repo_name\nORDER BY forks DESC\nLIMIT 50\n```\n\n## ClickHouse Demo Access\n\nConnect with clickhouse-client:\n\n```bash\nclickhouse-client --secure --host play.clickhouse.com --user explorer\n```\n\nHTTPS interface: https://play.clickhouse.com/ (port 443)\n\nMinimal web UI: https://play.clickhouse.com/play?user=play\n\nKeep in mind that this dataset is actually very small for ClickHouse. There are multiple companies that use distributed multi-petabyte ClickHouse setups for various heavy duty tasks, e.g. to analyze a significant share of all internet traffic in real time. This article is not intended to advertise ClickHouse, but at least now you know where to look.\n\n## ClickHouse Sharing the results\n\nWe encourage you to create your own research and tools based on the dataset. This article is open-source and the content is available under the CC-BY-4.0 license or Apache 2 license. Attribution is required. You can propose changes, extend the article, and share ideas by pull requests and issues on GitHub repository. Please notify us about interesting usages of the dataset. We also encourage the application of the dataset for DBMS benchmarks.\n\nIf you need to cite this article, please do it as follows:\n`\"Milovidov A., 2020. Everything You Ever Wanted To Know About GitHub (But Were Afraid To Ask), https://ghe.clickhouse.tech/\"`\n\nThe authors don't own any rights to the dataset. The dataset includes material that may be subject to third party rights. The query results from the dataset are published under section 107 of the Copyright Act of 1976; allowance is made for \"fair use\" for purposes such as criticism, comment, news reporting, teaching, scholarship, education and research. Fair use is a use permitted by copyright statute that might otherwise be infringing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylercb%2Fgitrelate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftylercb%2Fgitrelate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylercb%2Fgitrelate/lists"}