diff --git a/flake.lock b/flake.lock index 606f8836c1..9eadad2b94 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1717974879, - "narHash": "sha256-GTO3C88+5DX171F/gVS3Qga/hOs/eRMxPFpiHq2t+D8=", + "lastModified": 1720542800, + "narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c7b821ba2e1e635ba5a76d299af62821cbcb09f3", + "rev": "feb2849fdeb70028c70d73b848214b00d324a497", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 22354663dd..e2f273e341 100644 --- a/flake.nix +++ b/flake.nix @@ -31,6 +31,7 @@ # backend go_1_22 gofumpt + sqlite ]; }; } diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 997920c9e7..6c21589c7f 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -492,7 +492,7 @@ admin.new_user.subject = New user %s just signed up admin.new_user.user_info = User information admin.new_user.text = Please click here to manage this user from the admin panel. -register_notify = Welcome to Forgejo +register_notify = Welcome to %s register_notify.text_1 = this is your registration confirmation email for %s! register_notify.text_2 = You can sign into your account using your username: %s register_notify.text_3 = If someone else made this account for you, you will need to set your password first. diff --git a/services/forms/org.go b/services/forms/org.go index 3677fcf429..db182f7e96 100644 --- a/services/forms/org.go +++ b/services/forms/org.go @@ -62,7 +62,7 @@ func (f *UpdateOrgSettingForm) Validate(req *http.Request, errs binding.Errors) // CreateTeamForm form for creating team type CreateTeamForm struct { - TeamName string `binding:"Required;AlphaDashDot;MaxSize(30)"` + TeamName string `binding:"Required;AlphaDashDot;MaxSize(255)"` Description string `binding:"MaxSize(255)"` Permission string RepoAccess string diff --git a/services/mailer/mail.go b/services/mailer/mail.go index d86607295a..5eb8efe128 100644 --- a/services/mailer/mail.go +++ b/services/mailer/mail.go @@ -158,7 +158,7 @@ func SendRegisterNotifyMail(u *user_model.User) { return } - msg := NewMessage(u.Email, locale.TrString("mail.register_notify"), content.String()) + msg := NewMessage(u.Email, locale.TrString("mail.register_notify", setting.AppName), content.String()) msg.Info = fmt.Sprintf("UID: %d, registration notify", u.ID) SendAsync(msg) diff --git a/services/repository/generate.go b/services/repository/generate.go index 5cb1471842..8bd14ace8d 100644 --- a/services/repository/generate.go +++ b/services/repository/generate.go @@ -12,6 +12,7 @@ import ( "path" "path/filepath" "regexp" + "strconv" "strings" "time" @@ -54,7 +55,12 @@ var defaultTransformers = []transformer{ } func generateExpansion(src string, templateRepo, generateRepo *repo_model.Repository, sanitizeFileName bool) string { + year, month, day := time.Now().Date() expansions := []expansion{ + {Name: "YEAR", Value: strconv.Itoa(year), Transformers: nil}, + {Name: "MONTH", Value: fmt.Sprintf("%02d", int(month)), Transformers: nil}, + {Name: "MONTH_ENGLISH", Value: month.String(), Transformers: defaultTransformers}, + {Name: "DAY", Value: fmt.Sprintf("%02d", day), Transformers: nil}, {Name: "REPO_NAME", Value: generateRepo.Name, Transformers: defaultTransformers}, {Name: "TEMPLATE_NAME", Value: templateRepo.Name, Transformers: defaultTransformers}, {Name: "REPO_DESCRIPTION", Value: generateRepo.Description, Transformers: nil}, diff --git a/templates/repo/issue/fields/header.tmpl b/templates/repo/issue/fields/header.tmpl index 6034fed5fd..06c41af6b9 100644 --- a/templates/repo/issue/fields/header.tmpl +++ b/templates/repo/issue/fields/header.tmpl @@ -1,4 +1,4 @@ -{{if .item.Attributes.label}} +{{if and (.item.Attributes.label) (not .item.Attributes.hide_label)}}

{{.item.Attributes.label}}{{if .item.Validations.required}}{{end}}

{{end}} {{if .item.Attributes.description}}