1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-03 09:07:19 +00:00
wxiaoguang
2023-05-11 16:25:46 +08:00
committed by GitHub
parent 58dfaf3a75
commit f6e029e6c7
10 changed files with 128 additions and 106 deletions

View File

@ -923,9 +923,8 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error {
func (g *GiteaLocalUploader) Rollback() error {
if g.repo != nil && g.repo.ID > 0 {
g.gitRepo.Close()
if err := models.DeleteRepository(g.doer, g.repo.OwnerID, g.repo.ID); err != nil {
return err
}
// do not delete the repository, otherwise the end users won't be able to see the last error message
}
return nil
}