Merge remote-tracking branch 'origin/master' into zero-steps

* origin/master:
  Reinstate simplified gating logic
This commit is contained in:
Laszlo Fogas 2019-07-20 21:15:50 +02:00
commit 906c0c7a0d

View file

@ -182,15 +182,15 @@ func PostHook(c *gin.Context) {
return
}
if repo.IsGated { // This feature is not clear to me. Reenabling once better understood
build.Status = model.StatusBlocked
}
// update some build fields
build.RepoID = repo.ID
build.Verified = true
build.Status = model.StatusPending
if repo.IsGated && build.Sender != user.Login {
build.Status = model.StatusBlocked
}
err = store.CreateBuild(c, build, build.Procs...)
if err != nil {
logrus.Errorf("failure to save commit for %s. %s", repo.FullName, err)