mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-08-12 18:26:28 +00:00
Fix disabling PRs (#3258)
Closes https://github.com/woodpecker-ci/woodpecker/issues/3257
This commit is contained in:
parent
6925afd83b
commit
c8fa71874a
@ -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 New Issue
Block a user