From 8b132bdec62258e1586c06977e8861c2468bf730 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 2 Sep 2021 18:51:32 +0800 Subject: [PATCH] Ignore review comment when ref commit is missed (#16905) (#16919) backport #16905 --- modules/migrations/gitea_uploader.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/migrations/gitea_uploader.go b/modules/migrations/gitea_uploader.go index e422bb54ce..d1960d2d55 100644 --- a/modules/migrations/gitea_uploader.go +++ b/modules/migrations/gitea_uploader.go @@ -808,7 +808,8 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error { } headCommitID, err := g.gitRepo.GetRefCommitID(pr.GetGitRefName()) if err != nil { - return fmt.Errorf("GetRefCommitID[%s]: %v", pr.GetGitRefName(), err) + log.Warn("GetRefCommitID[%s]: %v, the review comment will be ignored", pr.GetGitRefName(), err) + continue } var patch string