All Projects → miromannino → Contributions Importer For Github

miromannino / Contributions Importer For Github

Licence: mit
This tool helps users to import contributions to GitHub from private git repositories, or from public repositories that are not hosted in GitHub.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Contributions Importer For Github

Scala Steward
🤖 A bot that helps you keep your Scala projects up-to-date
Stars: ✭ 812 (+452.38%)
Mutual labels:  gitlab, bitbucket
Export Pull Requests
Export pull requests and/or issues to a CSV file. Supports GitHub, GitLab, and Bitbucket
Stars: ✭ 68 (-53.74%)
Mutual labels:  gitlab, bitbucket
Git Repo
Git-Repo: CLI utility to manage git services from your workspace
Stars: ✭ 818 (+456.46%)
Mutual labels:  gitlab, bitbucket
Renovate
Universal dependency update tool that fits into your workflows.
Stars: ✭ 6,700 (+4457.82%)
Mutual labels:  gitlab, bitbucket
Gittar
🎸 Download and/or Extract git repositories (GitHub, GitLab, BitBucket). Cross-platform and Offline-first!
Stars: ✭ 87 (-40.82%)
Mutual labels:  gitlab, bitbucket
Webhooks
🎣 Webhook receiver for GitHub, Bitbucket, GitLab, Gogs
Stars: ✭ 601 (+308.84%)
Mutual labels:  gitlab, bitbucket
Scm Backup
Makes offline backups of your cloud hosted source code repositories
Stars: ✭ 38 (-74.15%)
Mutual labels:  gitlab, bitbucket
Danger
🚫 Stop saying "you forgot to …" in code review (in Ruby)
Stars: ✭ 4,691 (+3091.16%)
Mutual labels:  gitlab, bitbucket
Git History Browser Extension
Agrega un botón a la interfáz de archivos de github para ver su historial / Add a button to the github file interface to see its history
Stars: ✭ 87 (-40.82%)
Mutual labels:  gitlab, bitbucket
Git Copy History
Copy commit history from another repository
Stars: ✭ 84 (-42.86%)
Mutual labels:  gitlab, bitbucket
Gitmails
An information gathering tool to collect git commit emails in version control host services
Stars: ✭ 142 (-3.4%)
Mutual labels:  gitlab, bitbucket
Gitlink
A Jetbrains plugin that opens a local file under Git version control in its remote host using the default browser.
Stars: ✭ 101 (-31.29%)
Mutual labels:  gitlab, bitbucket
Vssue
📫 A Vue-powered Issue-based Comment Plugin
Stars: ✭ 496 (+237.41%)
Mutual labels:  gitlab, bitbucket
Git Touch
An open-source app for GitHub, GitLab, Bitbucket, Gitea, and Gitee(码云), built with Flutter
Stars: ✭ 663 (+351.02%)
Mutual labels:  gitlab, bitbucket
Git Deploy
Php Script for Auto-Pull in server (Using WebHook from GitLab, GitHub and Bitbucket)
Stars: ✭ 495 (+236.73%)
Mutual labels:  gitlab, bitbucket
Trackdown
TrackDown - Issue Tracking with plain Markdown. If you are missing the "git clone" for your tickets from github.com or bitbucket.org, then this is for you. A lightweight Ticketing System for distributed and unconnected small Teams.
Stars: ✭ 10 (-93.2%)
Mutual labels:  gitlab, bitbucket
Ghorg
Quickly clone an entire org/users repositories into one directory - Supports GitHub, GitLab, Bitbucket, and more
Stars: ✭ 377 (+156.46%)
Mutual labels:  gitlab, bitbucket
Codestream
The Code Collaboration Tool Built for Remote Teams
Stars: ✭ 459 (+212.24%)
Mutual labels:  gitlab, bitbucket
Notes
Some public notes
Stars: ✭ 1,248 (+748.98%)
Mutual labels:  gitlab, bitbucket
Integram
Integrate Telegram into your workflow – Trello, Gitlab, Bitbucket and other bots
Stars: ✭ 1,365 (+828.57%)
Mutual labels:  gitlab, bitbucket

Contributions Importer for GitHub

This tool helps users to import contributions to GitHub from private git repositories, or from public repositories that are not hosted in GitHub.

How it Works

In its simplest case, this tools copies all commits from a source git repository to a mock git repository. Each copied commit will report the same commit date, but the original code is not copied, neither the commit message.

Contributions Importer will create instead mock code in order to report which languages have been used in the source repository.

You can also have multiple source git repository as well in order to report activities from several private git repositories.

Reasons

GitHub shows contributions statistics of its users. There are several reasons why this feature could be debatable.

Moreover, this mechanism only rewards developers that work on GitHub maintained repositories.

Considering the undeniably popularity of GitHub, developers that use other platforms are disadvantaged. In fact, it is increasing the number of developers that refer to their GitHub contributions in resumes. Similarly, recruiters may use GitHub to find talents.

In more extreme cases, some developers decided to boycott this GitHub's lock-in system, and developed tools that can alter GitHub's contribution graph with fake commits: Rockstar and Vanity text for GitHub are good examples.

Instead, the aim of Contributions Importer for GitHub is to generate an overall realistic activity overview.

Other good tutorials about this project

How to Use

Contributions Importer is for developers. No UI, nor simple command line tools. This tool can be used by writing a simple Python script:

import git
from git_contributions_importer import *

repo = git.Repo("path/to/your/private/repo")
mock_repo = git.Repo("path/to/your/mock/repo")

importer = Importer([repo], mock_repo)
importer.set_author('[email protected]')

importer.import_repository()

If the mock repository folder could be an empty git repository as well as a repository that has already other commits.

Protecting your private repository

Contributions Importer has few features to protect your private code.

Masking the real commit time

importer.set_commit_time_max_past(value)

Maximum amount in the past that the commit can be shifted for. The values are in seconds.

Maximum number of changes per file

importer.set_max_changes_per_file(max_amount)

Maximum number of changes per file. By default for each change (line of code changed, added or removed) a line of mock code is changed. Instead, set_max_changes_per_file() would limit the number of generated mock code for extreme cases where too many lines of codes are changes (e.g. SQL database dump). The default is 5.

Collapse multiple changes into one

importer.set_collapse_multiple_changes_to_one(true)

It allows the importer to collapse several lines of changes to just one per commit, and one per type of file. This allows avoiding excessive growth of files size. The default is set to True.

Maximum number of changes per commit

importer.set_commit_max_amount_changes(max_amount)

The maximum number of changes (line of code changed, added or removed) that a commit can have. Commits with many changes are disadvantaged in GitHub. Most likely these large commits could have been split in many smaller ones. GitHub users that know how contributions are calculated are prone to do several smaller commits instead, while in private repository this could not be necessary, especially in smaller teams. The default is -1, and it is to indicate no limits.

Maximum time backward

importer.set_changes_commits_max_time_backward(max_amount)

If set_commit_max_amount_changes() has been used, a commit could be split. In that case this value decides how long these commits could go in the past. The idea is that a big commit is likely composed by several features that could have been committed in different commits. These changes would have been some time before the actual real commit. The time is in seconds, the default is 4 days (good in simpler projects where there is a "backup" commit every week).

Ignore Before Date

importer.set_ignore_before_date(value)

Importer will ignore all commits before this date (number of seconds from 1970-01-01 UTC)

Just last commit

importer.set_start_from_last(false)

The importer will fetch last commited date from mock_repo and will ignore all commits before this date. If ignore_before_date is set all commits before the most recent date between last commit and ignore_before_date will be ignored. Useful to do incremental imports.

Set Author

importer.set_author(email)

Author to analyse. If not set, commits from any author will be imported. Author is given as email. This could also be an array in case the author uses different emails.

Contributing

Code style

Regarding code style like indentation and whitespace, follow the conventions you see used in the source already.

Submitting pull requests

  • Create a new branch, please don't work in your master branch directly.
  • Add failing tests for the change you want to make.
  • Fix stuff.
  • Ensure that the written tests don't fail anymore, as well as the other tests.
  • Update the documentation to reflect any changes.
  • Push to your fork and submit a pull request.

License

MIT License

Copyright (c) 2018 Miro Mannino

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].