From c8fa71874acf3470011df2a2f38785fa03f1a005 Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Mon, 22 Jan 2024 20:46:46 +0100 Subject: [PATCH] Fix disabling PRs (#3258) Closes https://github.com/woodpecker-ci/woodpecker/issues/3257 --- server/api/hook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/api/hook.go b/server/api/hook.go index cc247bac8..91abc3971 100644 --- a/server/api/hook.go +++ b/server/api/hook.go @@ -216,7 +216,7 @@ func PostHook(c *gin.Context) { // 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") c.Status(http.StatusNoContent) return