FrontPageGit = namedtuple('FrontPageGit', ['source', 'time', 'log', 'tag'])
FrontPageGitCommit = namedtuple('FrontPageGitCommit',
- ['hash', 'author', 'time', 'subject', 'repo'])
+ ['hash', 'author', 'email', 'time', 'subject', 'repo'])
class GitSource(CachedSource):
"""Represents a git repository.
'git',
'--git-dir=' + repo_path,
'log',
- '--pretty=%h%x00%an%x00%at%x00%s',
+ '--pretty=%h%x00%an%x00%aE%x00%at%x00%s',
"{0}..{1}".format(since_tag, tag),
]
proc = subprocess.Popen(git_log_args, stdout=PIPE)
for line in proc.stdout:
- hash, author, time, subject = line.strip().split('\x00')
+ hash, author, email, time, subject = line.strip().split('\x00')
commits.append(
FrontPageGitCommit(
hash = hash,
author = author,
+ email = email,
time = datetime.datetime.fromtimestamp(int(time)),
subject = subject,
repo = repo_name,
.frontpage-update table.striped-rows tr:nth-child(2n) { background: #e8e8e8; }
.frontpage-update table.striped-rows tr:nth-child(2n+1) { background: transparent; }
+.frontpage-update table.striped-rows tr:hover { background: #eae1d5; }
table.frontpage-repository { width: 100%; }
table.frontpage-repository tr.frontpage-repository-header { background: transparent !important; }
<tr>
<td class="hash"><a href="${update.source.gitweb}?p=${commit.repo}.git;a=commit;h=${commit.hash}">${commit.hash}</a></td>
- <td class="author">${commit.author}</td>
+ <td class="author">
+ <%! import hashlib %>\
+ <img src="http://www.gravatar.com/avatar/${hashlib.md5(commit.email).hexdigest()}?s=16d=identicon" alt="">
+ ${commit.author}
+ </td>
<td class="subject">${commit.subject}</td>
<td class="time">${commit.time}</td>
</tr>