realtux / gitdummy Goto Github PK
View Code? Open in Web Editor NEWPrivate contributions in your GitHub log without exposing private source code
Private contributions in your GitHub log without exposing private source code
Hello. First off I'd like to say that gitdummy looks great and I can't wait to get everything up and running! Nice work!
Unfortunately it seems that there's an error on line 3 of my repos.json. I store my private repository in an iCloud folder on my mac. The path is correct (I've tested in terminal multiple times) but after running the python gitdummy.py command it seems that there is an "Invalid \escape" error.
Any suggestions? I have posted my repos.json and the terminal output below.
repos.json
`
[
{
"target_repo" : ["/Users/stefanzier/Library/Mobile\ Documents/com\~apple\~CloudDocs/fitpin-info"],
"target_email" : ["[email protected]"],
"dummy_repo" : "/Users/stefanzier/Desktop/public-fitpin-repo",
"dummy_repo_data" : "/Users/stefanzier/Desktop/public-fitpin-repo/data",
"dummy_email" : "[email protected]",
"dummy_name" : "Stefan Zier",
"dummy_readme" : "This public repository reflects the commits from a private repo (minus the actual code)",
"dummy_ext" : ".js",
"dummy_code" : "'use strict';",
"hide_commits" : false,
"random_file_name" : true,
"auto_push" : true,
"force" : true,
"remote" : "https://github.com/stefanzier/public-fitpin-repo"
}
]
`
Terminal Output:
Traceback (most recent call last): File "gitdummy.py", line 15, in <module> repos = json.load(open('repos.json')) File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 291, in load **kw) File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads return _default_decoder.decode(s) File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 380, in raw_decode obj, end = self.scan_once(s, idx) ValueError: Invalid \escape: line 3 column 67 (char 74)
Thank you!
After running
python gitdummy.py
I get the following error:
since:
Traceback (most recent call last):
File "gitdummy.py", line 102, in <module>
log_split = log_output.split('\n')
TypeError: Type str doesn't support the buffer API
I'm running Python 3.4.2
I'm receiving this error when running:
python gitdummy.py
Unknown option: -C
usage: git [--version] [--help] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
Traceback (most recent call last):
File "gitdummy.py", line 41, in <module>
'--pretty=format:%an||||%ae||||%ad||||%s'
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['git', '-C', u'PATHTOMYTARGET', 'log', '--reverse', '--pretty=format:%an||||%ae||||%ad||||%s']' returned non-zero exit status 129
Hi,
Thanks for the repo. I have been trying to get this working on Windows but I get such an error:
C:\Users\oguzhangencoglu\SkyDrive\Oguz\GitHub\gitdummy>python gitdummy.py
since:
Traceback (most recent call last):
File "gitdummy.py", line 92, in <module>
'--pretty=format:%an||||%ae||||%ad||||%s||||%f-%h'
File "C:\Users\oguzhangencoglu\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "C:\Users\oguzhangencoglu\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\subprocess.py", line 710, in __init__
errread, errwrite)
File "C:\Users\oguzhangencoglu\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\subprocess.py", line 958, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
My json file looks like this:
[
{
"target_repo" : ["C:\\Users\\oguzhangencoglu\\SkyDrive\\Oguz\\Universite\\Research\\Digital Health Revolution (DHR) - Health Data Mining (HDM)\\Suomi24"],
"target_email" : ["[email protected]"],
"dummy_repo" : "C:\\Users\\oguzhangencoglu\\SkyDrive\\Oguz\\GitHub\\dummy_repo",
"dummy_repo_data" : "C:\\Users\\oguzhangencoglu\\SkyDrive\\Oguz\\GitHub\\dummy_repo\\data",
"dummy_email" : "[email protected]",
"dummy_name" : "Oguzhan Gencoglu",
"dummy_readme" : "This public repository reflects the commits from a private repo (minus the actual code)",
"dummy_ext" : "",
"dummy_code" : "'use strict';",
"hide_commits" : true,
"random_file_name" : false,
"auto_push" : false,
"force" : false,
"remote" : "https://github.com/ogencoglu/dummy_repo"
}
]
Any help would be great.
Calling 'python gitdummy.py' causes output error:
Traceback (most recent call last):
File "gitdummy.py", line 15, in <module>
if os.path.isdir(repo['dummy_repo'].strip()):
TypeError: string indices must be integers
Since issues and PR's are also trackable in public graph, it would be a nice improvement for the next version. If only it's possible.
TypeError when random_file_name is set to true on Python 3.4.3:
since:
Log Split Length: 319
Traceback (most recent call last):
File "gitdummy.py", line 140, in <module>
commit['filename'] = base64.urlsafe_b64encode(uuid.uuid4().bytes).replace('=
', '')
TypeError: 'str' does not support the buffer interface
This script doesn't work anymore. It completes successfully, however the history does not get added.
I have private repos I commit to on another Github account and want the history to transfer over, but I don't see it updated on my history. However, in my dummy repo, the commits are there.
So again, the script works, but the history is not added any longer.
Hi, I am trying to use this nice program on windows and Python3.
Problem is, I get a FileNotFoundError from
$ python gitdummy.py
Traceback (most recent call last):
File "gitdummy.py", line 73, in <module>
os.mkdir(repo['dummy_repo'])
FileNotFoundError: [WinError 3] ▒▒▒▒▒▒ ▒▒θ▒ ã▒▒ ▒▒ ▒▒▒▒▒ϴ▒: '~/Documents/dummy_myrepo'
What am I doing wrong??
Hi, how are you guys doing?
Is there anyway auto send credentials?
So we don't have to input the credentials every-time.
I feel sure that I've setup the json file correctly and when I run the python command there are no errors. Everything looks successful but when I look at the repositories on Github, it shows only one commit.
Here is my json:
[
{
"target_repo" : ["/Users/Kyla/Sites/success-academy"],
"target_email" : ["hi@kyla"],
"dummy_repo" : "/Users/Kyla/Sites/success-academy-stats",
"dummy_repo_data" : "/Users/Kyla/Sites/success-academy-stats/data",
"dummy_email" : "hi@kyla",
"dummy_name" : "Kyla Medina",
"dummy_readme" : "Repository Statistics",
"dummy_ext" : ".js",
"dummy_code" : "'use strict';",
"hide_commits" : true,
"auto_push" : true,
"force" : false,
"remote" : "https://github.com/kylamedina/success-academy-stats"
},
{
"target_repo" : ["/Users/Kyla/Sites/projectfolder"],
"target_email" : ["hi@kyla"],
"dummy_repo" : "/Users/Kyla/Sites/wooftale-mobile-stats",
"dummy_repo_data" : "/Users/Kyla/Sites/wooftale-mobile-stats/data",
"dummy_email" : "hi@kyla",
"dummy_name" : "Kyla Medina",
"dummy_readme" : "Repository Statistics",
"dummy_ext" : ".js",
"dummy_code" : "'use strict';",
"hide_commits" : true,
"auto_push" : true,
"force" : false,
"remote" : "https://github.com/kylamedina/wooftale-mobile-stats"
},
{
"target_repo" : ["/Users/Kyla/Sites/secondprojectfolder"],
"target_email" : ["hi@kyla"],
"dummy_repo" : "/Users/Kyla/Sites/wooftale-site-stats",
"dummy_repo_data" : "/Users/Kyla/Sites/wooftale-site-stats/data",
"dummy_email" : "hi@kyla",
"dummy_name" : "Kyla Medina",
"dummy_readme" : "Repository Statistics",
"dummy_ext" : ".js",
"dummy_code" : "'use strict';",
"hide_commits" : true,
"auto_push" : true,
"force" : false,
"remote" : "https://github.com/kylamedina/wooftale-site-stats"
}
]
Here is my terminal output:
since:
Log Split Length: 2300
Username for 'https://github.com': kylamedina
Password for 'https://[email protected]':
Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 284 bytes | 0 bytes/s, done.
Total 4 (delta 0), reused 0 (delta 0)
To https://github.com/kylamedina/success-academy-stats
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
since:
Log Split Length: 2800
Username for 'https://github.com': kylamedina
Password for 'https://[email protected]':
Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 284 bytes | 0 bytes/s, done.
Total 4 (delta 0), reused 0 (delta 0)
To https://github.com/kylamedina/wooftale-mobile-stats
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
since:
Log Split Length: 280
Username for 'https://github.com': kylamedina
Password for 'https://[email protected]':
Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 284 bytes | 0 bytes/s, done.
Total 4 (delta 0), reused 0 (delta 0)
To https://github.com/kylamedina/wooftale-site-stats
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
Hi, Great repo BTW. Considering our Github accounts are our resume.
Given this repos.json
[
{
"target_repo" : ["../js_for_lyfe/"],
"target_email" : ["[email protected]"],
"dummy_repo" : "../js_for_lyfe-mirror-repo/",
"dummy_repo_data" : "../js_for_lyfe-mirror-repo/data",
"dummy_email" : "[email protected]",
"dummy_name" : "Greg super",
"dummy_readme" : "This public repository reflects the commits from a private repo (minus the actual code)",
"dummy_ext" : ".js",
"dummy_code" : "'use strict';",
"hide_commits" : true,
"auto_push" : true,
"force" : false,
"remote" : "https://github.com/Duder-onomy/js_for_lyfe-mirror-repo.git"
}
]
Getting this error:
since:
Log Split Length: 4
PRIVATE COMMIT MESSAGE: Commit message is private
Traceback (most recent call last):
File "gitdummy.py", line 144, in <module>
dummyfile = open(repo['dummy_repo_data'] + os.path.sep + commit['filename']+repo['dummy_ext'], 'w+')
IOError: [Errno 2] No such file or directory: u'../js_for_lyfe-mirror-repo/data/initial-commit-114f642.js'
I can confirm that both that directory and that file exist.
Is it because my repo paths are relative?
How to make it do it for all branches?
After the user enters a wrong password, re-running the script gives "Length of commits was zero, nothing to update."
Any plans to add Gist support for this? Cool project by the way!
Heyo
So i just found your project ( which looks awesome btw. ), however when I tried to run it on my mac I only get :
Traceback (most recent call last):
File "./gitdummy.py", line 15, in <module>
repos = json.load(open('repos.json'))
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/__init__.py", line 268, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py", line 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid \escape: line 5 column 95 (char 104)
Any ideas how I can make it work ?
Thx in advance
Whenever I run the python script I get the following message
...
Your branch is up-to-date with 'origin/master'.
Untracked files:
.DS_Store
commits/-4ffd501.js
nothing added to commit but untracked files present
fatal: remote origin already exists.
Branch master set up to track remote branch master from origin.
Everything up-to-date
since: Tue Jan 13 00:57:20 2015 +0100
Log Split Length: 1
Traceback (most recent call last):
File "gitdummy.py", line 121, in
if len(commits) > 0:
NameError: name 'commits' is not defined
...
I had to delete to remove these files from the working directory (of the dummy repo) to make it work. Also I can't get to run the script for multiple repos at the same time. Sometimes the repos get mixed together, committing to the wrong repo.
I've run this expecting it to replay my private commits to the dummy repository at the times those commits were really made (so as to populate my contributions exactly as I see them), but they just added one single commit. Is this the expected behaviour?
Here's my repos.json:
[
{
"target_repo" : ["/Users/kungfujam/git/mooc_analysis","/Users/kungfujam/git/TheBlog","/Users/kungfujam/git/mlpr1","/Users/kungfujam/git/exc1"],
"target_email" : ["[email protected]","[email protected]"],
"dummy_repo" : "/Users/kungfujam/git/private_dummy",
"dummy_repo_data" : "/Users/kungfujam/git/private_dummy/data",
"dummy_email" : "[email protected]",
"dummy_name" : "Dummy",
"dummy_readme" : "This public repository reflects the commits from a private repo (minus the actual code)",
"dummy_ext" : ".js",
"dummy_code" : "'use strict';",
"hide_commits" : true,
"random_file_name" : false,
"auto_push" : true,
"force" : false,
"remote" : "https://github.com/kungfujam/private_dummy"
}
]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.