Load changed files for closed PR (#3067)

This commit is contained in:
qwerty287 2023-12-29 22:50:31 +01:00 committed by GitHub
parent 567e83350c
commit 72ae8828ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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