Skip to content

Commit

Permalink
Fix disabling PRs (#3258)
Browse files Browse the repository at this point in the history
Closes #3257
  • Loading branch information
qwerty287 authored Jan 22, 2024
1 parent 6925afd commit c8fa718
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/api/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c8fa718

Please sign in to comment.