aboutsummaryrefslogtreecommitdiffstats
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
* Added Description Field for Secrets and Variables (#33526)John Smith8 days2-0/+19
| | | | | | | Fixes #33484 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Try to figure out attribute checker problem (#33901)wxiaoguang8 days3-15/+94
| | | For #31600
* Move hooks function to gitrepo and reduce expose repopath (#33890)Lunny Xiao9 days2-8/+25
| | | | Extract from #28966 Follow #33874
* Refactor functions to reduce repopath expose (#33892)Lunny Xiao10 days3-16/+17
|
* Move git references checking to gitrepo packages to reduce expose of ↵Lunny Xiao10 days3-6/+33
| | | | repository path (#33891)
* Add file tree to file view page (#32721)Kerwin Bryant10 days2-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 Xiao11 days1-1/+20
| | | | Extract from #28966 Follow #33874
* Make SearchMode have default value and add comments (#33863)wxiaoguang11 days8-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)wxiaoguang11 days1-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 Xiao12 days2-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)TheFox0x712 days1-16/+14
| | | | follow up to https://github.com/go-gitea/gitea/pull/33399 as I apparently missed this one.
* Fix markdown render (#33870)wxiaoguang12 days4-21/+22
| | | | | Fix #33869, some code block is moved to make it easier to test. Added a new test
* Improve issue & code search (#33860)wxiaoguang13 days19-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)wxiaoguang13 days4-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>
* Move gitgraph from modules to services layer (#33527)Lunny Xiao2025-02-074-1429/+0
| | | Just move, no code change.
* Add go wrapper around git diff-tree --raw -r -M (#33369)Alexander McRae2025-02-072-14/+29
| | | | | * Implemented calling git diff-tree * Ensures wrapper function is called with valid arguments * Parses output into go struct, using strong typing when possible
* Fix unnecessary comment when moving issue on the same project column (#33496)Lunny Xiao2025-02-051-1/+6
| | | Fix #33482
* chore: fix some trivial problems and TODOs (#33473)wxiaoguang2025-02-024-17/+7
| | | | | | | | | | | 1. Fix incorrect `MentionCount` (actually it seems to be deadcode, affects nothing) 2. Remove fallback sha1 support for time limit token 3. Use route middleware `reqRepoActionsWriter` for `ArtifactsDeleteView` 4. Use clearer message "Failed to authenticate user" instead of "Verify" when auth fails 5. `tests/integration/benchmarks_test.go` is not quite right, actually it is never used, so delete it. 6. Remove or update TODO comments
* Worktime tracking for the organization level (#19808)K Kovacs2025-02-033-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dear Gitea team, first of all, thanks for the great work you're doing with this project. I'm planning to introduce Gitea at a client site, and noticed that while there is time recording, there are no project-manager-friendly reports to actually make use of that data, as were also mentioned by others in #4870 #8684 and #13531. Since I had a little time last weekend, I had put together something that I hope to be a useful contribution to this great project (while of course useful for me too). This PR adds a new "Worktime" tab to the Organisation level. There is a date range selector (by default set to the current month), and there are three possible views: - by repository, - by milestone, and - by team member. Happy to receive any feedback! There are several possible future improvements of course (predefined date ranges, charts, a member time sheet, matrix of repos/members, etc) but I hope that even in this relatively simple state this would be useful to lots of people. <img width="1161" alt="Screen Shot 2022-05-25 at 22 12 58" src="https://user-images.githubusercontent.com/118010/170366976-af00c7af-c4f3-4117-86d7-00356d6797a5.png"> Keep up the good work! Kristof --------- Co-authored-by: user <user@kk-git1> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Inclusion of rename organization api (#33303)Bruno Sofiato2025-02-011-0/+9
| | | | | | | | | | | | | | | | | | This adds an endpoint (`/orgs/{org}/rename`) to rename organizations. I've modeled the endpoint using the rename user endpoint -- `/admin/users/{username}/rename` -- as base. It is the 1st time I wrote a new API endpoint (I've tried to follow the rename users endpoint code while writing it). So feel free to ping me if there is something wrong or missing. Resolves #32995 --------- Signed-off-by: Bruno Sofiato <bruno.sofiato@gmail.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix SSH LFS memory usage (#33455)wxiaoguang2025-01-3112-102/+74
| | | Fix #33448
* Revert empty lfs ref name (#33454)wxiaoguang2025-01-311-2/+6
| | | Fix #33453
* Add tests for webhook and fix some webhook bugs (#33396)Lunny Xiao2025-01-301-58/+2
| | | | | | This PR created a mock webhook server in the tests and added integration tests for generic webhooks. It also fixes bugs in package webhooks and pull request comment webhooks.
* Link to tree views of submodules if possible (#33424)Rowan Bohde2025-01-302-4/+4
| | | | | | | | | | | | | | This is a follow-up to https://github.com/go-gitea/gitea/pull/33097. When linking a submodule at a commit in either the repo view, or a diff when adding a new submodule, link to the tree view of that submodules intead of the individual commit. This shows the user the full tree, instead of the diff of the commit. This makes the assumption that the tree for a given SHA is at `<repo_url>/tree/<sha>`. This URL format is supported by both Github & Gitlab, but not Gitea. To fix this, add a redirect from `<username>/<repo>/tree/<ref>` to `<username>/<repo>/src/<ref>`, so that Gitea can support this URL structure.
* Refactor user & avatar (#33433)wxiaoguang2025-01-301-2/+2
| | | | | 1. better GetPossibleUserByID logic 2. fix some function name & comment typos 3. do not re-generate avatar if one exists