https://github.com/georift/own-contribution-graph
Replicate contributions from external git hosts to GitHub
https://github.com/georift/own-contribution-graph
Last synced: 2 months ago
JSON representation
Replicate contributions from external git hosts to GitHub
- Host: GitHub
- URL: https://github.com/georift/own-contribution-graph
- Owner: Georift
- Created: 2022-11-20T14:39:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-16T13:25:03.000Z (almost 3 years ago)
- Last Synced: 2024-11-16T04:54:41.313Z (over 1 year ago)
- Language: TypeScript
- Size: 123 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `own-contribution-graph`
Say your company doesn't use GitHub, but you still want to continue your contribution graph on your GitHub account.
This tool will scan local repositories, and create a new repository with a series of empty commits that replicate your contributions seen in the local repositories.
## Usage
Create a configuration file in JSON:
```json
{
"sourceRepositories": {
"paths": [
"",
"/*"
],
"possibleBranchNames": ["origin/master", "origin/main"],
"authorEmails": [""]
},
"contributionsRepository": {
"path": "",
"remote": "origin git@github.com:/.git",
"includeRepositoryNameInCommits": true
}
}
```
Notes:
- `sourceRepositories`:
- `paths` contains the paths of the local repositories to scan; a path can be:
- directly a path to a Git repository,
- or a path to a directory containing multiple Git repositories, in this case, the path must end with `/*`.
- `possibleBranchNames` contains the branch names that will be looked for in the local repositories; once a branch is found, commits will be looked for in it.
- `authorEmails` contains a list of email addresses; the tool will retrieve commits made by these emails addresses.
- `contributionsRepository`:
- `path` contains the path to the contribution repository; it needs to not exist the first time the tool is run.
- `remote` (optional) contains the name and URL of a remote to add to the repo; this will allow you to easily run `git push`, potentially with `--force`, afterwards
- `includeRepositoryNameInCommits` (optional), if `true`, the name of the repository will be included in commit messages.
Run `owncontributiongraph` and provide it with the path to the config file:
```
owncontributiongraph --config=
```
Push this repo to GitHub, or anywhere else.
On subsequent runs, only new commits will be added to the contribution repository.