Merge pull request #842 from pingiun/also-trigger-flakes

Also trigger flake based jobsets with push-github endpoint
This commit is contained in:
Eelco Dolstra 2021-01-03 18:28:29 +01:00 committed by GitHub
commit c4062c2772
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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( triggerJobset($self, $c, $_, 0) foreach $c->model('DB::Jobsets')->search(
{ 'project.enabled' => 1, 'me.enabled' => 1 }, { 'project.enabled' => 1, 'me.enabled' => 1 },
{ join => 'project' { 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(""); $c->response->body("");
} }