From 762154cbd793823aed438d72fbd82f31658f47bb Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 4 May 2026 23:39:20 +0200 Subject: [PATCH 01/20] fix: Fix `nolyfill` for renovate (#37537) Run `nolyfill` as a renovate post-upgrade step alongside `make svg`, so npm dep bumps keep `pnpm.overrides` in sync. --- This PR was written with the help of Claude Opus 4.7 --------- Signed-off-by: silverwind Co-authored-by: Claude (Opus 4.7) --- Makefile | 5 +++++ renovate.json5 | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ad7739c07b..2466435b17 100644 --- a/Makefile +++ b/Makefile @@ -606,6 +606,11 @@ update-js: node_modules ## update js dependencies pnpm exec updates -u -f package.json rm -rf node_modules pnpm-lock.yaml pnpm install + @touch node_modules + $(MAKE) --no-print-directory nolyfill + +.PHONY: nolyfill +nolyfill: node_modules ## apply nolyfill overrides to package.json and relock pnpm exec nolyfill install pnpm install @touch node_modules diff --git a/renovate.json5 b/renovate.json5 index 586733b317..3362f52c23 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -71,8 +71,8 @@ "groupName": "npm dependencies", "matchManagers": ["npm"], "postUpgradeTasks": { - "commands": ["make svg"], - "fileFilters": ["public/assets/img/svg/**"], + "commands": ["make svg nolyfill"], + "fileFilters": ["package.json", "pnpm-lock.yaml", "public/assets/img/svg/**"], "executionMode": "branch", }, }, From 62300eab3bacc575bd29c68171f27f927d41ac60 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Mon, 4 May 2026 16:06:00 -0700 Subject: [PATCH 02/20] chore(deps): update action dependencies (#37540) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | Pending | |---|---|---|---|---| | [bitnamilegacy/minio](https://redirect.github.com/bitnami/containers) ([source](https://redirect.github.com/bitnami/containers/tree/HEAD/bitnami/minio)) | service | minor | `2021.3.17` → `2021.12.29` | | | [bitnamilegacy/minio](https://redirect.github.com/bitnami/containers) ([source](https://redirect.github.com/bitnami/containers/tree/HEAD/bitnami/minio)) | service | minor | `2023.8.31` → `2023.12.23` | | | [bitnamilegacy/mysql](https://redirect.github.com/bitnami/containers) ([source](https://redirect.github.com/bitnami/containers/tree/HEAD/bitnami/mysql)) | service | minor | `8.0` → `8.4` | | | [renovatebot/github-action](https://redirect.github.com/renovatebot/github-action) | action | patch | `v46.1.10` → `v46.1.12` | `v46.1.13` | --- ### Release Notes
renovatebot/github-action (renovatebot/github-action) ### [`v46.1.12`](https://redirect.github.com/renovatebot/github-action/releases/tag/v46.1.12) [Compare Source](https://redirect.github.com/renovatebot/github-action/compare/v46.1.11...v46.1.12) ##### Bug Fixes - **deps:** update dependency [@​actions/core](https://redirect.github.com/actions/core) to v3.0.1 ([e8a6055](https://redirect.github.com/renovatebot/github-action/commit/e8a6055d6d0dc2ca2280adc33c7b58f3fb124d12)) ##### Documentation - update references to renovatebot/github-action to v46.1.11 ([317011a](https://redirect.github.com/renovatebot/github-action/commit/317011a6efe6b58d6056f58ca8b431233eb718ab)) ##### Miscellaneous Chores - **deps:** update dependency typescript-eslint to v8.59.0 ([8e3560a](https://redirect.github.com/renovatebot/github-action/commit/8e3560ab95742bc3c7aaec7c2dd1cc3d0d276ae5)) ##### Continuous Integration - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.142.0 ([0fee00d](https://redirect.github.com/renovatebot/github-action/commit/0fee00dc59830af7f44ea0636b251550e54f5003)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.142.1 ([c7cfc88](https://redirect.github.com/renovatebot/github-action/commit/c7cfc8825059e6fa4bd036b39a06e0477d58f403)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.144.0 ([39e7d09](https://redirect.github.com/renovatebot/github-action/commit/39e7d09c7b2ce19c8c834ffe556e9965c119c885)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.145.0 ([0bbd415](https://redirect.github.com/renovatebot/github-action/commit/0bbd415a9c49a001a228460b287027d8a3739e8a)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.146.0 ([889c739](https://redirect.github.com/renovatebot/github-action/commit/889c7399cadabbf2657b872978141f03c9376640)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.147.0 ([7addce6](https://redirect.github.com/renovatebot/github-action/commit/7addce6f1e02342b36c2cb1a66db30345a2f109d)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.150.0 ([804ce16](https://redirect.github.com/renovatebot/github-action/commit/804ce1618f0c132478fd9c086d6febd009a723d0)) ### [`v46.1.11`](https://redirect.github.com/renovatebot/github-action/releases/tag/v46.1.11) [Compare Source](https://redirect.github.com/renovatebot/github-action/compare/v46.1.10...v46.1.11) ##### Documentation - update references to renovatebot/github-action to v46.1.10 ([0b264d2](https://redirect.github.com/renovatebot/github-action/commit/0b264d27f89fd1eb163fba418b0dbfe86c041395)) ##### Miscellaneous Chores - **deps:** update actions/setup-node action to v6.4.0 ([951a814](https://redirect.github.com/renovatebot/github-action/commit/951a81487afda3e08b127fef395e29498fd9d06c)) - **deps:** update dependency prettier to v3.8.3 ([a763833](https://redirect.github.com/renovatebot/github-action/commit/a763833a7d8da309d202e5fc67bc794efc7dc115)) - **deps:** update dependency typescript-eslint to v8.58.2 ([119d68e](https://redirect.github.com/renovatebot/github-action/commit/119d68e8f6114a37630c0a3a61aac696d593aa52)) ##### Build System - **deps:** lock file maintenance ([f82feed](https://redirect.github.com/renovatebot/github-action/commit/f82feedb561edc809d01476b568febf8d256a51a)) ##### Continuous Integration - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.132.3 ([99cc805](https://redirect.github.com/renovatebot/github-action/commit/99cc805d7583672991fd1bfe2ce488eac225f8f0)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.133.0 ([a63d39b](https://redirect.github.com/renovatebot/github-action/commit/a63d39be1e95f4aaa26c72acbdf1c65673468261)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.135.0 ([955b000](https://redirect.github.com/renovatebot/github-action/commit/955b0000ba399f944be088f7a4409a4c8fc0b699)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.136.0 ([65167cd](https://redirect.github.com/renovatebot/github-action/commit/65167cdb3f2b345241ea67249f4b238934933bcc)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.136.1 ([7b21b86](https://redirect.github.com/renovatebot/github-action/commit/7b21b86cedd4f06966dca17027c7c67625e599cd)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.136.3 ([28a2dc0](https://redirect.github.com/renovatebot/github-action/commit/28a2dc07b816f5893a6496d35b4b02742445c3c4)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.137.0 ([b0cf2a4](https://redirect.github.com/renovatebot/github-action/commit/b0cf2a4c9132b74c57aae8fcbb45a6aacd414022)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.138.0 ([3700882](https://redirect.github.com/renovatebot/github-action/commit/3700882c45d6eda087650c0edc72ba408f5b7a2e)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.138.1 ([f516ce2](https://redirect.github.com/renovatebot/github-action/commit/f516ce2f9261f68e96edd1499111ddb5077033bb)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.138.3 ([3411548](https://redirect.github.com/renovatebot/github-action/commit/3411548d9c9b822a7473c563535824c03a19df6a)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.0 ([5201886](https://redirect.github.com/renovatebot/github-action/commit/5201886b45291615a4f0b21fd08181cfe8123ba6)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.1 ([5856263](https://redirect.github.com/renovatebot/github-action/commit/5856263af8004562a8d50daf5c18b7a1a71920f8)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.4 ([999691d](https://redirect.github.com/renovatebot/github-action/commit/999691d7f3780b09bcd4e90e081bbce6b452ab25)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.5 ([f703a54](https://redirect.github.com/renovatebot/github-action/commit/f703a541309bb776377323a91735fa747d6efc39)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.6 ([3ba85c2](https://redirect.github.com/renovatebot/github-action/commit/3ba85c2979436007460d9ccf3f87bd0a4ef5e1ea)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.7 ([96f2f09](https://redirect.github.com/renovatebot/github-action/commit/96f2f09b9d7c8e6946b489aab3ca6f713a3bfbdc)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.8 ([5af45e5](https://redirect.github.com/renovatebot/github-action/commit/5af45e5b84b145ee1e14929493f8f054d922b441)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.140.0 ([01e9139](https://redirect.github.com/renovatebot/github-action/commit/01e91393d3c71fe95aec074539d4a0d9dc57068b)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.0 ([814a2a4](https://redirect.github.com/renovatebot/github-action/commit/814a2a47c0d23dad8d1f7302ade33a5bd966a8c7)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.1 ([fb3abdf](https://redirect.github.com/renovatebot/github-action/commit/fb3abdf7fa349ce51fd43364aa917f213f4d476c)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.2 ([e3a9af5](https://redirect.github.com/renovatebot/github-action/commit/e3a9af55ac512810165fe6f630d88fa4b02f0dca)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.5 ([4f14b2f](https://redirect.github.com/renovatebot/github-action/commit/4f14b2f81dd01dfd999aed7088db38a5e8042f08)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.6 ([2357784](https://redirect.github.com/renovatebot/github-action/commit/23577849552717b7ae5cdbb05082e5cc99e25dce))
--- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - Only on Monday (`* * * * 1`) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/cron-renovate.yml | 2 +- .github/workflows/pull-db-tests.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cron-renovate.yml b/.github/workflows/cron-renovate.yml index 39bcf26ac9..c4906552d5 100644 --- a/.github/workflows/cron-renovate.yml +++ b/.github/workflows/cron-renovate.yml @@ -21,7 +21,7 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: renovatebot/github-action@83ec54fee49ab67d9cd201084c1ff325b4b462e4 # v46.1.10 + - uses: renovatebot/github-action@f66d8679fcfcfa051abde6e7a623007173bf5164 # v46.1.12 with: renovate-version: ${{ env.RENOVATE_VERSION }} configurationFile: renovate.json5 diff --git a/.github/workflows/pull-db-tests.yml b/.github/workflows/pull-db-tests.yml index c2293ac853..944a117e15 100644 --- a/.github/workflows/pull-db-tests.yml +++ b/.github/workflows/pull-db-tests.yml @@ -34,7 +34,7 @@ jobs: minio: # as github actions doesn't support "entrypoint", we need to use a non-official image # that has a custom entrypoint set to "minio server /data" - image: bitnamilegacy/minio:2023.8.31 + image: bitnamilegacy/minio:2023.12.23 env: MINIO_ROOT_USER: 123456 MINIO_ROOT_PASSWORD: 12345678 @@ -124,7 +124,7 @@ jobs: ports: - 6379:6379 minio: - image: bitnamilegacy/minio:2021.3.17 + image: bitnamilegacy/minio:2021.12.29 env: MINIO_ACCESS_KEY: 123456 MINIO_SECRET_KEY: 12345678 @@ -172,7 +172,7 @@ jobs: services: mysql: # the bitnami mysql image has more options than the official one, it's easier to customize - image: bitnamilegacy/mysql:8.0 + image: bitnamilegacy/mysql:8.4 env: ALLOW_EMPTY_PASSWORD: true MYSQL_DATABASE: testgitea From c471af42668085fcb4a83cd5f53c1d39a5cfbe6d Mon Sep 17 00:00:00 2001 From: GiteaBot Date: Tue, 5 May 2026 01:01:53 +0000 Subject: [PATCH 03/20] [skip ci] Updated translations via Crowdin --- options/locale/locale_fr-FR.json | 1 - options/locale/locale_ga-IE.json | 1 - 2 files changed, 2 deletions(-) diff --git a/options/locale/locale_fr-FR.json b/options/locale/locale_fr-FR.json index 870e1be56f..aa295c98a2 100644 --- a/options/locale/locale_fr-FR.json +++ b/options/locale/locale_fr-FR.json @@ -1958,7 +1958,6 @@ "repo.signing.wont_sign.headsigned": "La fusion ne sera pas signée car la dernière révision n’est pas signée.", "repo.signing.wont_sign.commitssigned": "La fusion ne sera pas signée car ses révisions ne sont pas signées.", "repo.signing.wont_sign.approved": "La fusion ne sera pas signée car la demande d'ajout n'a pas été approuvée.", - "repo.signing.wont_sign.not_signed_in": "Vous n'êtes pas connecté.", "repo.ext_wiki": "Accès au wiki externe", "repo.ext_wiki.desc": "Lier un wiki externe.", "repo.wiki": "Wiki", diff --git a/options/locale/locale_ga-IE.json b/options/locale/locale_ga-IE.json index 3584e0b597..f41aae7244 100644 --- a/options/locale/locale_ga-IE.json +++ b/options/locale/locale_ga-IE.json @@ -1958,7 +1958,6 @@ "repo.signing.wont_sign.headsigned": "Ní shínífear an cumasc toisc nach bhfuil an tiomantas ceann sínithe.", "repo.signing.wont_sign.commitssigned": "Ní shínífear an cumasc toisc nach bhfuil na tiomáintí gaolmhara go léir sínithe.", "repo.signing.wont_sign.approved": "Ní shíníofar an cumaisc toisc nach bhfuil an PR ceadaithe.", - "repo.signing.wont_sign.not_signed_in": "Níl tú sínithe isteach.", "repo.ext_wiki": "Rochtain ar Vicí Seachtrach", "repo.ext_wiki.desc": "Nasc le vicí seachtrach.", "repo.wiki": "Vicí", From 5e8004a5155fdd58bbe61a4f82cc598bef7994c4 Mon Sep 17 00:00:00 2001 From: premsreelathasugeendran Date: Tue, 5 May 2026 11:25:44 -0400 Subject: [PATCH 04/20] docs: fix 4 typos in CHANGELOG.md (#37549) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docs polish — pure typo fixes, nothing under `src/`. ## Files - `CHANGELOG.md` - line 1386: `appearence` → `appearance` - line 2117: `succesfully` → `successfully` - line 2301: `preceeded` → `preceded` - line 5593: `paramater` → `parameter` Fixes were applied from a curated correction list, with code blocks / inline code / URLs left alone. --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3b6b94269..f807f16b3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1383,7 +1383,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com). * Fix mCaptcha bug (#33659) (#33661) * Git graph: don't show detached commits (#33645) (#33650) * Use MatchPhraseQuery for bleve code search (#33628) - * Adjust appearence of commit status webhook (#33778) #33789 + * Adjust appearance of commit status webhook (#33778) #33789 * Upgrade golang net from 0.35.0 -> 0.36.0 (#33795) #33796 ## [1.23.4](https://github.com/go-gitea/gitea/releases/tag/v1.23.4) - 2025-02-16 @@ -2114,7 +2114,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com). * Optimize repo-list layout to enhance visual experience (#31272) (#31276) * fixed the dropdown menu for the top New button to expand to the left (#31273) (#31275) * Fix Activity Page Contributors dropdown (#31264) (#31269) - * fix: allow actions artifacts storage migration to complete succesfully (#31251) (#31257) + * fix: allow actions artifacts storage migration to complete successfully (#31251) (#31257) * Make blockquote attention recognize more syntaxes (#31240) (#31250) * Remove .segment from .project-column (#31204) (#31239) * Ignore FindRecentlyPushedNewBranches err (#31164) (#31171) @@ -2298,7 +2298,7 @@ Key highlights of this release encompass significant changes categorized under ` * Performance optimization for git push and check permissions for push options (#30104) (#30354) * BUGFIXES * Fix close file in the Upload func (#30262) (#30269) - * Fix inline math blocks can't be preceeded/followed by alphanumerical characters (#30175) (#30250) + * Fix inline math blocks can't be preceded/followed by alphanumerical characters (#30175) (#30250) * Fix missing 0 prefix of GPG key id (#30245) (#30247) * Include encoding in signature payload (#30174) (#30181) * Move from `max( id )` to `max( index )` for latest commit statuses (#30076) (#30155) @@ -5590,7 +5590,7 @@ Key highlights of this release encompass significant changes categorized under ` * Fix navbar on project view (#17749) * More pleasantly handle broken or missing git repositories (#17747) * Use `*PushUpdateOptions` as receiver (#17724) - * Remove unused `user` paramater (#17723) + * Remove unused `user` parameter (#17723) * Better builtin avatar generator (#17707) * Cleanup and use global style on popups (#17674) * Move user/org deletion to services (#17673) From 6ba907d89cf1288878be1f3f1f4ca4ab665aa400 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 5 May 2026 23:54:07 +0800 Subject: [PATCH 05/20] Fix various problems (#37547) 1. Fix ugly commit form "warning" message 2. Use JSONError for "Update PR Branch" response 3. Remove useless "timeline" class 4. Make timeline review default to "comment" to avoid icon missing 5. Align PR's "command line instructions" UI 6. Simply "Update PR branch" button logic And then some TODOs are fixed. --------- Signed-off-by: wxiaoguang --- options/locale/locale_en-US.json | 2 +- routers/web/repo/pull.go | 20 +++----- templates/repo/editor/commit_form.tmpl | 6 +-- templates/repo/issue/view_content.tmpl | 6 +-- .../repo/issue/view_content/comments.tmpl | 12 +++-- .../issue/view_content/pull_merge_box.tmpl | 2 +- .../view_content/pull_merge_instruction.tmpl | 13 +++-- .../view_content/update_branch_by_merge.tmpl | 37 ++++++-------- tests/e2e/reactions.test.ts | 2 +- tests/integration/actions_trigger_test.go | 2 +- tests/integration/issue_test.go | 4 +- web_src/css/modules/checkbox.css | 1 + web_src/css/repo.css | 32 +++--------- web_src/js/features/repo-issue-content.ts | 4 +- web_src/js/features/repo-issue-pull.ts | 49 +++---------------- web_src/js/features/repo-legacy.ts | 7 +-- 16 files changed, 73 insertions(+), 126 deletions(-) diff --git a/options/locale/locale_en-US.json b/options/locale/locale_en-US.json index 6f3141885b..47fcac7ae7 100644 --- a/options/locale/locale_en-US.json +++ b/options/locale/locale_en-US.json @@ -1306,7 +1306,7 @@ "repo.editor.upload_file_is_locked": "File \"%s\" is locked by %s.", "repo.editor.upload_files_to_dir": "Upload files to \"%s\"", "repo.editor.cannot_commit_to_protected_branch": "Cannot commit to protected branch \"%s\".", - "repo.editor.no_commit_to_branch": "Unable to commit directly to branch because:", + "repo.editor.no_commit_to_branch": "Not allowed to commit directly to branch because:", "repo.editor.user_no_push_to_branch": "User cannot push to branch", "repo.editor.require_signed_commit": "Branch requires a signed commit", "repo.editor.cherry_pick": "Cherry-pick %s onto:", diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index eab4df77ad..d20bbdc36c 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -974,17 +974,15 @@ func UpdatePullRequest(ctx *context.Context) { return } - // ToDo: add check if maintainers are allowed to change branch ... (need migration & co) if (!allowedUpdateByMerge && !rebase) || (rebase && !allowedUpdateByRebase) { - ctx.Flash.Error(ctx.Tr("repo.pulls.update_not_allowed")) - ctx.Redirect(issue.Link()) + ctx.JSONError(ctx.Tr("repo.pulls.update_not_allowed")) return } // default merge commit message message := fmt.Sprintf("Merge branch '%s' into %s", issue.PullRequest.BaseBranch, issue.PullRequest.HeadBranch) - // The update process should not be cancelled by the user + // The update process should not be canceled by the user // so we set the context to be a background context if err = pull_service.Update(graceful.GetManager().ShutdownContext(), issue.PullRequest, ctx.Doer, message, rebase); err != nil { if pull_service.IsErrMergeConflicts(err) { @@ -998,8 +996,7 @@ func UpdatePullRequest(ctx *context.Context) { ctx.ServerError("UpdatePullRequest.HTMLString", err) return } - ctx.Flash.Error(flashError) - ctx.Redirect(issue.Link()) + ctx.JSONError(flashError) return } else if pull_service.IsErrRebaseConflicts(err) { conflictError := err.(pull_service.ErrRebaseConflicts) @@ -1012,19 +1009,18 @@ func UpdatePullRequest(ctx *context.Context) { ctx.ServerError("UpdatePullRequest.HTMLString", err) return } - ctx.Flash.Error(flashError) - ctx.Redirect(issue.Link()) + ctx.JSONError(flashError) return } - ctx.Flash.Error(err.Error()) - ctx.Redirect(issue.Link()) + log.Error("Update pull request failed: %v", err) + ctx.JSONError("Unable to update pull request") return } - time.Sleep(1 * time.Second) + time.Sleep(100 * time.Millisecond) // TODO: it is really questionable whether the Sleep is useful here, need to figure out ctx.Flash.Success(ctx.Tr("repo.pulls.update_branch_success")) - ctx.Redirect(issue.Link()) + ctx.JSONRedirect(issue.Link()) } // MergePullRequest response for merging pull request diff --git a/templates/repo/editor/commit_form.tmpl b/templates/repo/editor/commit_form.tmpl index 7fdd36b3bd..d0c47e9bdd 100644 --- a/templates/repo/editor/commit_form.tmpl +++ b/templates/repo/editor/commit_form.tmpl @@ -22,7 +22,7 @@ -
+
@@ -30,9 +30,9 @@ {{svg "octicon-git-commit"}} {{ctx.Locale.Tr "repo.editor.commit_directly_to_this_branch" .BranchName}} {{if not .CommitFormOptions.CanCommitToBranch}} -
+
{{ctx.Locale.Tr "repo.editor.no_commit_to_branch"}} -
    +
      {{if not .CommitFormOptions.UserCanPush}}
    • {{ctx.Locale.Tr "repo.editor.user_no_push_to_branch"}}
    • {{end}} {{if and .CommitFormOptions.RequireSigned (not .CommitFormOptions.WillSign)}}
    • {{ctx.Locale.Tr "repo.editor.require_signed_commit"}}
    • {{end}}
    diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 275dd47a76..d1b327434b 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -1,8 +1,8 @@
    {{$createdStr:= DateUtils.TimeSince .Issue.CreatedUnix}} -
    -
    -
    +
    +
    +
    {{if .Issue.OriginalAuthor}} {{ctx.AvatarUtils.Avatar nil 40}} diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 6a67ef754d..ad26d4da88 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -362,7 +362,7 @@ {{else if eq .Type 22}}
    - {{$reviewType := -1}} + {{$reviewType := 2}}{{/* default to "comment" type if the review record is missing */}} {{if .Review}}{{$reviewType = .Review.Type}}{{end}} {{if not .OriginalAuthor}} {{/* Some timeline avatars need a offset to correctly align with their speech bubble. @@ -372,15 +372,17 @@ {{ctx.AvatarUtils.Avatar .Poster 40}} {{end}} - - {{if .Review}}{{svg (printf "octicon-%s" .Review.Type.Icon)}}{{end}} + + {{- if .Review -}} + {{- svg (printf "octicon-%s" .Review.Type.Icon) -}} + {{- else -}} + {{- svg "octicon-comment" -}} + {{- end -}} {{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}} {{if eq $reviewType 1}} {{ctx.Locale.Tr "repo.issues.review.approve" $createdStr}} - {{else if eq $reviewType 2}} - {{ctx.Locale.Tr "repo.issues.review.comment" $createdStr}} {{else if eq $reviewType 3}} {{ctx.Locale.Tr "repo.issues.review.reject" $createdStr}} {{else}} diff --git a/templates/repo/issue/view_content/pull_merge_box.tmpl b/templates/repo/issue/view_content/pull_merge_box.tmpl index 9f6330305a..d1594a52dd 100644 --- a/templates/repo/issue/view_content/pull_merge_box.tmpl +++ b/templates/repo/issue/view_content/pull_merge_box.tmpl @@ -46,7 +46,7 @@ {{end}} {{if $data.ShowUpdatePullInfo}}
    - {{template "repo/issue/view_content/update_branch_by_merge" (dict "MergeBoxData" $data "Issue" $.Issue)}} + {{template "repo/issue/view_content/update_branch_by_merge" (dict "MergeBoxData" $data "IssueLink" $.Issue.Link)}}
    {{end}} diff --git a/templates/repo/issue/view_content/pull_merge_instruction.tmpl b/templates/repo/issue/view_content/pull_merge_instruction.tmpl index 0f24b1b3ea..b3a36f01d6 100644 --- a/templates/repo/issue/view_content/pull_merge_instruction.tmpl +++ b/templates/repo/issue/view_content/pull_merge_instruction.tmpl @@ -1,9 +1,14 @@ {{$data := $.MergeBoxData}} {{$pull := $.PullRequest}}
    - {{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint"}} -
    -

    {{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_title"}}

    {{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_desc"}}
    + {{/* align with other item icon & text */}} + {{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint"}} + +
    +
    +

    {{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_title"}}

    + {{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_desc"}} +
    {{$localBranch := $pull.HeadBranch}} {{if ne $pull.HeadRepo.ID $pull.BaseRepo.ID}} {{$localBranch = print $pull.HeadRepo.OwnerName "-" $pull.HeadBranch}} @@ -19,7 +24,7 @@
    {{if $data.ShowMergeInstructions}}
    -

    {{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_title"}}

    +

    {{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_title"}}

    {{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_desc"}} {{if not $data.AutodetectManualMerge}}
    {{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_warning"}}
    diff --git a/templates/repo/issue/view_content/update_branch_by_merge.tmpl b/templates/repo/issue/view_content/update_branch_by_merge.tmpl index 0af10045d8..fcdf65b74d 100644 --- a/templates/repo/issue/view_content/update_branch_by_merge.tmpl +++ b/templates/repo/issue/view_content/update_branch_by_merge.tmpl @@ -1,33 +1,24 @@ {{$data := $.MergeBoxData}} -{{$issue := $.Issue}} +{{$issueLink := $.IssueLink}}
    {{svg "octicon-alert"}} {{ctx.Locale.Tr "repo.pulls.outdated_with_base_branch"}}
    -
    - {{if and $data.UpdateAllowed $data.UpdateByRebaseAllowed}} -
    - - + {{if $data.UpdateAllowed}} +
    + + {{if $data.UpdateByRebaseAllowed}} + {{end}}
    + {{end}}
    diff --git a/tests/e2e/reactions.test.ts b/tests/e2e/reactions.test.ts index 603cae8298..2048b938cf 100644 --- a/tests/e2e/reactions.test.ts +++ b/tests/e2e/reactions.test.ts @@ -12,7 +12,7 @@ test('toggle issue reactions', async ({page, request}) => { ]); await page.goto(`/${owner}/${repoName}/issues/1`); - const issueComment = page.locator('.timeline-item.comment.first'); + const issueComment = page.locator('.timeline-item.comment.issue-content-comment'); const reactionPicker = issueComment.locator('.select-reaction'); await reactionPicker.click(); diff --git a/tests/integration/actions_trigger_test.go b/tests/integration/actions_trigger_test.go index 4d88d42f36..e7a3cd7b4f 100644 --- a/tests/integration/actions_trigger_test.go +++ b/tests/integration/actions_trigger_test.go @@ -1801,7 +1801,7 @@ jobs: testEditFile(t, session, "user2", repoName, repo.DefaultBranch, "dir1/dir1.txt", "11") // update by rebase req := NewRequest(t, "POST", fmt.Sprintf("/%s/%s/pulls/%d/update?style=rebase", "user2", repoName, apiPull.Index)) - session.MakeRequest(t, req, http.StatusSeeOther) + session.MakeRequest(t, req, http.StatusOK) runner.fetchNoTask(t) }) } diff --git a/tests/integration/issue_test.go b/tests/integration/issue_test.go index 09475bad20..ba15f8962e 100644 --- a/tests/integration/issue_test.go +++ b/tests/integration/issue_test.go @@ -692,9 +692,9 @@ func TestIssueReferenceURL(t *testing.T) { htmlDoc := NewHTMLParser(t, resp.Body) // the "reference" uses relative URLs, then JS code will convert them to absolute URLs for current origin, in case users are using multiple domains - ref, _ := htmlDoc.Find(`.timeline-item.comment.first .reference-issue`).Attr("data-reference") + ref, _ := htmlDoc.Find(`.timeline-item.comment.issue-content-comment .reference-issue`).Attr("data-reference") assert.Equal(t, "/user2/repo1/issues/1#issue-1", ref) - ref, _ = htmlDoc.Find(`.timeline-item.comment:not(.first) .reference-issue`).Attr("data-reference") + ref, _ = htmlDoc.Find(`.timeline-item.comment:not(.issue-content-comment) .reference-issue`).Attr("data-reference") assert.Equal(t, "/user2/repo1/issues/1#issuecomment-2", ref) } diff --git a/web_src/css/modules/checkbox.css b/web_src/css/modules/checkbox.css index f24b91df07..a6caf3324f 100644 --- a/web_src/css/modules/checkbox.css +++ b/web_src/css/modules/checkbox.css @@ -105,6 +105,7 @@ input[type="checkbox"]:indeterminate::before { vertical-align: middle; } +.ui.disabled.checkbox input, .ui.disabled.checkbox label, .ui.checkbox input[disabled] ~ label { cursor: default !important; diff --git a/web_src/css/repo.css b/web_src/css/repo.css index fb85dc8e9f..8a581750ee 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -423,28 +423,14 @@ td .commit-summary { margin-right: 5px; } -.repository.view.issue .comment-list:not(.prevent-before-timeline)::before { - display: block; - content: ""; - position: absolute; - margin-top: 12px; - margin-bottom: 14px; - top: 0; - bottom: 0; - left: 96px; - width: 2px; - background-color: var(--color-timeline); - z-index: -1; -} - -.repository.view.issue .comment-list .timeline { +.repository.view.issue .comment-list { position: relative; display: block; margin-left: 40px; padding-left: 16px; } -.repository.view.issue .comment-list .timeline::before { /* ciara */ +.repository.view.issue .comment-list::before { display: block; content: ""; position: absolute; @@ -1318,6 +1304,7 @@ td .commit-summary { display: flex; align-items: center; gap: 6px; + flex-wrap: wrap; } .comment-header-right { @@ -1844,26 +1831,23 @@ tbody.commit-list { } @media (max-width: 767.98px) { - .repository.view.issue .comment-list .timeline, + .repository.view.issue .comment-list, .repository.view.issue .comment-list .timeline-item { margin-left: 0; } - .repository.view.issue .comment-list .timeline::before { + .repository.view.issue .comment-list::before { left: 14px; } - .repository.view.issue .comment-list .timeline .inline-timeline-avatar { + .repository.view.issue .comment-list .inline-timeline-avatar { display: flex; margin-bottom: auto; margin-left: 6px; margin-right: 2px; } - .repository.view.issue .comment-list .timeline .comment-header { - padding-left: 4px; - } /* Don't show the general avatar, we show the inline avatar on mobile. * And don't show the role labels, there's no place for that. */ - .repository.view.issue .comment-list .timeline .timeline-avatar, - .repository.view.issue .comment-list .timeline .comment-header-right .role-label { + .repository.view.issue .comment-list .timeline-avatar, + .repository.view.issue .comment-list .comment-header-right .role-label { display: none; } .commit-header h3 { diff --git a/web_src/js/features/repo-issue-content.ts b/web_src/js/features/repo-issue-content.ts index 865d4305e4..e385d5b1e8 100644 --- a/web_src/js/features/repo-issue-content.ts +++ b/web_src/js/features/repo-issue-content.ts @@ -94,7 +94,7 @@ function showContentHistoryDetail(issueBaseUrl: string, commentId: string, histo function showContentHistoryMenu(issueBaseUrl: string, elCommentItem: Element, commentId: string) { const elHeaderLeft = elCommentItem.querySelector('.comment-header-left')!; const menuHtml = ` -