Is there an easy/efficient way to generate some high-level reports for a particular GitHub project?
e.g. lines of code committed over time, top contributors, etc
Is there an easy/efficient way to generate some high-level reports for a particular GitHub project?
e.g. lines of code committed over time, top contributors, etc
You can try applying gitstats to a cloned repo of your GitHub repo.
See for example the activity of the Git repo itself, with many data like the commits per year/month:
See also "Looking at Git Statistics", with the GitHub 'yearly_stats' for a simple little script.
Update April 2013 ("Get up to speed with Pulse"):
Check out Pulse
Pulse is a great way to discover recent activity on projects.
Maybe you haven't checked on your favorite repository in a while or you just discovered a project that looks interesting to you. Pulse will show you who has been actively committing and what has changed in a project's default branch:
You can find the link to the left of the nav bar.
You should have a look to repoXplorer, an open source project I develop. It is able to compute stats for a project (a group of git repositories) as well as for a contributor and a group of contributors. It provides a REST interface and a web UI. The web UI provides various information like, for a project:
But best is to have a look to the demo instance here.
Here is a screenshot of the stats of the Kubernetes project (all git repositories of github organization of kubernetes):
Now there are several tools that you could use (e.g. see this rather complete list: https://livablesoftware.com/tools-mine-analyze-github-git-software-data/ )
The right tool for you will also depend on you're just interested in the "git" part of the project or the "GitHub" part (i.e. stats on community activity).
I'd start by checking GrimoireLab , Apache Kibble and Sourced. They all allow you to configure and create a dashboard to display several metrics around your project
I am the author of weave-gitstats. Its opensource and based on weave. Most git statistics generators like gitstats or the statistics provided by github are "static", they don't have drilldown functionality, filtering and are limited to some default graphs. Weave-gistats provides a lot of dynamic dashboards that allow you to filter on eg year, author and allow you to create your own graphs using your own criteria.
If you are looking for something that is integrated with GitHub via GitHub Actions and hence needs no hosting service, the herdstat tool might be of use. It can be used to generate contribution graphs known from GitHub user profiles but for individual repositories or aggregated ones for multiple repositories, e.g., all repositories in a GitHub organization.
The tool is packaged as a Docker image and can be used as follows:
docker run --name herdstat-dev -it herdstat/herdstat:v0.5.1 \
/herdstat -r herdstat contribution-graph -u 2023-01-23
docker cp $(docker ps -aqf "name=herdstat-dev"):/contribution-graph.svg .
The graph is generated for a 52 week time frame ending with the date specified via the -u
/ --until
flag.
The second command copies the generated graph from the container to the current directory.
The tool is still in its early stages, but it generates informative and nice looking contribution charts like this one and also shows the number of contributions in the respective time frame.
The tool can be invoked periodically, e.g., nightly, using the herdstat GitHub Action by creating a workflow like the following:
on:
schedule:
# Runs every at midnight
- cron: '0 0 * * *'
jobs:
herdstat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: herdstat/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.HERDSTAT_PAT }}
- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
add: 'contribution-graph.svg'
message: 'Update contribution graph'
You have to create a .herdstat.yaml
file at the root of your repository that contains the herdstat configuration (see here for details).
Disclaimer: I am the author of herdstat.
© 2022 - 2025 — McMap. All rights reserved.