aboutsummaryrefslogtreecommitdiffstats
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix dropdown delegating and some UI problems (#34014)wxiaoguang2025-03-261-1/+2
| | | | | | | | | | | | | | | | 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)
* 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`.
* Fix some migration and repo name problems (#33986)wxiaoguang2025-03-242-0/+24
| | | | | | 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
* Use filepath.Join instead of path.Join for file system file operations (#33978)Lunny Xiao2025-03-247-42/+10
|
* Fix incorrect code search indexer options (#33992)wxiaoguang2025-03-241-3/+2
| | | | | Fix #33798 Co-authored-by: Giteabot <teabot@gitea.io>
* Move ParseBool to optional (#33979)Lunny Xiao2025-03-245-28/+26
|
* Only use prev and next buttons for pagination on user dashboard (#33981)Lunny Xiao2025-03-232-25/+40
| | | | | | | | | | | 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>
* 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>
* Allow filtering issues by any assignee (#33343)Andreas Svanberg2025-03-218-30/+91
| | | | | | | | | | | | | | | | 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>
* Don't create duplicated functions for code repositories and wiki ↵Lunny Xiao2025-03-194-46/+12
| | | | | | | | | | 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.
* Added Description Field for Secrets and Variables (#33526)John Smith2025-03-172-0/+19
| | | | | | | Fixes #33484 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Try to figure out attribute checker problem (#33901)wxiaoguang2025-03-173-15/+94
| | | For #31600
* Move hooks function to gitrepo and reduce expose repopath (#33890)Lunny Xiao2025-03-162-8/+25
| | | | Extract from #28966 Follow #33874
* Refactor functions to reduce repopath expose (#33892)Lunny Xiao2025-03-163-16/+17
|
* Move git references checking to gitrepo packages to reduce expose of ↵Lunny Xiao2025-03-153-6/+33
| | | | repository path (#33891)
* Add file tree to file view page (#32721)Kerwin Bryant2025-03-152-1/+2
| | | | | | | | | | | Resolve #29328 This pull request introduces a file tree on the left side when reviewing files of a repository. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add abstraction layer to delete repository from disk (#33879)Lunny Xiao2025-03-141-1/+20
| | | | Extract from #28966 Follow #33874
* Make SearchMode have default value and add comments (#33863)wxiaoguang2025-03-148-19/+34
| | | | | | | * Make `SearchMode` have default value if it is empty * Add some comments for the "match" queries * Fix a copy-paste mistake in `buildMatchQuery` (`db.go`) * Add missing `q.Analyzer = repoIndexerAnalyzer`, it is in old code, although I do not see real difference ....
* Add old svg class name to git entry icon (#33884)wxiaoguang2025-03-141-5/+15
| | | Fix https://github.com/go-gitea/gitea/pull/33837#discussion_r1995521288
* Add abstraction layer to check if the repository exists on disk (#33874)Lunny Xiao2025-03-142-8/+13
| | | | | | | | | | Extract from #28966 This PR uses `gitrepo.IsRepositoryExist` instead of `util.IsExist` to detect whether the repository exist in disk. This will move `RepoPath` detail behind of package `gitrepo` to make it easier to do possible changes where storing the repositories. No code change
* remove context from retry downloader (#33871)TheFox0x72025-03-141-16/+14
| | | | follow up to https://github.com/go-gitea/gitea/pull/33399 as I apparently missed this one.
* Fix markdown render (#33870)wxiaoguang2025-03-134-21/+22
| | | | | Fix #33869, some code block is moved to make it easier to test. Added a new test
* Improve issue & code search (#33860)wxiaoguang2025-03-1319-107/+236
| | | | Each "indexer" should provide the "search modes" they support by themselves. And we need to remove the "fuzzy" search for code.
* Refactor cache-control (#33861)wxiaoguang2025-03-134-40/+59
| | | And fix #21391
* Add workflow_job webhook (#33694)ChristopherHX2025-03-113-1/+55
| | | | | | | | | Provide external Integration information about the Queue lossly based on https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=completed#workflow_job Naming conflicts between GitHub & Gitea are here, Blocked => Waiting, Waiting => Queued Rationale Enhancement for ephemeral runners management #33570
* Fix file icon mapping (#33855)wxiaoguang2025-03-112-6/+24
| | | | Use the file extension mapping from VSCode's extensions. Otherwise js/ts/vba/... files won't get correct icons.
* Fix material icon & diff highlight (#33844)wxiaoguang2025-03-103-29/+44
|
* Fix LFS URL (#33840)wxiaoguang2025-03-106-20/+121
| | | Fix #33839
* Add material icons for file list (#33837)wxiaoguang2025-03-109-46/+216
|
* Full-file syntax highlighting for diff pages (#33766)Dustin Firebaugh2025-03-092-10/+13
| | | | | | | | | | | | Fix #33358, fix #21970 This adds a step in the `GitDiffForRender` that does syntax highlighting for the entire file and then only references lines from that syntax highlighted code. This allows things like multi-line comments to be syntax highlighted correctly. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve log format (#33814)wxiaoguang2025-03-088-68/+114
|
* Decouple diff stats query from actual diffing (#33810)wxiaoguang2025-03-082-15/+9
| | | | | | | | | The diff stats are no longer part of the diff generation. Use `GetDiffShortStat` instead to get the total number of changed files, added lines, and deleted lines. As such, `gitdiff.GetDiff` can be simplified: It should not do more than expected. And do not run "git diff --shortstat" for pull list. Fix #31492
* Email option to embed images as base64 instead of link (#32061)sommerf-lf2025-03-053-14/+92
| | | | | | | | | | | | | | | | | | | | | | ref: #15081 ref: #14037 Documentation: https://gitea.com/gitea/docs/pulls/69 # Example Content: ![image](https://github.com/user-attachments/assets/e73ebfbe-e329-40f6-9c4a-f73832bbb181) Result in Email: ![image](https://github.com/user-attachments/assets/55b7019f-e17a-46c3-a374-3b4769d5c2d6) Result with source code: (first image is external image, 2nd is now embedded) ![image](https://github.com/user-attachments/assets/8e2804a1-580f-4a69-adcb-cc5d16f7da81) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove context from git struct (#33793)TheFox0x72025-03-0445-249/+239
| | | | Argument is moved from struct init in command run, which lets us remove context from struct.
* Refactor error system (#33771)wxiaoguang2025-03-035-38/+27
| | | It should not expose `util.SilentWrap` or construct it manually.
* Refactor global init code and add more comments (#33755)wxiaoguang2025-03-031-0/+4
| | | | | | | | | | | | | | | | | | | Follow up #33748 Now there are 3 "global" functions: * registerGlobalSelectorFunc: for all elements matching the selector, eg: `.ui.dropdown` * registerGlobalInitFunc: for `data-global-init="initInputAutoFocusEnd"` * registerGlobalEventFunc: for `data-global-click="onCommentReactionButtonClick"` And introduce `initGlobalInput` to replace old `initAutoFocusEnd` and `attachDirAuto`, use `data-global-init` to replace fragile `.js-autofocus-end` selector. Another benefit is that by the new approach, no matter how many times `registerGlobalInitFunc` is called, we only need to do one "querySelectorAll" in the last step, it could slightly improve the performance.
* Try to fix ACME path when renew (#33668)wxiaoguang2025-02-231-9/+16
| | | Try to fix #32191
* Upgrade golangci-lint to v1.64.5 (#33654)wxiaoguang2025-02-213-7/+6
| | | | | Use `usetesting` instead of deprecated `tenv`. 1. Follow up #33648 2. Make lint pass and add some comments
* Use test context in tests and new loop system in benchmarks (#33648)TheFox0x72025-02-2040-142/+120
| | | | | | | | Replace all contexts in tests with go1.24 t.Context() --------- Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix PR web route permission check (#33636)wxiaoguang2025-02-192-5/+32
| | | | | | | | | | | See the FIXME comment in code. Otherwise, if a repo's issue unit is disabled, then the PRs can't be edited anymore. By the way, make the permission log output look slightly better. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: metiftikci <metiftikci@hotmail.com>
* Refactor error system (#33626)wxiaoguang2025-02-171-6/+9
|
* Fix project issues list and counting (#33594)Lunny Xiao2025-02-171-2/+2
| | | | Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* enable literal string for code search (#33590)Darren Hoo2025-02-167-15/+147
| | | | | | | | Close: #33588 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Artifacts download api for artifact actions v4 (#33510)ChristopherHX2025-02-162-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | * download endpoint has to use 302 redirect * fake blob download used if direct download not possible * downloading v3 artifacts not possible New repo apis based on GitHub Rest V3 - GET /runs/{run}/artifacts (Cannot use run index of url due to not being unique) - GET /artifacts - GET + DELETE /artifacts/{artifact_id} - GET /artifacts/{artifact_id}/zip - (GET /artifacts/{artifact_id}/zip/raw this is a workaround for a http 302 assertion in actions/toolkit) - api docs removed this is protected by a signed url like the internal artifacts api and no longer usable with any token or swagger - returns http 401 if the signature is invalid - or change the artifact id - or expired after 1 hour Closes #33353 Closes #32124 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix various problems (artifact order, api empty slice, assignee check, fuzzy ↵wxiaoguang2025-02-131-0/+7
| | | | | | | | | | prompt, mirror proxy, adopt git) (#33569) * Make artifact list output a stable order * Fix #33506 * Fix #33521 * Fix #33288 * Fix #33196 * Fix #33561
* Feature: Support workflow event dispatch via API (#33545)wxiaoguang2025-02-112-0/+62
| | | | | | | | | Fix: https://github.com/go-gitea/gitea/issues/31765 (Re-open #32059) --------- Co-authored-by: Bence Santha <git@santha.eu> Co-authored-by: Bence Sántha <7604637+bencurio@users.noreply.github.com> Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
* Revert "Feature: Support workflow event dispatch via API (#32059)" (#33541)wxiaoguang2025-02-101-33/+0
| | | This reverts commit 523751dc82bbb9d3f8d413f232e23ab0476eb4d4.
* Feature: Support workflow event dispatch via API (#32059)Bence Sántha2025-02-101-0/+33
| | | | | | | | | ref: https://github.com/go-gitea/gitea/issues/31765 --------- Signed-off-by: Bence Santha <git@santha.eu> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
* refactor: decouple context from migration structs (#33399)TheFox0x72025-02-074-60/+51
| | | | | | | Use context as much as possible. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>