Skip to content

Commit e2297f3

Browse files
committed
Merge branch 'add-changed-files' of https://github.com/mrstanwell/buildbot-gitea into mrstanwell-add-changed-files
2 parents d67eeed + f396497 commit e2297f3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

buildbot_gitea/webhook.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,14 @@ def process_push(self, payload, event_type, codebase):
3636
commits = commits[:1]
3737

3838
for commit in commits:
39+
files = []
40+
for kind in ('added', 'modified', 'removed'):
41+
files.extend(commit.get(kind, []))
3942
timestamp = dateparse(commit['timestamp'])
4043
change = {
4144
'author': '{} <{}>'.format(commit['author']['name'],
4245
commit['author']['email']),
46+
'files': files,
4347
'comments': commit['message'],
4448
'revision': commit['id'],
4549
'when_timestamp': timestamp,

0 commit comments

Comments
 (0)