From f3964970d19900a20ae55db69deb09f39adfc0fb Mon Sep 17 00:00:00 2001 From: mrstanwell Date: Wed, 17 Mar 2021 18:35:06 -0500 Subject: [PATCH] Add list of changed files to "changes". --- buildbot_gitea/webhook.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/buildbot_gitea/webhook.py b/buildbot_gitea/webhook.py index 144d860..a6f4fd7 100644 --- a/buildbot_gitea/webhook.py +++ b/buildbot_gitea/webhook.py @@ -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,