summaryrefslogtreecommitdiffstats
path: root/routers/web/repo
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo')
-rw-r--r--routers/web/repo/compare.go2
-rw-r--r--routers/web/repo/http.go4
-rw-r--r--routers/web/repo/issue.go4
-rw-r--r--routers/web/repo/pull.go8
-rw-r--r--routers/web/repo/setting.go2
-rw-r--r--routers/web/repo/view.go4
6 files changed, 12 insertions, 12 deletions
diff --git a/routers/web/repo/compare.go b/routers/web/repo/compare.go
index 5b6faf4d83..4e40867de2 100644
--- a/routers/web/repo/compare.go
+++ b/routers/web/repo/compare.go
@@ -279,7 +279,7 @@ func ParseCompareInfo(ctx *context.Context) *CompareInfo {
}
return nil
}
- if err := ci.HeadRepo.GetOwner(ctx); err != nil {
+ if err := ci.HeadRepo.LoadOwner(ctx); err != nil {
if user_model.IsErrUserNotExist(err) {
ctx.NotFound("GetUserByName", nil)
} else {
diff --git a/routers/web/repo/http.go b/routers/web/repo/http.go
index e82b94b9e8..9d4ffccc6d 100644
--- a/routers/web/repo/http.go
+++ b/routers/web/repo/http.go
@@ -146,8 +146,8 @@ func httpBase(ctx *context.Context) (h *serviceHandler) {
// don't allow anonymous pulls if organization is not public
if isPublicPull {
- if err := repo.GetOwner(ctx); err != nil {
- ctx.ServerError("GetOwner", err)
+ if err := repo.LoadOwner(ctx); err != nil {
+ ctx.ServerError("LoadOwner", err)
return
}
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go
index 42dcfb382d..62565af50f 100644
--- a/routers/web/repo/issue.go
+++ b/routers/web/repo/issue.go
@@ -2157,8 +2157,8 @@ func UpdatePullReviewRequest(ctx *context.Context) {
}
if reviewID < 0 {
// negative reviewIDs represent team requests
- if err := issue.Repo.GetOwner(ctx); err != nil {
- ctx.ServerError("issue.Repo.GetOwner", err)
+ if err := issue.Repo.LoadOwner(ctx); err != nil {
+ ctx.ServerError("issue.Repo.LoadOwner", err)
return
}
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go
index ad17005d90..c7a59da8a8 100644
--- a/routers/web/repo/pull.go
+++ b/routers/web/repo/pull.go
@@ -119,8 +119,8 @@ func getForkRepository(ctx *context.Context) *repo_model.Repository {
return nil
}
- if err := forkRepo.GetOwner(ctx); err != nil {
- ctx.ServerError("GetOwner", err)
+ if err := forkRepo.LoadOwner(ctx); err != nil {
+ ctx.ServerError("LoadOwner", err)
return nil
}
@@ -1315,8 +1315,8 @@ func CleanUpPullRequest(ctx *context.Context) {
} else if err = pr.LoadBaseRepo(ctx); err != nil {
ctx.ServerError("LoadBaseRepo", err)
return
- } else if err = pr.HeadRepo.GetOwner(ctx); err != nil {
- ctx.ServerError("HeadRepo.GetOwner", err)
+ } else if err = pr.HeadRepo.LoadOwner(ctx); err != nil {
+ ctx.ServerError("HeadRepo.LoadOwner", err)
return
}
diff --git a/routers/web/repo/setting.go b/routers/web/repo/setting.go
index 436438c436..387a917412 100644
--- a/routers/web/repo/setting.go
+++ b/routers/web/repo/setting.go
@@ -650,7 +650,7 @@ func SettingsPost(ctx *context.Context) {
ctx.Error(http.StatusNotFound)
return
}
- if err := repo.GetOwner(ctx); err != nil {
+ if err := repo.LoadOwner(ctx); err != nil {
ctx.ServerError("Convert Fork", err)
return
}
diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go
index 99043e3ee7..e3c61fa408 100644
--- a/routers/web/repo/view.go
+++ b/routers/web/repo/view.go
@@ -1033,8 +1033,8 @@ func Forks(ctx *context.Context) {
}
for _, fork := range forks {
- if err = fork.GetOwner(ctx); err != nil {
- ctx.ServerError("GetOwner", err)
+ if err = fork.LoadOwner(ctx); err != nil {
+ ctx.ServerError("LoadOwner", err)
return
}
}