|
@@ -24,9 +24,6 @@ See below.
|
|
|
# [patch.new_file_path for patch in repo.diff('HEAD', 'HEAD~1'))]
|
|
|
|
|
|
|
|
|
-SUBMIT_HOST = '192.168.1.100'
|
|
|
-SUBMIT_PORT = 5000
|
|
|
-GIT_URL = "git@yourhost.domain:oz123/frank.git"
|
|
|
|
|
|
"""
|
|
|
This scripts submit a very simplified json record witht the following
|
|
@@ -49,6 +46,10 @@ information::
|
|
|
|
|
|
"""
|
|
|
|
|
|
+SUBMIT_HOST = '192.168.1.100'
|
|
|
+SUBMIT_PORT = 5000
|
|
|
+GITURL = "git@yourhost.domain:oz123/frank.git"
|
|
|
+
|
|
|
from pygit2 import Repository
|
|
|
|
|
|
repo = Repository('..')
|
|
@@ -57,12 +58,14 @@ commit = head.get_object()
|
|
|
|
|
|
json_to_submit = {}
|
|
|
|
|
|
-json_to_submit['commit'] = head.id
|
|
|
+json_to_submit['commit'] = commit.id
|
|
|
json_to_submit['branch'] = repo.head.shorthand
|
|
|
json_to_submit['committer'] = {'email': commit.committer.email,
|
|
|
- 'name', commit.committer.name}
|
|
|
+ 'name': commit.committer.name}
|
|
|
json_to_submit['author'] = {'email': commit.author.email,
|
|
|
- 'name', commit.author.name}
|
|
|
+ 'name': commit.author.name}
|
|
|
|
|
|
-json_to_sumbit['url'] = GIT_URL
|
|
|
+json_to_submit['url'] = GITURL
|
|
|
json_to_submit['time'] = datetime.datetime.now()
|
|
|
+
|
|
|
+print json_to_submit
|