mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 20:01:02 +00:00
Fix disabling PRs (#3258)
Closes https://github.com/woodpecker-ci/woodpecker/issues/3257
This commit is contained in:
parent
6925afd83b
commit
c8fa71874a
1 changed files with 1 additions and 1 deletions
|
@ -216,7 +216,7 @@ func PostHook(c *gin.Context) {
|
||||||
// 5. Check if pull requests are allowed for this repo
|
// 5. Check if pull requests are allowed for this repo
|
||||||
//
|
//
|
||||||
|
|
||||||
if tmpPipeline.Event == model.EventPull && !repo.AllowPull {
|
if (tmpPipeline.Event == model.EventPull || tmpPipeline.Event == model.EventPullClosed) && !repo.AllowPull {
|
||||||
log.Debug().Str("repo", repo.FullName).Msg("ignoring hook: pull requests are disabled for this repo in woodpecker")
|
log.Debug().Str("repo", repo.FullName).Msg("ignoring hook: pull requests are disabled for this repo in woodpecker")
|
||||||
c.Status(http.StatusNoContent)
|
c.Status(http.StatusNoContent)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue