aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fail mirroring more gracefully (#34002)Royce Remer2025-03-262-11/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * reuse recoverable error checks across mirror_pull * add new cases for 'cannot lock ref/not our ref' (race condition in fetch) and 'Unable to create/lock" * move lfs sync right after commit graph write, and before other maintenance which may fail * try a prune for 'broken reference' as well as 'not our ref' * always sync LFS right after commit graph write, and before other maintenance which may fail This handles a few cases where our very large and very active repositories could serve mirrored git refs, but be missing lfs files: ## Case 1 (multiple variants): Race condition in git fetch There was already a check for 'unable to resolve reference' on a failed git fetch, after which a git prune and then subsequent fetch are performed. This is to work around a race condition where the git remote tells Gitea about a ref for some HEAD of a branch, then fails a few seconds later because the remote branch was deleted, or the ref was updated (force push). There are two more variants to the error message you can get, but for the same kind of race condition. These *may* be related to the git binary version Gitea has access to (in my case, it was 2.48.1). ## Case 2: githttp.go can serve updated git refs before it's synced lfs oids There is probably a more aggressive refactor we could do here to have the cat-file loop use FETCH_HEAD instead of relying on the commit graphs to be committed locally (and thus serveable to clients of Gitea), but a simple reduction in the occurrences of this for me was to move the lfs sync block immediately after the commit-graph write and before any other time-consuming (or potentially erroring/exiting) blocks. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix dropdown module accessing (#34026)wxiaoguang2025-03-261-2/+5
| | | Follow #34014.
* Polyfill WeakRef (#34025)wxiaoguang2025-03-262-0/+23
| | | Fix #33407
* Fix dropdown delegating and some UI problems (#34014)wxiaoguang2025-03-266-47/+64
| | | | | | | | | | | | | | | | The old logic is incomplete. See the comment for the improved logic. Fix #34011 And more fixes: 1. use empty "alt" for images, otherwise the width is not right when the image fails to load 2. remove the "dropdown icon" patch, because it has been clearly done in "dropdown.js" now 3. remove the "dropdown filtered item" patch, added a clear callback, and improve the logic 4. fix global init when a node is removed and added back gain (eg: the "cherry pick" dialog with a dropdown)
* Enable color output in govulncheck (#34012)silverwind2025-03-251-1/+1
| | | | Make `govulncheck` show color, which by default it doesn't for some reason.
* Update Makefile test comments (#34013)Rafael de Mattos2025-03-251-2/+2
| | | | The comments are referring to the wrong project section (backend and frontend).
* Move duplicated functions (#33977)Lunny Xiao2025-03-254-35/+35
| | | | Remove duplicated functions `IsExist`, `IsFile` and `IsDir` in package `modules/git` and use the exists functions in `modules/util`.
* Git client will follow 301 but 307 (#34005)Lunny Xiao2025-03-251-1/+3
| | | | | | | Fix #28460 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Prepare common tmpl functions in a middleware (#33957)wxiaoguang2025-03-256-80/+91
| | | | Fix the TODO in `routers/web/web.go`, and avoid the unnecessary `GetActiveStopwatch` SQL query in non-related route handlers.
* Update go mod dependencies (#33988)wxiaoguang2025-03-254-164/+178
| | | | | | | | blevesearch is skipped because it causes errors --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Fix some migration and repo name problems (#33986)wxiaoguang2025-03-2412-31/+123
| | | | | | 1. Ignore empty inputs in `UnmarshalHandleDoubleEncode` 2. Ignore non-existing `stateEvent.User` in gitlab migration 3. Enable `release` and `wiki` units when they are selected in migration 4. Sanitize repo name for migration and new repo
* [skip ci] Updated translations via CrowdinGiteaBot2025-03-251-0/+1
|
* Use filepath.Join instead of path.Join for file system file operations (#33978)Lunny Xiao2025-03-2412-56/+23
|
* Add changelog for 1.23.6 (#33975)Lunny Xiao2025-03-241-0/+22
| | | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix incorrect code search indexer options (#33992)wxiaoguang2025-03-241-3/+2
| | | | | Fix #33798 Co-authored-by: Giteabot <teabot@gitea.io>
* Auto expand "New PR" form (#33971)wxiaoguang2025-03-249-43/+64
| | | Follow GitHub's behavior: use `?expand=1` to expand the "New PR" form
* Move ParseBool to optional (#33979)Lunny Xiao2025-03-246-34/+31
|
* [skip ci] Updated translations via CrowdinGiteaBot2025-03-242-0/+13
|
* Only use prev and next buttons for pagination on user dashboard (#33981)Lunny Xiao2025-03-237-42/+65
| | | | | | | | | | | The pagination on the user dashboard sounds unnecessary, this will change it to a prev/next buttons. For instances with around `10 million` records in the action table, this option affects how the user dashboard is loaded on first visit. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* update jwt and redis packages (#33984)TheFox0x72025-03-232-8/+9
|
* [skip ci] Updated translations via CrowdinGiteaBot2025-03-2317-17/+10
|
* Improve oauth2 error handling (#33969)wxiaoguang2025-03-224-18/+32
| | | | Show the callback error to end users, it should be safe. Fix #33967
* [skip ci] Updated translations via CrowdinGiteaBot2025-03-2224-30/+7
|
* Cover `go.mod` and `go.sum` in `.editorconfig` (#33960)silverwind2025-03-211-0/+3
| | | | These files were previously set to use spaces for indendation but they are supposed to use tabs, so set this in editorconfig.
* Drop timeout for requests made to the internal hook api (#33947)Kai Leonhardt2025-03-211-11/+14
| | | | | | | | | This change targets https://github.com/go-gitea/gitea/issues/32663 We drop the hardcoded timeout of 60 seconds for requests to the internal hook api. With this change the timeout is completly removed. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix file name could not be searched if the file was not a text file when ↵charles2025-03-211-1/+2
| | | | | | | | | using the Bleve indexer (#33959) Close #33828 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix oauth2 auth and UI (#33961)wxiaoguang2025-03-213-43/+38
|
* Allow filtering issues by any assignee (#33343)Andreas Svanberg2025-03-2122-103/+169
| | | | | | | | | | | | | | | | This is the opposite of the "No assignee" filter, it will match all issues that have at least one assignee. Before ![Before change](https://github.com/user-attachments/assets/4aea194b-9add-4a84-8d6b-61bfd8d9e58e) After ![After change with any filter](https://github.com/user-attachments/assets/99f1205d-ba9f-4a0a-a60b-cc1a0c0823fe) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Optimize total count of feed when loading activities in user dashboard. (#33841)Lunny Xiao2025-03-204-7/+46
| | | | | | | | | | | | Two SQLs are very slow when `action` table have over 5M records. ``` database duration=1.8881s db.sql="SELECT created_unix DIV 900 * 900 AS timestamp, count(user_id) as contributions FROM `action` WHERE user_id=? AND act_user_id=? AND (created_unix > ?) GROUP BY timestamp ORDER BY timestamp" database duration=1.5408s db.sql="SELECT count(*) FROM `action` WHERE (user_id = ?) AND (is_deleted = ?)" ``` This will cache the count for the first loading or when the activities changed.
* Extract code to their own functions for push update (#33944)Lunny Xiao2025-03-201-86/+111
|
* Optimize heatmap query (#33853)Lunny Xiao2025-03-203-1/+61
| | | | | | | | | | | When there are over 5M records on `action` table, the heatmap on dashboard is very slow as below SQL. ``` database duration=1.8881s db.sql="SELECT created_unix DIV 900 * 900 AS timestamp, count(user_id) as contributions FROM `action` WHERE user_id=? AND act_user_id=? AND (created_unix > ?) GROUP BY timestamp ORDER BY timestamp" ``` This PR add a new index for `action` table with columns `user_id`, `act_user_id` and `created_unix` so that this query will become about 6 times faster than before.
* Add cli flags LDAP group configuration (#33933)TheFox0x72025-03-192-0/+77
| | | | | Add 7 new flags to ldap subcommands corresponding to UI options Closes CLI part of https://github.com/go-gitea/gitea/issues/20716
* Don't create duplicated functions for code repositories and wiki ↵Lunny Xiao2025-03-1920-77/+56
| | | | | | | | | | repositories (#33924) Fix https://github.com/go-gitea/gitea/pull/33910#pullrequestreview-2688913865 This PR changed the Repositroy interface in `gitrepo` package which makes it only focus the relative path in the disk and abstract whether it's a wiki repository or not.
* Fix "toAbsoluteLocaleDate" test when system locale is not en-US (#33939)YaFou2025-03-191-2/+2
|
* [skip ci] Updated translations via CrowdinGiteaBot2025-03-191-0/+1
|
* Optimize Layout Styles of Filelist (#33920)Kerwin Bryant2025-03-192-9/+21
| | | | | | | Align items --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2025-03-1827-1/+28
|
* update go version for devcontainers (#33923)metiftikci2025-03-171-1/+1
|
* Added Description Field for Secrets and Variables (#33526)John Smith2025-03-1720-63/+247
| | | | | | | Fixes #33484 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Try to figure out attribute checker problem (#33901)wxiaoguang2025-03-174-15/+96
| | | For #31600
* Defer captcha script loading (#33919)wxiaoguang2025-03-171-3/+3
| | | Fix #33899
* Fix file tree issues (#33916)Kerwin Bryant2025-03-173-4/+3
|
* Remove unused or abused styles (#33918)wxiaoguang2025-03-178-64/+13
| | | | | | * `top aligned` => `tw-align-top` * label list: it was broken, this PR fixes it * reference link: simplified * settings/repos: not affected
* [skip ci] Updated translations via CrowdinGiteaBot2025-03-172-7/+11
|
* Update tool dependencies (#33907)silverwind2025-03-161-2/+2
| | | | | | | `gopls` is currently excluded because its [new analyzers](https://github.com/golang/tools/releases/tag/gopls%2Fv0.18.0) raise many issue, to be fixed before we can upgrade it. And I think the modernize fixer still has a number of [unresolved/undiscovered bugs](https://github.com/golang/go/issues/71847).
* Move hooks function to gitrepo and reduce expose repopath (#33890)Lunny Xiao2025-03-168-24/+38
| | | | Extract from #28966 Follow #33874
* Replace text-align classes with tailwind (#33905)silverwind2025-03-1640-136/+83
| | | | | | | Small refactor to remove these CSS classes in favor of tailwind. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Simplify secure context check (#33906)silverwind2025-03-161-7/+4
| | | | As discussed in https://github.com/go-gitea/gitea/pull/33820/files#r1997532169.
* Update JS and PY deps, misc tweaks (#33903)silverwind2025-03-1610-1228/+1188
| | | | | | | | | - Update all updateable dependencies - Add a few more unupgradable ones to updates blocklist - Adapt to breaking changes - Update to typescript 5.8, enable `erasableSyntaxOnly` which necessitated a change because of forbidden syntax - Misc cleanups - Tested htmx, easymde, swagger, chart.js
* Refactor functions to reduce repopath expose (#33892)Lunny Xiao2025-03-166-25/+25
|