mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-07-08 23:15:49 +00:00
Merge pull request #51 from laszlocph/reinstate-gated
Reinstate simplified gating logic
This commit is contained in:
commit
2ad7e08a28
|
@ -177,15 +177,15 @@ func PostHook(c *gin.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if repo.IsGated { // This feature is not clear to me. Reenabling once better understood
|
|
||||||
build.Status = model.StatusBlocked
|
|
||||||
}
|
|
||||||
|
|
||||||
// update some build fields
|
// update some build fields
|
||||||
build.RepoID = repo.ID
|
build.RepoID = repo.ID
|
||||||
build.Verified = true
|
build.Verified = true
|
||||||
build.Status = model.StatusPending
|
build.Status = model.StatusPending
|
||||||
|
|
||||||
|
if repo.IsGated && build.Sender != user.Login {
|
||||||
|
build.Status = model.StatusBlocked
|
||||||
|
}
|
||||||
|
|
||||||
err = store.CreateBuild(c, build, build.Procs...)
|
err = store.CreateBuild(c, build, build.Procs...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Errorf("failure to save commit for %s. %s", repo.FullName, err)
|
logrus.Errorf("failure to save commit for %s. %s", repo.FullName, err)
|
||||||
|
|
Loading…
Reference in a new issue