Add list of changed files to "changes".

This commit is contained in:
mrstanwell 2021-03-17 18:35:06 -05:00
parent ada48bc6e5
commit f3964970d1

View File

@ -33,10 +33,14 @@ class GiteaHandler(BaseHookHandler):
commits = commits[:1]
for commit in commits:
files = []
for kind in ('added', 'modified', 'removed'):
files.extend(commit.get(kind, []))
timestamp = dateparse(commit['timestamp'])
change = {
'author': '{} <{}>'.format(commit['author']['name'],
commit['author']['email']),
'files': files,
'comments': commit['message'],
'revision': commit['id'],
'when_timestamp': timestamp,