mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-04-26 21:44:44 +00:00
Reinstate simplified gating logic
This commit is contained in:
parent
e2b76ac449
commit
2cd5d8c02b
1 changed files with 4 additions and 4 deletions
|
@ -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