{"id":28458343,"url":"https://github.com/flow-php/github-insights","last_synced_at":"2025-07-02T05:31:17.648Z","repository":{"id":209363888,"uuid":"721834280","full_name":"flow-php/github-insights","owner":"flow-php","description":"GitHub Insights - demo app that uses FlowPHP to consume and visualize GitHub data. ","archived":false,"fork":false,"pushed_at":"2025-02-14T07:37:01.000Z","size":1203,"stargazers_count":3,"open_issues_count":12,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-07T00:11:31.467Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://flow-php.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flow-php.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-11-21T21:41:16.000Z","updated_at":"2024-12-11T10:30:47.000Z","dependencies_parsed_at":"2024-12-11T11:25:37.323Z","dependency_job_id":"e7faca34-0a7d-468f-9a2d-92e9aca11ffd","html_url":"https://github.com/flow-php/github-insights","commit_stats":null,"previous_names":["flow-php/github-insights"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flow-php/github-insights","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flow-php%2Fgithub-insights","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flow-php%2Fgithub-insights/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flow-php%2Fgithub-insights/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flow-php%2Fgithub-insights/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flow-php","download_url":"https://codeload.github.com/flow-php/github-insights/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flow-php%2Fgithub-insights/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263081209,"owners_count":23410826,"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":[],"created_at":"2025-06-07T00:10:54.926Z","updated_at":"2025-07-02T05:31:17.633Z","avatar_url":"https://github.com/flow-php.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Insights \n\nThis is a simple demo app that uses the GitHub API and Flow PHP to fetch, aggregate, and display GitHub Insights. \nThe current version of this app is based on [flow-gh-api](https://github.com/stloyd/flow-gh-api).\n\n## Installation\n\n```console\ncomposer insatll\n```\n\nThis app requires only one secret, `GITHUB_TOKEN` it can be generated through [GitHub UI](https://github.com/settings/tokens).\nOnce you generate a token, put it into .env.local file in the root of the project.\n\n## How it works \n\nThe goal of this app is to read data from GitHub API, store it in a local Data Warehouse, and then aggregate in order \nto prepare reports. \n\nGH Pull Requests/Commits are fetched from GitHub API and stored in the local Data Warehouse as parquet files partitioned by date\nwhen PR was created.\n\nThis can be done by running: \n\n```console\nbin/gh fetch:pull-requests flow-php flow --after_date=\"2023-01-01\"\nbin/gh fetch:commits flow-php flow --after_date=\"2023-01-01\"\n```\n\nPlease be aware that we must first fetch pull requests since commits are taken from PR's.\n\nOnce data is stored in a local Data Warehouse, it can be aggregated and displayed in the form of a report. \n\n```console\nbin/gh aggregate:contributions flow-php flow --year=2023\n```\n\nThis will generate yearly report for a given org/repository and year. \n\n```console\nvar/data/mesh/dev/raw/org/flow-php/flow/repo/report/2023/daily_contributions.chart.json\nvar/data/mesh/dev/raw/org/flow-php/flow/repo/report/2023/daily_contributions.csv\nvar/data/mesh/dev/raw/org/flow-php/flow/repo/report/2023/top_contributors.csv\n```\n\nExample of Daily Contributions Report:\n\n```csv\ndate_utc,user_login,user_avatar,contribution_changes_total,contribution_changes_additions,contribution_changes_deletions,top_contributor_rank\n2023-01-05,norberttech,https://avatars.githubusercontent.com/u/1921950?v=4,497,212,285,1\n2023-01-19,norberttech,https://avatars.githubusercontent.com/u/1921950?v=4,742,337,405,1\n2023-01-30,ghost,https://avatars.githubusercontent.com/u/10137?v=4,1439,1257,182,3\n2023-01-31,norberttech,https://avatars.githubusercontent.com/u/1921950?v=4,229,175,54,1\n2023-02-12,stloyd,https://avatars.githubusercontent.com/u/67402?v=4,723,601,122,2\n2023-02-14,norberttech,https://avatars.githubusercontent.com/u/1921950?v=4,84,78,6,1\n2023-02-25,stloyd,https://avatars.githubusercontent.com/u/67402?v=4,19,8,11,2\n2023-02-26,stloyd,https://avatars.githubusercontent.com/u/67402?v=4,58,42,16,2\n2023-03-05,stloyd,https://avatars.githubusercontent.com/u/67402?v=4,757,517,240,2\n2023-03-13,norberttech,https://avatars.githubusercontent.com/u/1921950?v=4,684,574,110,1\n```\n\nExample of Top Contributors Report:\n\n```csv\nuser_login,user_avatar,contribution_changes_total,contribution_changes_additions,contribution_changes_deletions,rank\nnorberttech,https://avatars.githubusercontent.com/u/1921950?v=4,79460,47671,31789,1\nstloyd,https://avatars.githubusercontent.com/u/67402?v=4,39442,23154,16288,2\nghost,https://avatars.githubusercontent.com/u/10137?v=4,2118,1843,275,3\nowsiakl,https://avatars.githubusercontent.com/u/9623965?v=4,1201,482,719,4\nszepeviktor,https://avatars.githubusercontent.com/u/952007?v=4,150,75,75,5\nflavioheleno,https://avatars.githubusercontent.com/u/471860?v=4,20,18,2,6\nscyzoryck,https://avatars.githubusercontent.com/u/8014727?v=4,12,9,3,7\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflow-php%2Fgithub-insights","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflow-php%2Fgithub-insights","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflow-php%2Fgithub-insights/lists"}