Commit graph

18178 commits

Author SHA1 Message Date
Yarden Shoham 7512b9f7d4
Switch to the maintained vitest extension (#29914)
https://marketplace.visualstudio.com/items?itemName=zixuanchen.vitest-explorer
was moved to
https://marketplace.visualstudio.com/items?itemName=vitest.explorer

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
(cherry picked from commit 8bf4173e31a4018fb277c871df7d8d31c98dba0b)
2024-03-26 19:04:25 +01:00
silverwind 8c3d7c049a
Forbid jQuery .css and refactor all usage (#29852)
Tested all functionality. There is a [pre-existing
bug](https://github.com/go-gitea/gitea/issues/29853) when moving a
project panels which is not caused by this refactoring.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit fa100618c4b644346bf5666f92d33dce0747d0a2)
2024-03-26 19:04:25 +01:00
silverwind 272dffb0d6
Fix border on focus in dashboard repo search (#29893)
Before:

<img width="449" alt="Screenshot 2024-03-18 at 22 35 10"
src="https://github.com/go-gitea/gitea/assets/115237/f2893870-e7a3-4e34-b0cf-4610735c9b36">

After:

<img width="453" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/36a9f800-28a4-40fc-b6d2-a2e717ddba01">

(cherry picked from commit 5a8559ec47a271e45bf5836eaf5e9040a0f1d6bf)
2024-03-26 19:04:25 +01:00
yp05327 e8e8d14b53
Fix invalid link of the commit status when ref is tag (#29752)
Fix #29731
Caused by #24634
Also remove fixme.

ps: we can not fix the existed runs, as wrong refs are all recorded in
DB, and we can not know whether they are branch or tag:

![image](https://github.com/go-gitea/gitea/assets/18380374/cb7cf266-f73f-419a-be1a-4689fdd1952a)

(cherry picked from commit 98217b034076157547cf688cc10f47cd3275c872)

Conflicts:
	tests/integration/actions_trigger_test.go
	there is a need for more imports because the exist tests
	are done differently, using CreateDeclarativeRepo
2024-03-26 19:04:25 +01:00
Zettat123 0da787f237
Fix milestoneID filter bug in issue list (#29897)
Fix #29717

(cherry picked from commit 656d8e2267dbdbb595704d507a780533038bb7ed)
2024-03-26 19:04:25 +01:00
coldWater 664052fb0b
Fix missing error check of bufio.Scanner (#29882)
maybe more

(cherry picked from commit 0e183d81fc5283f9d2047472de580e4f04a046c1)
2024-03-26 19:04:25 +01:00
Nanguan Lin 40c9fa43cd
Remove unused error in graceful manager (#29871)
As title.

(cherry picked from commit 1f0d31ce8fdfc8c32f84e4e0801c2d04b727bbd8)
2024-03-26 19:04:25 +01:00
silverwind 4711d3311b
Migrate border and margin classes to Tailwind (#29828)
Used all existing css vars, other migrations are 1:1.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 34290a00c4501ffeba26db267be71ab68e3ec97f)

Conflicts:
	templates/repo/issue/filter_list.tmpl
	web_src/js/components/DashboardRepoList.vue
	trivial context conflicts
2024-03-26 19:04:25 +01:00
wxiaoguang fbf0b3d661
Only do counting when count_only=true for repo dashboard (#29884)
Ref: #29878
(cherry picked from commit b251e608c01392c947f84be387f956541bfea25c)
2024-03-26 19:04:25 +01:00
buckybytes 0d3ddec26c
Editor error message misleading due to re-used key. (#29859)
The error message:

`editor.file_changed_while_editing = The file contents have changed
since you started editing. <a target="_blank" rel="noopener noreferrer"
href="%s">Click here</a> to see them or <strong>Commit Changes
again</strong> to overwrite them.`

Is re-used in inappropriate contexts. The link in the key goes to a 404
when the key is used in a situation where the file contents have not
changed.

Added two new keys to differentiate commit id mismatch and push out of
date conditions.

(cherry picked from commit 16e360099d0a515d429538ec88cff1f3ede23fb4)
2024-03-26 19:04:25 +01:00
GiteaBot 0500d926b2
[skip ci] Updated licenses and gitignores
(cherry picked from commit a4a766f4a205d507d157f2f17a0e761e00939cb8)
2024-03-26 19:04:25 +01:00
silverwind 6eb576c36d
move some scripts from 'build' to 'tools' directory, misc refactors (#29844)
- Move some scripts from `build` to new `tools` dir. Eventually i would
like to move all but let's do it step-by-step.
- Add dir to eslint and move the files into vars.
- Update docs accordingly.
- While updating docs I noticed we were incorrectly having `public/img`
path still in a few places. Replace those with the current
`public/assets/img`.

---------

Co-authored-by: Nanguan Lin <nanguanlin6@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 095fdd691dd1a7d7748372cc73e7708278c80933)
2024-03-26 19:04:25 +01:00
Nanguan Lin a2f4ab60e8
Fix missing code in the user profile (#29865)
fix #29820
deleted by
https://github.com/go-gitea/gitea/pull/29248/files#diff-2b0b591787f16325539485e648a09ab6d3177f47dc129cfe84a35ffe141dfd19L39-L62,
which causing malfunction of follow/unfollow and missing description in
the user profile page.

(cherry picked from commit 5ca65d33906ebbca1e502536ffef18942b541c1d)

Conflicts:
	routers/web/shared/user/header.go
	trivial context conflict because of user blocking code
2024-03-26 19:04:25 +01:00
Denys Konovalov 20f839ad00
fix telegram webhook (#29864)
Fix #29837 which is a regression caused by

https://github.com/go-gitea/gitea/pull/29145/files#diff-731445ee00f0f1bf2ff731f4f96ddcf51cdc53fd2faaf406eb3536fc292ea748L48.

The line was probably removed by accident.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 0285b04f4ca981d7467097dbca3b281011b7798c)
2024-03-26 19:04:25 +01:00
Nanguan Lin 32380ffa57
Fix user id column case (#29863)
Sometimes the column name is case-sensitive and it may cause 500.

(cherry picked from commit df05c558da704f0c9c9f11d32bba2a9c1cb2f8a8)
2024-03-26 19:04:25 +01:00
silverwind 003d860aac
Avoid JS error on issue/pr list when logged out (#29854)
When logged out, the checkboxes are not there on the issue/pr lists,
which would cause an error here.

Fixes: https://github.com/go-gitea/gitea/issues/29862

---------

Co-authored-by: delvh <dev.lh@web.de>
(cherry picked from commit 33973ac567d6681bda26d82f26b7294a297c693f)
2024-03-26 19:04:24 +01:00
wxiaoguang 2141bc3298
Refactor clone-panel styles (#29861)
1. The borders were doubled on the "empty" page, fix it.
2. Remove unnecessary CSS classes like "clone", "compact", etc
3. Use CSS class "clone-panel" instead of ID "clone-panel"
4. Use `tw-flex-1` instead of `gt-f1`
5. Remove unnecessary ID "more-btn"

(cherry picked from commit 673286d8c8a00bf7240a93187d767fb5a5e32a31)
2024-03-26 19:04:24 +01:00
Codeberg Translate cd28684ac3 [I18N] Translations update from Weblate (#2727)
Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

Co-authored-by: Fjuro <Fjuro@users.noreply.translate.codeberg.org>
Co-authored-by: fnetX <otto@codeberg.org>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: ormai <ormai@users.noreply.translate.codeberg.org>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: kita <kita@users.noreply.translate.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: Salif Mehmed <mail@salif.eu>
Co-authored-by: Maytham Alsudany <maytha8thedev@gmail.com>
Co-authored-by: Dirk <Dirk@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2727
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-03-26 17:28:11 +00:00
Earl Warren 4766cbe8ea Merge pull request '[BUG] Detect protected branch on branch rename' (#2811) from gusted/forgejo-protectedbranch-rename into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2811
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-03-26 16:15:13 +00:00
Gusted 0f79122053
[BUG] Detect protected branch on branch rename
- If a branch cannot be renamed due to a protected branch rule, show
this error in the UI instead of throwing an internal server error.
- Add integration test (also simplify the existing one).
- Resolves #2751
2024-03-26 15:58:52 +01:00
Earl Warren 8693e4d63d Merge pull request 'Add more renovate groups and priorize self updates' (#2816) from viceice/forgejo:chore/renovate-1 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2816
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-26 11:40:08 +00:00
Michael Kriese 91d34924fa
Reduce concurrent Renovate PR's 2024-03-26 09:40:48 +01:00
Michael Kriese bfde9c6866
Add prio for renovate self updates 2024-03-26 09:37:19 +01:00
Michael Kriese c60600a689
Add more renovate groups 2024-03-26 09:24:24 +01:00
oliverpool d301fbc3c0 Merge pull request 'modules/git: Recognize SSH signed tags too' (#2520) from algernon/forgejo:ssh-exclamation-mark-one-one-exclamation-mark-space-key into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2520
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-26 08:09:36 +00:00
Gergely Nagy 40c357bbc5 Rename CommitGPGSignature to ObjectSignature
`CommitGPGSignature` was originally made to store information about a
commit's GPG signature. Nowadays, it is used to store information about
SSH signatures too, and not just commit signatures, but tag signatures
too.

As such, rename it to `ObjectSignature`, because that describes what it
does a whole lot better.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-03-26 08:09:36 +00:00
Gergely Nagy 8fdffc94ca Add a migration to remove SSH signatures from release notes
Because the `git` module did not recognize SSH signed tags, those
signatures ended up in the `notes` column of the `release` table. While
future signatures will not end up there, Forgejo should clean up the old
ones.

This migration does just that: finds all releases that have an SSH
signature, and removes those signatures, preserving the rest of the
note (if any).

While this may seem like an expensive operation, it's only done once,
and even on the largest known Forgejo instance as of this
writing (Codeberg), the number of affected rows are just over a hundred,
a tiny amount all things considered.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-03-26 08:09:36 +00:00
Gergely Nagy 26ed995290 modules/git: Recognize SSH signed tags too
Just like commits, tags can be signed with either an OpenPGP, or with an
SSH key. While the latter is supported already, SSH-signed tags have not
been. This patch teaches the git module to recognize and handle
SSH-signed tags too.

This will stop the signatures appearing in release notes, but are
currently unused otherwise.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-03-26 08:09:36 +00:00
Earl Warren a334c7ca17 Merge pull request 'Add more Renovate groupings' (#2815) from viceice/forgejo:chore/renovate-1 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2815
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-26 07:58:16 +00:00
Michael Kriese ec8925902b
Add more Renovate groupings 2024-03-26 08:48:38 +01:00
Earl Warren c74649bcff Merge pull request 'go: upgrade to go v1.22 - Dockerfile*' (#2814) from earl-warren/forgejo:wip-go-1.22 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2814
2024-03-26 06:42:46 +00:00
Earl Warren a140d4b90d Merge pull request '[BUG] Fix Ctrl+Enter on editor' (#2810) from gusted/forgejo-ctrlenter-editor into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2810
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-26 06:39:48 +00:00
Earl Warren 06e27e31c2
go: upgrade to go v1.22 - Dockerfile* 2024-03-26 06:48:32 +01:00
Gusted 9db76036bb
[BUG] Fix Ctrl+Enter on editor
- Add event listener for the `ce-quick-submit` event, which will be
triggered if `Ctrl+Enter` is pressed on a text area.
- Regression of 5cc0801de9
- Resolves #2762
2024-03-26 00:25:36 +01:00
Earl Warren 5194bd15ef Merge pull request 'Update module github.com/editorconfig/editorconfig-core-go/v2 to v2.6.1' (#2804) from renovate/github.com-editorconfig-editorconfig-core-go-v2-2.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2804
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-25 19:48:58 +00:00
Earl Warren bc4f09c16b Merge pull request 'Update module github.com/go-enry/go-enry/v2 to v2.8.7' (#2807) from renovate/github.com-go-enry-go-enry-v2-2.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2807
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-25 19:47:15 +00:00
Renovate Bot a6fdab95f8 Update module github.com/go-enry/go-enry/v2 to v2.8.7 2024-03-25 19:05:23 +00:00
Earl Warren 892f0bb069 Merge pull request 'Update dependency katex to v0.16.10' (#2801) from renovate/katex-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2801
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-25 17:59:11 +00:00
Earl Warren 63952406e4 Merge pull request 'Update dependency asciinema-player to v3.7.1' (#2800) from renovate/asciinema-player-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2800
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-25 17:56:07 +00:00
Renovate Bot eccd824b01 Update module github.com/editorconfig/editorconfig-core-go/v2 to v2.6.1 2024-03-25 17:37:18 +00:00
Earl Warren d3b4e8132f Merge pull request 'Update gitea.com/go-chi/session digest to 16768d9' (#2782) from renovate/gitea.com-go-chi-session-digest into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2782
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-25 16:40:48 +00:00
Renovate Bot 823c173970 Update dependency katex to v0.16.10 2024-03-25 16:30:12 +00:00
Renovate Bot d00f542651 Update dependency asciinema-player to v3.7.1 2024-03-25 15:18:44 +00:00
Renovate Bot 6e968e0ce3 Update gitea.com/go-chi/session digest to 16768d9 2024-03-25 15:18:21 +00:00
Earl Warren 23f68cad7e Merge pull request 'Update gitea.com/go-chi/captcha digest to fb487f6' (#2778) from renovate/gitea.com-go-chi-captcha-digest into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2778
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-25 14:48:29 +00:00
Earl Warren 9e72beae0b Merge pull request 'Update renovate config' (#2789) from viceice/forgejo:chore/renovate-1 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2789
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-25 13:54:43 +00:00
Michael Kriese b561c02b56
Update renovate config 2024-03-25 14:52:42 +01:00
Renovate Bot 46aaecc2b8 Update gitea.com/go-chi/captcha digest to fb487f6 2024-03-25 13:37:57 +00:00
Earl Warren 60a01255e7 Merge pull request 'Disable renovate digist pinning' (#2787) from viceice/forgejo:chore/renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2787
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-25 13:15:23 +00:00
Michael Kriese 477832f4a2
Disable renovate digist pinning 2024-03-25 14:12:49 +01:00