Fix bug where repositories appear unadopted (#15757)

Fix bug where repositories with capital letters in their names appear unadopted.

Fix #15755

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
tokarchuk/v1.17
zeripath 4 years ago committed by GitHub
parent edb838997c
commit 114c85e6ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      modules/repository/adopt.go

@ -228,7 +228,7 @@ func ListUnadoptedRepositories(query string, opts *models.ListOptions) ([]string
found := false found := false
repoLoop: repoLoop:
for i, repo := range repos { for i, repo := range repos {
if repo.Name == name { if repo.LowerName == name {
found = true found = true
repos = append(repos[:i], repos[i+1:]...) repos = append(repos[:i], repos[i+1:]...)
break repoLoop break repoLoop

Loading…
Cancel
Save