| |
@@ -49,9 +49,17 @@
|
| |
|
| |
for key, expected in filter.items():
|
| |
actual = msg['msg']['issue'].get(key)
|
| |
- if actual != expected:
|
| |
- log.info("Actual %r %r != expected %r" % (key, actual, expected))
|
| |
- return None
|
| |
+ # special handling for label: we look for it in the list of msg labels
|
| |
+ if key == 'label':
|
| |
+ labels = [label['name'] for label in msg['msg']['issue']['labels']]
|
| |
+ if actual not in labels:
|
| |
+ log.info("Label %s not set on issue" % actual)
|
| |
+ return None
|
| |
+ else:
|
| |
+ # direct comparison
|
| |
+ if actual != expected:
|
| |
+ log.info("Actual %r %r != expected %r" % (key, actual, expected))
|
| |
+ return None
|
| |
|
| |
return i.Issue.from_github(upstream, msg['msg']['issue'], config)
|
| |
|
| |
Allow the config to specify a label to look for in an issue's labels.
Change rpm-ostree config to make use of this. Also listen for
'github.issue.reopened' issues.
Only mildly tested. :)