Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2022-08-26 18:03:10 +0300
committerToon Claes <toon@gitlab.com>2022-08-26 18:03:10 +0300
commitcf1454bfa91c4e563249986ea5b45cae5a727dc1 (patch)
treecd639bd006b0627c39721db9892fbcc32b7456bc
parentb0a46af5a9fafa7ea6f0274cceb24af618544569 (diff)
repository: Nickname "Other" license to "LICENSE"toon-license-followups
The nickname is used as primary source for the text in the license badge in the UI. Using "LICENSE" is a lot more informative than "Other"
-rw-r--r--internal/gitaly/service/repository/license.go1
-rw-r--r--internal/gitaly/service/repository/license_test.go1
2 files changed, 2 insertions, 0 deletions
diff --git a/internal/gitaly/service/repository/license.go b/internal/gitaly/service/repository/license.go
index 900c1fa89..2eceece15 100644
--- a/internal/gitaly/service/repository/license.go
+++ b/internal/gitaly/service/repository/license.go
@@ -61,6 +61,7 @@ func (s *server) FindLicense(ctx context.Context, req *gitalypb.FindLicenseReque
return &gitalypb.FindLicenseResponse{
LicenseName: "Other",
LicenseShortName: "other",
+ LicenseNickname: "LICENSE", // Show as LICENSE in the UI
LicensePath: repoFiler.path,
}, nil
}
diff --git a/internal/gitaly/service/repository/license_test.go b/internal/gitaly/service/repository/license_test.go
index c10c9f004..bbe855a50 100644
--- a/internal/gitaly/service/repository/license_test.go
+++ b/internal/gitaly/service/repository/license_test.go
@@ -97,6 +97,7 @@ SOFTWARE.`,
expectedLicenseGo: &gitalypb.FindLicenseResponse{
LicenseShortName: "other",
LicenseName: "Other",
+ LicenseNickname: "LICENSE",
LicensePath: "LICENSE.md",
},
},