support github pull request labels

Allow to match trigger on adding or removing github labels. Also
reporter can add or remove labels.

Change-Id: Id385b92590e252c283ba3ebe1ecfd33b34469a2e
Co-Authored-By: Jesse Keating <omgjlk@us.ibm.com>
This commit is contained in:
Jan Hruban
2015-11-07 14:39:07 +01:00
committed by Jesse Keating
parent 49bff07ec8
commit 16ad31f3c6
9 changed files with 224 additions and 5 deletions

View File

@@ -36,11 +36,15 @@ class GithubTrigger(BaseTrigger):
actions = trigger.get('action')
refs = trigger.get('refs')
comments = self._toList(trigger.get('comment'))
labels = trigger.get('label')
unlabels = trigger.get('unlabel')
f = EventFilter(trigger=self,
types=self._toList(types),
actions=self._toList(actions),
refs=self._toList(refs),
comments=self._toList(comments))
comments=self._toList(comments),
labels=self._toList(labels),
unlabels=self._toList(unlabels))
efilters.append(f)
return efilters
@@ -60,6 +64,8 @@ def getSchema():
'action': toList(str),
'ref': toList(str),
'comment': toList(str),
'label': toList(str),
'unlabel': toList(str),
}
return github_trigger