Fix nil pointer dereference during GitHub Hook parsing (#5681)

This commit is contained in:
6543
2025-10-23 20:44:41 +02:00
committed by GitHub
parent 6fa163514b
commit fbaa339863

View File

@@ -633,7 +633,7 @@ func (c *client) Hook(ctx context.Context, r *http.Request) (*model.Repo, *model
if err != nil {
return nil, nil, err
}
} else if pipeline.Event == model.EventPush {
} else if pipeline != nil && pipeline.Event == model.EventPush {
// GitHub has removed commit summaries from Events API payloads from 7th October 2025 onwards.
pipeline, err = c.loadChangedFilesFromCommits(ctx, repo, pipeline, prevCommit, currCommit)
if err != nil {