diff options
author | Toon Claes <toon@gitlab.com> | 2022-08-26 18:03:10 +0300 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2022-08-26 18:03:10 +0300 |
commit | cf1454bfa91c4e563249986ea5b45cae5a727dc1 (patch) | |
tree | cd639bd006b0627c39721db9892fbcc32b7456bc | |
parent | b0a46af5a9fafa7ea6f0274cceb24af618544569 (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.go | 1 | ||||
-rw-r--r-- | internal/gitaly/service/repository/license_test.go | 1 |
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", }, }, |