Allow push-github endpoint to also trigger flakes

This commit is contained in:
Jelle Besseling 2020-12-28 15:21:45 +01:00
parent bde8d81876
commit 1b3000e132
No known key found for this signature in database
GPG key ID: 9712452E8BE3372E

View file

@ -265,7 +265,7 @@ sub push_github : Chained('api') PathPart('push-github') Args(0) {
triggerJobset($self, $c, $_, 0) foreach $c->model('DB::Jobsets')->search(
{ 'project.enabled' => 1, 'me.enabled' => 1 },
{ join => 'project'
, where => \ [ 'exists (select 1 from JobsetInputAlts where project = me.project and jobset = me.name and value like ?)', [ 'value', "%github.com%$owner/$repo%" ] ]
, where => \ [ 'me.flake like ? or exists (select 1 from JobsetInputAlts where project = me.project and jobset = me.name and value like ?)', [ 'flake', "%github%$owner/$repo%"], [ 'value', "%github.com%$owner/$repo%" ] ]
});
$c->response->body("");
}