Add list of changed files to "changes".
(cherry picked from commit f3964970d1
)
This commit is contained in:
parent
ada48bc6e5
commit
853874261c
|
@ -33,10 +33,14 @@ class GiteaHandler(BaseHookHandler):
|
||||||
commits = commits[:1]
|
commits = commits[:1]
|
||||||
|
|
||||||
for commit in commits:
|
for commit in commits:
|
||||||
|
files = []
|
||||||
|
for kind in ('added', 'modified', 'removed'):
|
||||||
|
files.extend(commit.get(kind, []))
|
||||||
timestamp = dateparse(commit['timestamp'])
|
timestamp = dateparse(commit['timestamp'])
|
||||||
change = {
|
change = {
|
||||||
'author': '{} <{}>'.format(commit['author']['name'],
|
'author': '{} <{}>'.format(commit['author']['name'],
|
||||||
commit['author']['email']),
|
commit['author']['email']),
|
||||||
|
'files': files,
|
||||||
'comments': commit['message'],
|
'comments': commit['message'],
|
||||||
'revision': commit['id'],
|
'revision': commit['id'],
|
||||||
'when_timestamp': timestamp,
|
'when_timestamp': timestamp,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user