Improve logging of GithubTriggerEvents

The GithubTriggerEvents currently don't log any detail of the event
itself. This makes it hard to analize issues using the log. We should
add more details about the action, project and pull request if
available.

Change-Id: Id07aa2c0bcfe743a0bfa34d635e77e9ecac4dc48
This commit is contained in:
Tobias Henkel 2018-06-13 09:47:25 +02:00
parent b4a4718b4f
commit 28d3721c01
No known key found for this signature in database
GPG Key ID: 03750DEC158E5FA2
1 changed files with 6 additions and 0 deletions

View File

@ -53,6 +53,7 @@ class GithubTriggerEvent(TriggerEvent):
self.title = None
self.label = None
self.unlabel = None
self.action = None
self.delivery = None
def isPatchsetCreated(self):
@ -67,6 +68,11 @@ class GithubTriggerEvent(TriggerEvent):
def _repr(self):
r = [super(GithubTriggerEvent, self)._repr()]
if self.action:
r.append(self.action)
r.append(self.canonical_project_name)
if self.change_number:
r.append('%s,%s' % (self.change_number, self.patch_number))
if self.delivery:
r.append('delivery: %s' % self.delivery)
return ' '.join(r)