Skip to content

Generates an SVG graph of GitHub commit activity by hour for given repos or all repos for a given GitHub account, and optionally filtered to a specific user

License

Notifications You must be signed in to change notification settings

HariSekhon/GitHub-Graph-Commit-Times

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hari Sekhon - GitHub Graph Commit Times

GitHub stars GitHub forks Lines of Code License My LinkedIn GitHub Last Commit

Codacy CodeFactor Quality Gate Status Maintainability Rating Reliability Rating Security Rating

Golang Linux Mac

Mac Homebrew Alpine CentOS Debian Fedora Redhat Rocky Ubuntu

CI Builds Overview Azure DevOps Pipeline GitLab Pipeline BitBucket Pipeline

Repo on GitHub Repo on GitLab Repo on Azure DevOps Repo on BitBucket

Validation Kics Grype Semgrep Semgrep Cloud SonarCloud Trivy

GitHub Graph Commit Times

This Golang program generates a graphical representation (SVG) of commit activity by hour for any number of GitHub repositories.

It can also filter commits by a specific user or email.

There is also a similar version in Bash in the HariSekhon/DevOps-Bash-tools repo.

Features

  • Fetch commits from multiple GitHub repositories
  • Visualize commits by hour (0-23)
  • Option to filter commits by username or email
  • Saves output as an SVG graph

Run

go run main.go <username>

eg.

go run main.go harisekhon

Build

To compile a portable binary:

make build

Run Binary

Will fetch all public non-fork repos and for each one the commit log to generate the commits for the graph.

./github-graph-commit-times harisekhon

Result

graph.svg:

Commit Hours Graph

Caveats

GitHub API returns Times in UTC

...and there is no way to know the original timezone of the programmer this way.

Scripts git/git_graph_commit_times_*.sh that generate graphs from local git repo checkouts in the DevOps-Bash-tools repo will get local timezone hours from the local git log in each checkout, but this only works if you have all the repos checked out locally so requires much more admin than querying the GitHub API.

This issue has been raised against GitHub API.

More Core Repos

Knowledge

Readme Card Readme Card

DevOps Code

Readme Card Readme Card Readme Card Readme Card

Containerization

Readme Card Readme Card

CI/CD

Readme Card Readme Card

DBA - SQL

Readme Card

DevOps Reloaded

Readme Card Readme Card Readme Card Readme Card Readme Card Readme Card

Misc

Readme Card Readme Card Readme Card

The rest of my original source repos are here.

Pre-built Docker images are available on my DockerHub.

About

Generates an SVG graph of GitHub commit activity by hour for given repos or all repos for a given GitHub account, and optionally filtered to a specific user

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published