aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Only keep popular licenses (#33832)wxiaoguang2025-03-10712-40616/+12
| | | Fix #33467
* Removing unwanted ui container (#33833)Vinoth Kumar2025-03-101-0/+2
| | | | | | when the passkey auth and register was disabled the unwanted ui container was show Co-authored-by: Vinoth414 <103478407+Vinoth414@users.noreply.github.com>
* Full-file syntax highlighting for diff pages (#33766)Dustin Firebaugh2025-03-0914-324/+362
| | | | | | | | | | | | 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 theme display (#30671)wxiaoguang2025-03-0810-30/+177
| | | | | | Document: https://gitea.com/gitea/docs/pulls/180 ![image](https://github.com/go-gitea/gitea/assets/2114189/68e38573-b911-45d9-b7aa-40d96d836ecb)
* Decouple context from repository related structs (#33823)TheFox0x72025-03-0811-122/+118
| | | Calls that required context implicitly are made to pass it as argument
* Improve log format (#33814)wxiaoguang2025-03-0813-76/+122
|
* Decouple diff stats query from actual diffing (#33810)wxiaoguang2025-03-0817-210/+154
| | | | | | | | | 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
* Add global lock for migrations to make upgrade more safe with multiple ↵Lunny Xiao2025-03-0710-18/+46
| | | | replications (#33706)
* Do not show passkey on http sites (#33820)wxiaoguang2025-03-071-1/+10
| | | Fix #33615
* Use correct start and end commits for GetDiffTree (#33816)Alexander McRae2025-03-071-1/+1
| | | | | | Fixes https://github.com/go-gitea/gitea/pull/33514#issuecomment-2702814099 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Try to fix ACME (3rd) (#33807)wxiaoguang2025-03-071-1/+8
| | | Fix #33802, fix #32191
* remove context from mail struct (#33811)TheFox0x72025-03-064-99/+103
| | | it can be passed by argument instead
* [skip ci] Updated translations via CrowdinGiteaBot2025-03-061-0/+1
|
* Refactor: move part of updating protected branch logic to service layer (#33742)Lunny Xiao2025-03-054-61/+52
|
* Update changelog for v1.23.5 (#33797)Lunny Xiao2025-03-051-0/+22
| | | frontport from #33780
* Email option to embed images as base64 instead of link (#32061)sommerf-lf2025-03-057-28/+328
| | | | | | | | | | | | | | | | | | | | | | 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>
* Update TypeScript types (#33799)Kerwin Bryant2025-03-053-8/+8
| | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Disable vet=off again (#33794)silverwind2025-03-051-1/+1
| | | | | Ref: https://github.com/go-gitea/gitea/issues/33792 To avoid slowing unit-test down.
* [skip ci] Updated translations via CrowdinGiteaBot2025-03-0512-12/+0
|
* Upgrade golang net from 0.35.0 -> 0.36.0 (#33795)Lunny Xiao2025-03-042-3/+3
|
* Remove context from git struct (#33793)TheFox0x72025-03-0498-497/+487
| | | | Argument is moved from struct init in command run, which lets us remove context from struct.
* Small refactor to reduce unnecessary database queries and remove duplicated ↵Lunny Xiao2025-03-0410-12/+32
| | | | functions (#33779)
* Refactor repo-issue.ts (#33784)wxiaoguang2025-03-0410-233/+191
| | | And remove jQuery
* Refactor repo-settings.ts (#33785)wxiaoguang2025-03-051-39/+39
| | | and remove jQuery
* Refactor admin/common.ts (#33788)wxiaoguang2025-03-041-87/+112
| | | Only remove jQuery
* Adjust appearence of commit status webhook (#33778)Denys Konovalov2025-03-032-5/+12
| | | | | | | | | | | | | | | | Some visual improvement for the commit status webhook message introduced by #33320 - use short commit SHA as already done in e. g. commit webhook - fix spacing, link text - do not set user link for internal gitea-actions user Before: ![grafik](https://github.com/user-attachments/assets/9c460846-c350-444c-89b5-8a0d5e26cb86) After: ![grafik](https://github.com/user-attachments/assets/05519cd8-6d8f-432b-bd9d-082de558a55a)
* Refactor initRepoBranchTagSelector to use new init framework (#33776)Kerwin Bryant2025-03-034-6/+9
| | | | | | | | Make "initRepoBranchTagSelector" to use new init framework and fix the abused "js-branch-tag-selector" styles --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor buttons to use new init framework (#33774)Kerwin Bryant2025-03-036-28/+30
| | | | | | | | | | Make buttons to use new init framework * "js-toggle-commit-body" * "show-panel/hide-panel/show-modal" * "copy-content" --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor markup and pdf-viewer to use new init framework (#33772)Kerwin Bryant2025-03-0329-235/+203
| | | | | | | | | | | | | | | | 1. Add some "render-content" classes to "markup" elements when the content is rendered 2. Use correct "markup" wrapper for "preview" (but not set that class on the tab) 3. Remove incorrect "markup" class from LFS file view, because there is no markup content * "edit-diff" is also removed because it does nothing 5. Use "initPdfViewer" for PDF viewer 6. Remove incorrect "content" class from milestone markup 7. Init all ".markup" elements by new init framework --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Disable `vet` as part of `go test` (#33662)silverwind2025-03-032-6/+7
| | | | | | | | | `go vet` implicitely runs as part of `go test`, but we already have `make lint-go-vet`, so we were essentially running it twice. This should hopefully make `go test` slightly faster. Ref: https://pkg.go.dev/cmd/go#hdr-Test_packages > As part of building a test binary, go test runs go vet
* Refactor error system (#33771)wxiaoguang2025-03-0312-58/+41
| | | It should not expose `util.SilentWrap` or construct it manually.
* Add migrations and doctor fixes (#33556)Lunny Xiao2025-03-026-0/+81
| | | Fix #33535
* Refactor mail code (#33768)wxiaoguang2025-03-037-514/+536
| | | `mail.go` contains various different functions, it's time to split it.
* Refactor global init code and add more comments (#33755)wxiaoguang2025-03-0310-120/+151
| | | | | | | | | | | | | | | | | | | 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.
* Use pullrequestlist instead of []*pullrequest (#33765)Lunny Xiao2025-03-023-19/+18
| | | Just renames no code changed.
* Upgrade act to 0.261.4 and actions-proto-go to v0.4.1 (#33760)Lunny Xiao2025-03-012-6/+6
| | | | Include https://gitea.com/gitea/act/pulls/129 Fix #33657 And https://gitea.com/gitea/actions-proto-def/pulls/14
* Webhook add X-Gitea-Hook-Installation-Target-Type Header (#33752)ChristopherHX2025-03-014-4/+25
| | | | | | | | | | | | This is a X-GitHub Header port * repository for repository webhooks (matches GitHub) * organization for organization webhooks (matches GitHub) * user for user webhooks (Gitea specific) * system for system webhooks (Gitea specific) * default for default hooks needs testing (Gitea specific) - `X-Gitea-Hook-Installation-Target-Type` - `X-GitHub-Hook-Installation-Target-Type`
* Fix dynamic content loading init problem (#33748)wxiaoguang2025-03-0113-135/+171
| | | | | | | | | | | | | | | | 1. Rewrite `dirauto.ts` to `observer.ts`. * We have been using MutationObserver for long time, it's proven that it is quite performant. * Now we extend its ability to handle more "init" works. 2. Use `observeAddedElement` to init all non-custom "dropdown". 3. Use `data-global-click` to handle click events from dynamically loaded elements. * By this new approach, the old fragile selector-based (`.comment-reaction-button`) mechanism is removed. 4. By the way, remove unused `.diff-box` selector, it was abused and never really used. A lot of FIXMEs in "repo-diff.ts" are completely fixed, newly loaded contents could work as expected.
* [skip ci] Updated translations via CrowdinGiteaBot2025-03-0121-21/+0
|
* Add composor source field (#33502)Lunny Xiao2025-02-284-13/+70
| | | Fix #33066
* upgrade go-crypto from 1.1.5 to 1.1.6 (#33745)Lunny Xiao2025-02-283-6/+7
| | | | | | | Fix #33296 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Disable go license generation as part of `make tidy` (#33747)silverwind2025-02-281-2/+3
| | | | | | | | | | | | | | | | | It seems something broken `google/go-licenses` (maybe related to go 1.24), and my findings are in https://github.com/google/go-licenses/issues/128#issuecomment-2689753365. I think it's best we disable this generation for now until a better solution is found. Also, enable showing stderr output so we can actually debug this thing. For reference, these are the errors that currently apparently break the tool: ``` E0228 05:15:27.005759 13158 library.go:117] Package text/tabwriter does not have module info. Non go modules projects are no longer supported. For feedback, refer to https://github.com/google/go-licenses/issues/128. E0228 05:15:27.005776 13158 library.go:117] Package net/http/fcgi does not have module info. Non go modules projects are no longer supported. For feedback, refer to https://github.com/google/go-licenses/issues/128. F0228 05:15:27.028122 13158 main.go:77] some errors occurred when loading direct and transitive dependency packages ```
* Refactor repo-diff.ts (#33746)wxiaoguang2025-02-282-67/+52
| | | Remove jQuery
* Use `git diff-tree` for `DiffFileTree` on diff pages (#33514)Alexander McRae2025-02-2817-224/+352
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify Diff View FileTree to show all files ## Changes * removes Show Status button on diff * uses `git diff-tree` to generate the file tree for the diff * doesn't reload the diff tree each time we load more files in the preview * selecting and unloaded file will keep loading until that file is loaded * removes `DiffFileList.vue` and "Show Stats" in diff options ## Open Questions * selecting and unloaded file will keep loading until that file is loaded. Is this behaviour okay? It matches what github does. ### Demo In this demo I set `git.MAX_GIT_DIFF_FILES=1` in my `app.ini` to demonstrate a worst case example. In most cases the behaviour isn't nearly as jarring as we load a bunch of files at a time. https://github.com/user-attachments/assets/72f29663-d6fc-472d-94fa-7fb5950c2836 --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2025-02-2814-14/+0
|
* Improve "generate new access token" form (#33730)Guillaume2025-02-2721-298/+138
| | | | | | | | | | | | | | | | | | | | | Fix: https://github.com/go-gitea/gitea/issues/33519 As discussed in [PR #33614](https://github.com/go-gitea/gitea/pull/33614), the ScopedAccessTokenSelector Vue component is not particularly useful. This PR removes the component and reverts to using HTML templates. It also introduces some (hopefully) useful refactoring. The Vue component was causing the UX bug reported in the linked issue. Required form fields are now properly working, as expected (see screenshot). ![Screenshot from 2025-02-25 22-00-28](https://github.com/user-attachments/assets/41167854-0718-48b0-a3ee-75ca3a7b8b20) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove superflous tw-content-center (#33741)silverwind2025-02-271-1/+1
|
* Clone repository with Tea CLI (#33725)Quentin2025-02-274-13/+65
| | | | | | | | | | | | This PR adds "Tea CLI" as a clone method. <img width="350" alt="Capture d’écran 2025-02-25 à 23 38 47" src="https://github.com/user-attachments/assets/8e86e54a-998b-45d1-9f20-167b449e79b6" /> --------- Signed-off-by: Quentin Guidée <quentin.guidee@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* allow filtering /repos/{owner}/{repo}/pulls by target base branch queryparam ↵Royce Remer2025-02-273-0/+16
| | | | | | (#33684) Co-authored-by: Royce Remer <rremer@salesforce.com> Co-authored-by: delvh <dev.lh@web.de>
* Show info about maintainers are allowed to edit a PR (#33738)wxiaoguang2025-02-271-5/+10
| | | | | | | | | | A simple and clear approach. The existing test TestPullCompare_EnableAllowEditsFromMaintainer should be good enough. Fix #21280 ![image](https://github.com/user-attachments/assets/b685950b-4095-45ad-b913-425f840f2876)