From 6618a4d796ab1493c9e52aa88305409eeabf567d Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Fri, 29 Dec 2023 13:14:22 +0100 Subject: [PATCH] Load changed files for closed PR --- server/forge/gitea/gitea.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/forge/gitea/gitea.go b/server/forge/gitea/gitea.go index ae6a6c1d07..d198d1ecb2 100644 --- a/server/forge/gitea/gitea.go +++ b/server/forge/gitea/gitea.go @@ -511,7 +511,7 @@ func (c *Gitea) Hook(ctx context.Context, r *http.Request) (*model.Repo, *model. return nil, nil, err } - if pipeline != nil && pipeline.Event == model.EventPull && len(pipeline.ChangedFiles) == 0 { + if pipeline != nil && (pipeline.Event == model.EventPull || pipeline.Event == model.EventPullClosed) && len(pipeline.ChangedFiles) == 0 { index, err := strconv.ParseInt(strings.Split(pipeline.Ref, "/")[2], 10, 64) if err != nil { return nil, nil, err