Skip to content

Commit 383ad48

Browse files
committed
add readme
1 parent 3983ee9 commit 383ad48

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Django Git Data Dashboard
2+
Imports, analyzes and visualizes all of your Git history in a
3+
convenient Django-based web application data dashboard.
4+

data_loader.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
import os
22
from git import Repo
3+
from analyzer.models import GitRepository, GitCommit
34

45

5-
def parse_commit(commit):
6+
def print_commit(commit):
67
print("\"{}\" by {}".format(commit.summary, commit.author.name))
78
print(str(commit.authored_datetime))
89
print(str(commit.size))
910

1011

12+
def create_commit(commit):
13+
gc = GitCommit()
14+
return gc
15+
16+
1117
if __name__ == "__main__":
1218
repo_path = os.getenv('GIT_REPO_PATH')
1319

@@ -18,10 +24,10 @@ def parse_commit(commit):
1824

1925
# check out last commit
2026
last_commit = repo.head.commit
21-
parse_commit(last_commit)
27+
print_commit(last_commit)
2228

2329
# go through all commits
2430
commits = list(repo.iter_commits('master'))
2531
for commit in commits:
26-
parse_commit(commit)
32+
print_commit(commit)
2733

0 commit comments

Comments
 (0)