From f856eb73f2046d99b79e221314cdce1df43f9edd Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Tue, 30 Jul 2024 00:45:40 +0000 Subject: [PATCH] fix --- models/git/commit_status.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/models/git/commit_status.go b/models/git/commit_status.go index f80de9679f3a2..ed84dc68a9e2d 100644 --- a/models/git/commit_status.go +++ b/models/git/commit_status.go @@ -537,6 +537,10 @@ func ConvertFromGitCommit(ctx context.Context, commits []*git.Commit, repo *repo func CommitStatusesHideActionsURL(ctx context.Context, statuses []*CommitStatus) { idToRepos := make(map[int64]*repo_model.Repository) for _, status := range statuses { + if status == nil { + continue + } + if status.Repo == nil { status.Repo = idToRepos[status.RepoID] }