summaryrefslogtreecommitdiffstats
path: root/models/repo/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo/repo.go')
-rw-r--r--models/repo/repo.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/repo/repo.go b/models/repo/repo.go
index e7ec93a22a..dcffb63fd1 100644
--- a/models/repo/repo.go
+++ b/models/repo/repo.go
@@ -237,7 +237,7 @@ func (repo *Repository) AfterLoad() {
// LoadAttributes loads attributes of the repository.
func (repo *Repository) LoadAttributes(ctx context.Context) error {
// Load owner
- if err := repo.GetOwner(ctx); err != nil {
+ if err := repo.LoadOwner(ctx); err != nil {
return fmt.Errorf("load owner: %w", err)
}
@@ -373,8 +373,8 @@ func (repo *Repository) GetUnit(ctx context.Context, tp unit.Type) (*RepoUnit, e
return nil, ErrUnitTypeNotExist{tp}
}
-// GetOwner returns the repository owner
-func (repo *Repository) GetOwner(ctx context.Context) (err error) {
+// LoadOwner loads owner user
+func (repo *Repository) LoadOwner(ctx context.Context) (err error) {
if repo.Owner != nil {
return nil
}
@@ -388,7 +388,7 @@ func (repo *Repository) GetOwner(ctx context.Context) (err error) {
// It creates a fake object that contains error details
// when error occurs.
func (repo *Repository) MustOwner(ctx context.Context) *user_model.User {
- if err := repo.GetOwner(ctx); err != nil {
+ if err := repo.LoadOwner(ctx); err != nil {
return &user_model.User{
Name: "error",
FullName: err.Error(),