summaryrefslogtreecommitdiff
path: root/zuul/driver/github/githubsource.py
diff options
context:
space:
mode:
authorJesse Keating <omgjlk@us.ibm.com>2017-06-13 12:32:33 -0700
committerJesse Keating <omgjlk@us.ibm.com>2017-06-15 22:40:18 -0700
commit19dfb4927c76dc88c1f663500bacbac18abab0dc (patch)
tree7bbb3f21fce943445d32645b24ecd4defcd13aba /zuul/driver/github/githubsource.py
parent776ad18ce5218a5185f9b0864aae621ade17b35e (diff)
downloadzuul-19dfb4927c76dc88c1f663500bacbac18abab0dc.tar.gz
Implement pipeline requirement of github labels
Projects that do not use github reviews may wish to instead use github labels as a way to trigger pipelines. As such, these projects may also wish to require labels exist on a pull request when processing other events. Change-Id: I8f73c438c58db38790ea7e5bf435fbda01324e77 Story: 2000774 Task: 4632
Diffstat (limited to 'zuul/driver/github/githubsource.py')
-rw-r--r--zuul/driver/github/githubsource.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/zuul/driver/github/githubsource.py b/zuul/driver/github/githubsource.py
index 519ebf16a..1bd280fb7 100644
--- a/zuul/driver/github/githubsource.py
+++ b/zuul/driver/github/githubsource.py
@@ -97,6 +97,7 @@ class GithubSource(BaseSource):
required_reviews=to_list(config.get('review')),
open=config.get('open'),
current_patchset=config.get('current-patchset'),
+ labels=to_list(config.get('label')),
)
return [f]
@@ -121,7 +122,8 @@ def getRequireSchema():
require = {'status': scalar_or_list(str),
'review': scalar_or_list(review),
'open': bool,
- 'current-patchset': bool}
+ 'current-patchset': bool,
+ 'label': scalar_or_list(str)}
return require