{"id":24518288,"url":"https://github.com/codefeedr/ghtorrent_mirror","last_synced_at":"2026-05-18T09:36:32.122Z","repository":{"id":132918865,"uuid":"179285910","full_name":"codefeedr/ghtorrent_mirror","owner":"codefeedr","description":"CodeFeedr plugin whichs mirror GHTorrent. ","archived":false,"fork":false,"pushed_at":"2019-05-21T08:00:02.000Z","size":879,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-22T01:41:31.020Z","etag":null,"topics":["ghtorrent","github"],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codefeedr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-04-03T12:31:20.000Z","updated_at":"2019-05-21T08:00:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"49a91a34-f4f1-4ab0-8d8b-fa40c5c3a40b","html_url":"https://github.com/codefeedr/ghtorrent_mirror","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefeedr%2Fghtorrent_mirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefeedr%2Fghtorrent_mirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefeedr%2Fghtorrent_mirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefeedr%2Fghtorrent_mirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codefeedr","download_url":"https://codeload.github.com/codefeedr/ghtorrent_mirror/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243719398,"owners_count":20336607,"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":["ghtorrent","github"],"created_at":"2025-01-22T01:41:42.433Z","updated_at":"2026-05-18T09:36:27.084Z","avatar_url":"https://github.com/codefeedr.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GHTorrent Mirror plugin\nThe goal of this plugin is to mirror GHTorrent. \n\n## Architecture\n\n## Experimental\n\n### 📊 Hourly commit stats\nThis stage reduces all commits to a stats object keyed on their commit date (hourly).\nThe stats object looks like this:\n```scala\n  case class Stats(date: String, commitStats: CommitStats)\n\n  case class CommitStats(totalCommits: Long, filesEdited: List[Extension])\n\n  case class Extension(name: String,\n                       additions: Long,\n                       deletions: Long,\n                       added: Long,\n                       removed: Long,\n                       modified: Long)\n```\n\nIn summary, every commit is keyed by date (e.g. `2019-01-01 09`) and then its stats are deduced and merged. Finally these stats are saved (and updated) in MongoDB.\nExample stats object:\n\n```json\n{\n    \"date\" : \"2013-02-06 11\",\n    \"commitStats\" : {\n        \"totalCommits\" : 1,\n        \"filesEdited\" : [ \n            {\n                \"name\" : \"js\",\n                \"additions\" : 28,\n                \"deletions\" : 23,\n                \"added\" : 0,\n                \"removed\" : 0,\n                \"modified\" : 1\n            }, \n            {\n                \"name\" : \"css\",\n                \"additions\" : 1,\n                \"deletions\" : 2,\n                \"added\" : 0,\n                \"removed\" : 0,\n                \"modified\" : 1\n            }\n        ]\n    }\n}\n```\n### 💗 Commit enrichment\nThe idea of this stage is to enrich Commit data with their corresponding PushEvent (if available). I.e. Add the `push_id` and `push_date` to a Commit.\n\nThe commit is enriched in the following case class:\n```scala\n  case class Pushed(push_id: Long,\n                    push_date: Date,\n                    pushed_from_github: Boolean = false)\n\n  case class EnrichedCommit(push: Option[Pushed], commit: Commit)\n```\nAll data is pushed into the `cf_commit` topic.\n\n\nThe flow diagram of this low-level join can be found below:\n![](flow_enrich.png)\n\nThe potential outcomes are:\n- PushEvent can be found and Commit is enriched with `push_id` and `push_date`.\n- PushEvent can not be found but it is derived that Commit is directly pushed from GH. The Commit is then enriched with no `push_id` and the `push_date == commit_date`.\n- No PushEvent can be found and Commit is just forwarded without `Pushed` data.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodefeedr%2Fghtorrent_mirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodefeedr%2Fghtorrent_mirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodefeedr%2Fghtorrent_mirror/lists"}