mirror of
https://github.com/go-gitea/gitea
synced 2025-07-19 08:48:37 +00:00
Add avatar and issue labels to template repositories (#9149)
* Add avatar and issue labels Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix redundant if-err Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
committed by
Lunny Xiao
parent
95c3dc856a
commit
62bcb2b7f1
@@ -47,6 +47,20 @@ func GenerateRepository(doer, owner *models.User, templateRepo *models.Repositor
|
||||
}
|
||||
}
|
||||
|
||||
// Avatar
|
||||
if opts.Avatar && len(templateRepo.Avatar) > 0 {
|
||||
if err = models.GenerateAvatar(ctx, templateRepo, generateRepo); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Issue Labels
|
||||
if opts.IssueLabels {
|
||||
if err = models.GenerateIssueLabels(ctx, templateRepo, generateRepo); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}); err != nil {
|
||||
if generateRepo != nil {
|
||||
|
Reference in New Issue
Block a user