Skip to content

sparky-raccoon/pro-git-history

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About this project

pro-git-history is meant to mirror your activity as a professional developer throughout the year in a way that does not disclose any information about the company or the project you are working on, in case the company has decided not to enable the github enterprise related option, or is working with different git private instances than github (e.g gitlab).

The main idea is to forward the Github GraphQL api fetched contributions if your company's project is github hosted or count local authored commits from the current branch otherwise.

Installation

To use this tool, clone it to your local machine and install the necessary dependencies:

npm install

Get rid of the history of the cloned repository (most of the commits are to replicate my own contributions) and re-init git to start fresh :

rm -rf .git
git init
git add .
git commit -m "chore: init pro-git-history repo"

A .env file must be set up in the root directory of the project with the following information: USERNAME, and TOKEN are required when using the remote-fill command. These are respectively the URL, the username and the API token needed to make a call to the Github contributions API. Make sure your token has the right permissions - user should be enough

Usage

npm run start will fetch contributions from the company's Github instance and transform them into 1:1 commits.

Once the command has completed, you'll get either way empty commits with the folliwng message "history: has contributed to a private repo.". Their dates match the contributions / commits they replicate ☼. You can push them to your Github repository. This script is using Github Graph API - user.contributionsCollection. Contributions count are commits + opened PRs.

☼ Since github contributions do not hold hour / minute information, the replicated commits will be set to midnight.

Note that the replicated commits will be obfuscated and will not contain any information about the company or its projects.

It's ok to push other commits in-between "history: ..." commits, as long as the commit messages are different. Like, you can use anything but what's being used to distinguish history/contributions commits.

Note that the API may not return the exact same number of contributions. In my xp, reviews might not be included.

Contributing

Contributions to this project are welcomed ! Please note that this tool is first designed for my personal usage and may not cover all cases.

If you have any ideas for how to improve it or if you find any bugs, please feel free to submit a pull request or open an issue. Any contributions to make this tool more robust and adaptable to various use cases are welcomed.

Background

I created this project since I wasn't very happy about not being able to remember how much I got involved in companies, which made my public github history empty and did not reflect my overall activity as a developer.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published