aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/repo.go')
-rw-r--r--routers/api/v1/repo/repo.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index 7caf004b4a..4b88ed0b78 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -134,7 +134,7 @@ func Search(ctx *context.APIContext) {
private = false
}
- opts := &repo_model.SearchRepoOptions{
+ opts := repo_model.SearchRepoOptions{
ListOptions: utils.GetListOptions(ctx),
Actor: ctx.Doer,
Keyword: ctx.FormTrim("q"),
@@ -329,7 +329,7 @@ func Generate(ctx *context.APIContext) {
// parameters:
// - name: template_owner
// in: path
- // description: name of the template repository owner
+ // description: owner of the template repository
// type: string
// required: true
// - name: template_repo
@@ -669,7 +669,7 @@ func updateBasicProperties(ctx *context.APIContext, opts api.EditRepoOption) err
newRepoName = *opts.Name
}
// Check if repository name has been changed and not just a case change
- if repo.LowerName != strings.ToLower(newRepoName) {
+ if !strings.EqualFold(repo.LowerName, newRepoName) {
if err := repo_service.ChangeRepositoryName(ctx, ctx.Doer, repo, newRepoName); err != nil {
switch {
case repo_model.IsErrRepoAlreadyExist(err):