1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 10:18:38 +00:00

Only keep popular licenses (#33832)

Fix #33467
This commit is contained in:
wxiaoguang
2025-03-10 06:40:37 +08:00
committed by GitHub
parent 3e53b01143
commit 7290bfaccb
712 changed files with 12 additions and 40616 deletions

View File

@@ -310,7 +310,7 @@ func CreateRepositoryDirectly(ctx context.Context, doer, u *user_model.User, opt
// update licenses
var licenses []string
if len(opts.License) > 0 {
licenses = append(licenses, ConvertLicenseName(opts.License))
licenses = append(licenses, opts.License)
stdout, _, err := git.NewCommand("rev-parse", "HEAD").RunStdString(ctx, &git.RunOpts{Dir: repoPath})
if err != nil {