1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-11-29 21:48:14 +02:00

New event pull request metadata (#5214)

Co-authored-by: qwerty287 <qwerty287@posteo.de>
This commit is contained in:
6543
2025-09-25 00:07:45 +02:00
committed by GitHub
parent e9c545e25b
commit 388557d94a
99 changed files with 11505 additions and 415 deletions

View File

@@ -327,7 +327,7 @@ func PostHook(c *gin.Context) {
// 5. Check if pull requests are allowed for this repo
//
if (pipelineFromForge.Event == model.EventPull || pipelineFromForge.Event == model.EventPullClosed) && !repo.AllowPull {
if pipelineFromForge.IsPullRequest() && !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