diff --git a/.github/workflows/pull-db-tests.yml b/.github/workflows/pull-db-tests.yml index c4005648b7433..9fcdea44ee11b 100644 --- a/.github/workflows/pull-db-tests.yml +++ b/.github/workflows/pull-db-tests.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest services: pgsql: - image: postgres:16 + image: postgres:12 env: POSTGRES_DB: test POSTGRES_PASSWORD: postgres @@ -85,13 +85,6 @@ jobs: needs: files-changed runs-on: ubuntu-latest services: - mysql: - image: mysql:8.1 - env: - MYSQL_ALLOW_EMPTY_PASSWORD: true - MYSQL_DATABASE: test - ports: - - "3306:3306" elasticsearch: image: elasticsearch:7.5.0 env: @@ -104,13 +97,6 @@ jobs: MEILI_ENV: development # disable auth ports: - "7700:7700" - smtpimap: - image: tabascoterrier/docker-imap-devel:latest - ports: - - "25:25" - - "143:143" - - "587:587" - - "993:993" redis: image: redis options: >- # wait until redis has started @@ -158,7 +144,7 @@ jobs: runs-on: ubuntu-latest services: mysql: - image: mysql:8.1 + image: mysql:8.0 env: MYSQL_ALLOW_EMPTY_PASSWORD: true MYSQL_DATABASE: testgitea @@ -203,7 +189,7 @@ jobs: runs-on: ubuntu-latest services: mssql: - image: mcr.microsoft.com/mssql/server:2022-latest + image: mcr.microsoft.com/mssql/server:2017-latest env: ACCEPT_EULA: Y MSSQL_PID: Standard diff --git a/models/activities/action.go b/models/activities/action.go index 9b62a4631ab78..1bfd62438bf2a 100644 --- a/models/activities/action.go +++ b/models/activities/action.go @@ -140,7 +140,7 @@ func (at ActionType) InActions(actions ...string) bool { // used in template render. type Action struct { ID int64 `xorm:"pk autoincr"` - UserID int64 // Receiver user id. + UserID int64 `xorm:"INDEX"` // Receiver user id. OpType ActionType ActUserID int64 // Action user id. ActUser *user_model.User `xorm:"-"` diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index 85ef9c68cc7d4..a8037fa67ed17 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -539,10 +539,12 @@ var migrations = []Migration{ NewMigration("Add Index to issue_user.issue_id", v1_21.AddIndexToIssueUserIssueID), // v278 -> v279 NewMigration("Add Index to comment.dependent_issue_id", v1_21.AddIndexToCommentDependentIssueID), + // v279 -> v280 + NewMigration("Add Index to action.user_id", v1_21.AddIndexToActionUserID), - // Gitea 1.21.0 ends at 279 + // Gitea 1.21.0 ends at 280 - // v279 -> v280 + // v280 -> v281 NewMigration("Rename user themes", v1_22.RenameUserThemes), } diff --git a/models/migrations/v1_21/v279.go b/models/migrations/v1_21/v279.go new file mode 100644 index 0000000000000..19647225c9a95 --- /dev/null +++ b/models/migrations/v1_21/v279.go @@ -0,0 +1,16 @@ +// Copyright 2023 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package v1_21 //nolint + +import ( + "xorm.io/xorm" +) + +func AddIndexToActionUserID(x *xorm.Engine) error { + type Action struct { + UserID int64 `xorm:"INDEX"` + } + + return x.Sync(new(Action)) +} diff --git a/models/migrations/v1_22/v279.go b/models/migrations/v1_22/v280.go similarity index 82% rename from models/migrations/v1_22/v279.go rename to models/migrations/v1_22/v280.go index 9da9ac83066b7..ca7663906b213 100644 --- a/models/migrations/v1_22/v279.go +++ b/models/migrations/v1_22/v280.go @@ -22,5 +22,9 @@ func RenameUserThemes(x *xorm.Engine) error { return err } + if _, err := sess.Exec("UPDATE `user` SET `theme` = 'gitea-auto' WHERE `theme` = 'auto'"); err != nil { + return err + } + return sess.Commit() } diff --git a/options/locale/locale_el-GR.ini b/options/locale/locale_el-GR.ini index 63cc1ca2e53de..9db3e318f8c38 100644 --- a/options/locale/locale_el-GR.ini +++ b/options/locale/locale_el-GR.ini @@ -290,6 +290,7 @@ invalid_password_algorithm=Μη έγκυρος αλγόριθμος κωδικο password_algorithm_helper=Ορίστε τον αλγόριθμο κατακερματισμού για το κωδικό πρόσβασης. Οι αλγόριθμοι διαφέρουν σε απαιτήσεις και αντοχή. Ο αλγόριθμος argon2 είναι αρκετά ασφαλής, αλλά χρησιμοποιεί πολλή μνήμη και μπορεί να είναι ακατάλληλος για μικρά συστήματα. enable_update_checker=Ενεργοποίηση Ελεγκτή Ενημερώσεων enable_update_checker_helper=Ελέγχει περιοδικά για νέες εκδόσεις κάνοντας σύνδεση στο gitea.io. +env_config_keys=Ρυθμίσεις Περιβάλλοντος [home] uname_holder=Όνομα Χρήστη ή Διεύθυνση Email diff --git a/routers/web/repo/compare.go b/routers/web/repo/compare.go index 43b2715fd1a25..d66dd582a15cd 100644 --- a/routers/web/repo/compare.go +++ b/routers/web/repo/compare.go @@ -252,7 +252,6 @@ func ParseCompareInfo(ctx *context.Context) *CompareInfo { isSameRepo = true ci.HeadUser = ctx.Repo.Owner ci.HeadBranch = headInfos[0] - } else if len(headInfos) == 2 { headInfosSplit := strings.Split(headInfos[0], "/") if len(headInfosSplit) == 1 { @@ -407,6 +406,9 @@ func ParseCompareInfo(ctx *context.Context) *CompareInfo { return nil } defer ci.HeadGitRepo.Close() + } else { + ctx.NotFound("ParseCompareInfo", nil) + return nil } ctx.Data["HeadRepo"] = ci.HeadRepo diff --git a/templates/org/settings/layout_head.tmpl b/templates/org/settings/layout_head.tmpl index c245a3bf62460..31dad2c14124f 100644 --- a/templates/org/settings/layout_head.tmpl +++ b/templates/org/settings/layout_head.tmpl @@ -1,9 +1,9 @@ {{template "base/head" .ctxData}}
{{template "org/header" .ctxData}} -
+
{{template "org/settings/navbar" .ctxData}} -
+
{{template "base/alert" .ctxData}} {{/* block: org-setting-content */}} diff --git a/templates/org/settings/navbar.tmpl b/templates/org/settings/navbar.tmpl index 201ac3b9f297b..64ae20f0a3b72 100644 --- a/templates/org/settings/navbar.tmpl +++ b/templates/org/settings/navbar.tmpl @@ -1,4 +1,4 @@ -
+ {{range .ClosedProjects}} - + {{svg .IconName 18 "gt-mr-3"}}{{.Title}} {{end}} diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 714701939fa2d..d3fe424b84d1e 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -496,7 +496,7 @@ {{end}}
- {{$diff := (CommentMustAsDiff (index $comms 0))}} + {{$diff := (CommentMustAsDiff ctx (index $comms 0))}} {{if $diff}} {{$file := (index $diff.Files 0)}}
diff --git a/templates/repo/settings/layout_head.tmpl b/templates/repo/settings/layout_head.tmpl index 3117309831892..efec9bf87428d 100644 --- a/templates/repo/settings/layout_head.tmpl +++ b/templates/repo/settings/layout_head.tmpl @@ -1,9 +1,9 @@ {{template "base/head" .ctxData}}