Ignore review comment when ref commit is missed (#16905)

This commit is contained in:
Lunny Xiao 2021-09-01 19:33:07 +08:00 committed by GitHub
parent 7062614dee
commit de2e96e37b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -880,7 +880,8 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error {
} }
headCommitID, err := g.gitRepo.GetRefCommitID(pr.GetGitRefName()) headCommitID, err := g.gitRepo.GetRefCommitID(pr.GetGitRefName())
if err != nil { 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 var patch string