Commit Graph
100 Commits
Author SHA1 Message Date
wxiaoguangandGitHub 4fe1066a17 Replace gobwas/glob package (#35478)
https://github.com/gobwas/glob is unmaintained and has bugs.
2025-09-13 18:01:00 +00:00
wxiaoguangandGitHub 325e059a50 Fix different behavior in status check pattern matching with double stars (#35474)
Drop the minimatch dependency, use our own glob compiler.

Fix #35473
2025-09-13 11:53:27 +08:00
wxiaoguangandGitHub 1f50048ac9 Refactor db package (#35380)
Remove unnecessary code
2025-08-30 01:04:06 +08:00
wxiaoguangandGitHub dca1af7cad Remove global context from db package (#35371) 2025-08-28 09:44:02 +00:00
wxiaoguangandGitHub 0cbaa0b662 Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
wxiaoguangandGitHub 60246730b5 Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
wxiaoguangandGitHub e837c998b7 Fix context usages (#35348) 2025-08-27 11:00:01 +00:00
wxiaoguangandGitHub 621f2fcadb Skip "parentsigned" check when the repo is empty (#35292)
Fix #35280
2025-08-16 19:24:30 +03:00
wxiaoguangandGitHub c3f5ea3b1f Fix repo file list partial reloading for submodules (#35183)
Fix the TODO and add more tests
2025-07-31 09:34:51 +08:00
wxiaoguangandGitHub 85b5877bb0 Fix various bugs (#35177)
* Fix #35144
* Fix #35117
* Fix https://github.com/go-gitea/gitea/issues/35054#issuecomment-3131793977
* Fix #35136
2025-07-30 07:08:59 +00:00
wxiaoguangandGitHub 86aafea3fb Fix session gob (#35128)
Fix #35126
2025-07-20 01:49:36 +00:00
wxiaoguangandGitHub c4f5b2b531 Don't use full-file highlight when there is a git diff textconv (#35114)
Fix #35106
2025-07-18 19:16:27 +08:00
wxiaoguangandGitHub 8f91bfe9d8 Fix submodule parsing when the gitmodules is missing (#35109)
Follow up #35096, fix #35095, fix #35115 and add more tests

The old code used some fragile behaviors which depend on the "nil"
receiver. This PR should be a complete fix for more edge cases.
2025-07-18 09:42:44 +00:00
wxiaoguangandGitHub de1114b4e8 Fix error logs and improve some comments/messages (#35105) 2025-07-17 19:09:54 +08:00
wxiaoguangandGitHub f0da1de7e3 Improve package API log handling (#35100)
Simplify code and fix log processing logic
2025-07-16 12:25:49 -04:00
wxiaoguangandGitHub fc4cb07beb Fix submodule nil check (#35096)
Fix  #35095
2025-07-16 12:07:38 +00:00
wxiaoguangandGitHub 692c90ea1d Fix form property assignment edge case (#35073)
"form" has an edge case: its `<input name=action>` element overwrites
the `action` property, we can only set attribute.

This PR makes `assignElementProperty` can handle such case, and add more
tests
2025-07-14 15:20:17 -07:00
d08459820d Improve submodule relative path handling (#35056)
Fix #35054

---------

Co-authored-by: Giteabot <teabot@gitea.io>
2025-07-14 23:28:34 +08:00
wxiaoguangandGitHub 7cc47da78c Refactor view issue & comment list styles (#35061)
Fix #35060
2025-07-13 22:52:35 +08:00
wxiaoguangandGitHub 6599efb3b1 Fix user's sign email check (#35045)
Fix #21692
2025-07-12 15:13:01 +08:00
wxiaoguangandGitHub a5a3d9b101 Refactor OpenIDConnect to support SSH/FullName sync (#34978)
* Fix #26585
* Fix #28327
* Fix #34932
2025-07-10 18:35:59 +00:00
wxiaoguangandGitHub 6ab6d4e17f Support base64-encoded agit push options (#35037) 2025-07-10 18:08:40 +00:00
wxiaoguangandGitHub f35dcfd489 Make submodule link work with relative path (#35034)
Fix #35033
2025-07-10 16:38:42 +00:00
wxiaoguangandGitHub 211135b4bb Fix various problems (#35012)
* Fix #35011
* Fix incorrect log message for "Protocol"
* Remove unnecessary styles, fix "comment-header" wrap, fix label height
2025-07-09 16:46:51 +00:00
wxiaoguangandGitHub 55f350542c Refactor mail template and support preview (#34990) 2025-07-09 10:25:25 +08:00
4e10adc871 Start automerge check again after the conflict check and the schedule (#34989)
Fix #34988

Co-authored-by: posativ
2025-07-08 14:51:16 +00:00
wxiaoguangandGitHub 3763c2ae28 Refactor time tracker UI (#34983)
Although we decided to "reduce the button amount" on the side bar, not
only one user reported that the "time tracker dropdown" is not easy to
use.

So the best we can do at the moment is: move the buttons to the sidebar
again.

Fix #34979
2025-07-08 08:59:31 +00:00
wxiaoguangandGitHub 9dafcc5c9e Improve project & label color picker and image scroll (#34971)
Fix #34609
Fix #34967
2025-07-06 23:37:26 +08:00
wxiaoguangandGitHub e0745eb14d Refactor webhook and fix feishu/lark secret (#34961) 2025-07-06 06:04:08 +00:00
wxiaoguangandGitHub 3533263ced Improve OAuth2 provider (correct Issuer, respect ENABLED) (#34966)
1. Make "Issuer" strictly follow the spec (see comment)
2. Make "/.well-known/openid-configuration" respond 404 if the OAuth2
provider is not enabled.

Then by the way, remove the JSEscape template helper because it is not
needed any more.
2025-07-06 13:36:45 +08:00
wxiaoguangandGitHub 429efc8b4f Merge index.js (#34963)
Fix #34960
2025-07-06 04:55:16 +00:00
wxiaoguangandGitHub 63ee6783b8 Refactor "delete-button" to "link-action" (#34962) 2025-07-06 00:01:53 +08:00
wxiaoguangandGitHub c05082669b Refactor frontend unique id & comment (#34958)
* there is no bug of the "unique element id", but duplicate code, this
PR just merges the duplicate "element id" logic and move the function
from "fomaintic" to "dom"
* improve comments
* make "git commit graph" page update pagination links correctly
2025-07-05 15:21:53 +00:00
wxiaoguangandGitHub 6033c67a1a Refactor some trivial problems (#34959)
1. make our "route group pattern match" also update chi's RoutePattern
2. fix incorrect "NotFound" call in conda package
3. make ".flex-item .flex-item-main" has a general gap, then no need to
use `tw` tricks
4. improve the "test webhook" UI
2025-07-05 23:19:33 +08:00
wxiaoguangandGitHub 70685a9489 Fix git graph page (#34948)
fix #34946
2025-07-04 15:41:19 +00:00
71e151cc22 Refactor head navbar icons (#34922)
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
2025-07-04 13:03:22 +02:00
wxiaoguangandGitHub d6d643fe86 Fix http auth header parsing (#34936)
Using `strings.EqualFold` is wrong in many cases.
2025-07-03 03:02:38 +00:00
wxiaoguangandGitHub 1d4ad5aa2b Improve html escape (#34911)
drop "escape-goat"
2025-07-01 21:44:05 +08:00
wxiaoguangandGitHub 90f96c301e Fix PR toggle WIP (#34920)
Fix #34919

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
2025-07-01 16:32:39 +08:00
wxiaoguangandGitHub 6596b92140 Fix modal + form abuse (#34921)
See the comment. And due to the abuse, there is a regression: when the
modal is hidden, the form will be reset and it can't submit.

This PR fixes all problems: keep the modal with form open, and add
"loading" indicator.
2025-07-01 15:19:03 +08:00
wxiaoguangandGitHub a94e472788 Fix issue filter (#34914)
`0` is zero value and won't be put into query parameter by QueryBuild

Fix #34913
2025-07-01 00:33:53 +08:00
wxiaoguangandGitHub 662db4a69c Improve tags list page (#34898) 2025-06-30 02:15:39 +00:00
wxiaoguangandGitHub 10cf2023bf Refactor container package (#34877)
Use standard db.WithTx and introduce db.WithTx2
2025-06-29 09:20:38 +08:00
wxiaoguangandGitHub 8df59fa11c Fix project column edit (#34890)
Fix #34888
2025-06-28 16:15:51 +08:00
75aa23a665 Refactor "change file" API (#34855)
Follow up the "editor" refactor, use the same approach to simplify code,
and fix some docs & comments

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
2025-06-25 11:25:20 -07:00
wxiaoguangandGitHub 1839110ea6 Fix some log and UI problems (#34863)
Remove the misleading error log, fix #34738

Make the "search" input auto-focused, fix #34807
2025-06-26 00:32:50 +08:00
wxiaoguangandGitHub d23c911997 Fix archive API (#34853)
Fix #34852
2025-06-25 14:55:19 +08:00
wxiaoguangandGitHub dbd9c69909 Refactor repo contents API and add "contents-ext" API (#34822)
See the updated swagger document for details.
2025-06-25 02:34:21 +00:00
wxiaoguangandGitHub 22a84a72cd Fix SSH LFS timeout (#34838)
Fix #34834
2025-06-24 15:49:31 +00:00
wxiaoguangandGitHub 6a97ab0af4 Fix team permissions (#34827)
* Fix #34793
* Fix #33456
2025-06-24 21:24:09 +08:00
327048c106 Refactor template helper (#34819)
FIx abuses and remove unused code

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2025-06-24 01:27:35 +08:00
wxiaoguangandGitHub 1748045285 Refactor packages (#34777) 2025-06-22 19:22:51 +08:00
wxiaoguangandGitHub f114c388ff Refactor wiki (#34805)
Remove unclear code
2025-06-22 18:53:33 +08:00
wxiaoguangandGitHub 4fc626daa1 Refactor editor (#34780)
A complete rewrite
2025-06-21 19:20:51 +08:00
wxiaoguangandGitHub 81adb01713 Improve img lazy loading (#34804)
Related #32051 and #13526
2025-06-21 14:53:22 +08:00
wxiaoguangandGitHub e0f3b30895 Fix container range bug (#34795)
Fix #34792 and add new tests
2025-06-21 01:13:34 +08:00
wxiaoguangandGitHub 719b151058 Fix OCI manifest parser (#34797)
Do not parse the media type we don't know.
2025-06-21 00:27:35 +08:00
wxiaoguangandGitHub 0ea958dc58 Fix tag target (#34781)
Fix #34779
2025-06-19 10:33:30 -07:00
wxiaoguangandGitHub 8efc4ca334 Refactor packages (func name & UI) (#34773)
1. Use `OpenXxx` instead of `GetXxx` because the returned readers should
be correctly closed, and clarify the behaviors of the functions: they
increase the download counter
2. Use `packages-content` styles instead of `issue-content`
2025-06-18 19:04:24 +00:00
wxiaoguangandGitHub a2ae7c69da Fix some package registry problems (#34759)
1. Fix #33787
2. Fix container image display
2025-06-19 00:32:43 +08:00
wxiaoguangandGitHub 7954f25290 Fix incorrect cli default values and default command (#34765) 2025-06-18 23:25:11 +08:00
wxiaoguangandGitHub b38813878c Fix readme path and markdown link paste (#34755) 2025-06-18 04:19:54 +00:00
71e4740946 Refactor some file edit related code (#34744)
Follow up #34350

---------

Co-authored-by: delvh <dev.lh@web.de>
2025-06-18 01:18:07 +00:00
f214bb40a3 Improve nuget/rubygems package registries (#34741)
1. Add some missing (optional) fields for nuget v2, and sort the fields
to make it easier to maintain
2. Add missing "platform" for rubygems: `VERSION-PLATFORM` and
`VERSION_PLATFORM`

Co-authored-by: Giteabot <teabot@gitea.io>
2025-06-17 19:42:00 +02:00
wxiaoguangandGitHub 4cbb482554 Fix JS error for "select" dropdown (#34743)
Regression of recent dropdown filter change.
2025-06-17 19:19:08 +08:00
wxiaoguangandGitHub 24ce2058e8 Clean bindata (#34728)
Follow #34692
2025-06-16 12:03:51 +00:00
wxiaoguangandGitHub 6b8b580218 Refactor container and UI (#34736) 2025-06-16 16:27:01 +08:00
wxiaoguangandGitHub 637070e07b Fix container range bug (#34725)
Fix #34724
2025-06-15 21:55:11 +03:00
wxiaoguangandGitHub 8fed27bf6a Fix various problems (#34708)
* Fix #34707
* Fix dropdown filter handling
* Fix #27014
2025-06-12 09:19:24 -07:00
wxiaoguangandGitHub 65986f423f Refactor embedded assets and drop unnecessary dependencies (#34692)
Benefits:

1. smaller binary size (reduces more than 1MB)
2. better control of the assets details
3. fewer unmaintained dependencies
4. faster startup if the assets are not needed
5. won't hang up editors when open "bindata.go" by accident
2025-06-12 03:59:33 +00:00
wxiaoguangandGitHub d5893ee260 Fix markdown wrap (#34697)
Fix #34696
2025-06-12 10:09:42 +08:00
wxiaoguangandGitHub 1610a63bfd Fix commit message rendering and some UI problems (#34680)
* Fix #34679
* Fix #34676
* Fix #34674
* Fix #34526
2025-06-10 23:20:32 +08:00
wxiaoguangandGitHub 0082cb51fa Fix last admin check when syncing users (#34649)
Fix #34358
2025-06-09 20:57:45 +00:00
wxiaoguangandGitHub 92e7e98c56 Update x/crypto package and make builtin SSH use default parameters (#34667) 2025-06-09 19:51:02 +00:00
wxiaoguangandGitHub 7b39c82587 Fix "oras" OCI client compatibility (#34666)
Fix #25846

1. the ImageConfig can be empty, fall back to default
2. the blob size can be empty, it still needs "Content-Length" header
2025-06-09 18:51:05 +00:00
wxiaoguangandGitHub 7a59f5a825 Ignore "Close" error when uploading container blob (#34620) 2025-06-09 07:06:21 +00:00
wxiaoguangandGitHub f6041441ee Refactor FindOrgOptions to use enum instead of bool, fix membership visibility (#34629) 2025-06-09 03:30:34 +00:00
wxiaoguangandGitHub cc942e2a86 Fix GetUsersByEmails (#34643) 2025-06-07 18:30:36 +00:00
wxiaoguangandGitHub 2a1585b32e Refactor some tests (#34580)
1. use `test.MockVariableValue` as much as possible
2. avoid `time.Sleep` as much as possible
2025-06-03 01:26:19 +00:00
wxiaoguangandGitHub e8d8984f7c Fix some trivial problems (#34579) 2025-06-02 15:22:43 +00:00
wxiaoguangandGitHub c6e2093f42 Clean up "file-view" related styles (#34558)
Move "file-view" and "code-view" related styles to their own file,
remove unnecessary `!important`
2025-05-28 21:43:59 +08:00
wxiaoguangandGitHub 9f10885b21 Refactor commit reader (#34542) 2025-05-27 16:49:05 +00:00
wxiaoguangandGitHub bf338bb9e2 Fix project board view (#34470)
Fix #34469
2025-05-15 23:25:46 +08:00
wxiaoguangandGitHub 5cb4cbf044 Fix repo broken check (#34444)
Fix #34424
2025-05-13 08:18:45 +00:00
wxiaoguangandGitHub 4a98ab0540 Remove legacy template helper functions (#34426)
These functions have been marked as `panicIfDevOrTesting` since 1.23
(#32422)
2025-05-11 01:42:21 -04:00
wxiaoguangandGitHub 9b8609e017 Fix GetUsersByEmails (#34423)
Fix #34418, fix #34353
2025-05-10 11:47:58 -07:00
wxiaoguangandGitHub 179068fddb Refactor commit message rendering and fix bugs (#34412)
Fix #34398, fix #33308

Remove all `repo.ComposeCommentMetas` from templates,
only use `repo` to render commit message.
2025-05-09 20:42:35 +08:00
wxiaoguangandGitHub f63822fe64 Fix autofocus behavior (#34397)
The "autofocus" was abused or misbehaved:

1. When users visit a page but they are not going to change a field,
then the field shouldn't get "autofocus"
* the "auth" / "user" page: in most cases, users do not want to change
the names
    * see also the GitHub's "settings" page behavior.
2. There shouldn't be duplicate "autofocus" inputs in most cases, only
the first one focuses
3. When a panel is shown, the "autofocus" should get focus
    * "add ssh key" panel

This PR fixes all these problems and by the way remove duplicate
"isElemHidden" function.
2025-05-08 18:26:18 +00:00
wxiaoguangandGitHub ba5c3f8087 Fix some dropdown problems on the issue sidebar (#34308)
Also fix #34300
2025-04-30 02:00:36 +00:00
0148d03f21 Enforce two-factor auth (2FA: TOTP or WebAuthn) (#34187)
Fix #880

Design:

1. A global setting `security.TWO_FACTOR_AUTH`.
* To support org-level config, we need to introduce a better "owner
setting" system first (in the future)
2. A user without 2FA can login and may explore, but can NOT read or
write to any repositories via API/web.
3. Keep things as simple as possible.
* This option only aggressively suggest users to enable their 2FA at the
moment, it does NOT guarantee that users must have 2FA before all other
operations, it should be good enough for real world use cases.
* Some details and tests could be improved in the future since this
change only adds a check and seems won't affect too much.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-04-28 15:31:59 -07:00
wxiaoguangandGitHub d1ad8e1e80 Update unrs-resolver (#34279) 2025-04-24 14:02:38 +02:00
e625250ffc Fix various trivial frontend problems (#34263)
1. Fix #20606
2. Fix #34246
3. Fix missing spaces, fix misspells, no visual change.
4. Fix missing "not-mobile", fix #34265

---------

Co-authored-by: silverwind <me@silverwind.io>
2025-04-24 09:11:54 +08:00
wxiaoguangandGitHub 58d2a87c6c update go&js dependencies (#34262) 2025-04-23 21:22:40 +00:00
wxiaoguangandGitHub b758241f28 Fix runner list tmpl (#34270)
Fix  #34269

And fix some layout problems.
2025-04-23 15:34:18 +00:00
wxiaoguangandGitHub 8aee07a064 Improve "not found" error messages for API (#34267)
Make the message clear, for example: #34266
2025-04-23 17:42:50 +08:00
wxiaoguangandGitHub 4832cb9e27 Display when a release attachment was uploaded (#34261)
Fix #34260
2025-04-22 23:03:49 +08:00
9705adb27f Make public URL generation configurable (#34250)
Follow up #32564

Co-authored-by: Jannis Pohl <838818+jannispl@users.noreply.github.com>
Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
2025-04-22 06:49:37 +08:00
wxiaoguangandGitHub c9aa9068b3 Fix various UI problems (#34243)
Also fix #34242
2025-04-19 08:43:22 +00:00
wxiaoguangandGitHub ba0deab616 Fix some trivial problems (#34237)
1. Using existing "content" variable in `swift.go`
2. Do not report 500 server error in `GetPullDiffStats` middleware,
otherwise a PR missing ref won't be able to view.
3. Fix the abused "label button" when listing commits, there was too
much padding space, see the screenshot below.
2025-04-18 22:56:50 +08:00
wxiaoguangandGitHub d2d381fd4b Improve "lock conversation" UI (#34207)
Fix #34203
2025-04-15 15:01:12 +00:00