aboutsummaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* Refactor functions to reduce repopath expose (#33892)Lunny Xiao7 days2-5/+5
|
* Move git references checking to gitrepo packages to reduce expose of ↵Lunny Xiao7 days11-23/+25
| | | | repository path (#33891)
* Add lock for a repository pull mirror (#33876)Lunny Xiao7 days1-0/+12
| | | | | Fix #33647 This PR add a global lock for repository pulling mirror.
* Add file tree to file view page (#32721)Kerwin Bryant7 days3-11/+163
| | | | | | | | | | | 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>
* Feature: Ephemeral action runners (#33570)ChristopherHX8 days2-1/+46
| | | | | | | | * This includes a runner mock test for hardend PickTask behavior like described in my proposal * Runner register ephemeral flag introduced in https://gitea.com/gitea/act_runner/pulls/649 Closes #32461
* Add abstraction layer to delete repository from disk (#33879)Lunny Xiao8 days4-6/+12
| | | | Extract from #28966 Follow #33874
* Ignore trivial errors when updating push data (#33864)wxiaoguang8 days2-18/+20
| | | Fix #23213
* Add abstraction layer to check if the repository exists on disk (#33874)Lunny Xiao9 days4-39/+32
| | | | | | | | | | 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
* Pull request updates will also trigger code owners review requests (#33744)Lunny Xiao9 days6-32/+117
| | | | | | | | | | Fix #33490 It will only read the changed file on the pushed commits but not all the files of this PR. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* remove context from retry downloader (#33871)TheFox0x79 days1-1/+1
| | | | follow up to https://github.com/go-gitea/gitea/pull/33399 as I apparently missed this one.
* Refactor cache-control (#33861)wxiaoguang10 days2-2/+2
| | | And fix #21391
* Add workflow_job webhook (#33694)ChristopherHX11 days22-3/+268
| | | | | | | | | 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 auto concurrency cancellation skips commit status updates (#33764)ChristopherHX12 days6-10/+30
| | | | | | | | * add missing commit status * conflicts with concurrency support Closes #33763 Co-authored-by: Giteabot <teabot@gitea.io>
* Fix material icon & diff highlight (#33844)wxiaoguang12 days4-26/+61
|
* Move notifywatch to service layer (#33825)Lunny Xiao13 days3-19/+183
| | | No logic change.
* Only keep popular licenses (#33832)wxiaoguang13 days3-50/+11
| | | Fix #33467
* Full-file syntax highlighting for diff pages (#33766)Dustin Firebaugh14 days5-285/+318
| | | | | | | | | | | | 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)wxiaoguang14 days2-22/+151
| | | | | | 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)TheFox0x714 days8-96/+95
| | | Calls that required context implicitly are made to pass it as argument
* Improve log format (#33814)wxiaoguang2025-03-083-6/+6
|
* Decouple diff stats query from actual diffing (#33810)wxiaoguang2025-03-086-135/+70
| | | | | | | | | 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-072-1/+26
| | | | replications (#33706)
* remove context from mail struct (#33811)TheFox0x72025-03-064-99/+103
| | | it can be passed by argument instead
* Refactor: move part of updating protected branch logic to service layer (#33742)Lunny Xiao2025-03-052-7/+48
|
* Email option to embed images as base64 instead of link (#32061)sommerf-lf2025-03-053-14/+233
| | | | | | | | | | | | | | | | | | | | | | 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-0437-171/+171
| | | | Argument is moved from struct init in command run, which lets us remove context from struct.
* 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 error system (#33771)wxiaoguang2025-03-032-13/+7
| | | It should not expose `util.SilentWrap` or construct it manually.
* Add migrations and doctor fixes (#33556)Lunny Xiao2025-03-021-0/+19
| | | Fix #33535
* Refactor mail code (#33768)wxiaoguang2025-03-037-514/+536
| | | `mail.go` contains various different functions, it's time to split it.
* Use pullrequestlist instead of []*pullrequest (#33765)Lunny Xiao2025-03-021-11/+10
| | | Just renames no code changed.
* Webhook add X-Gitea-Hook-Installation-Target-Type Header (#33752)ChristopherHX2025-03-013-4/+23
| | | | | | | | | | | | 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`
* Add composor source field (#33502)Lunny Xiao2025-02-281-8/+9
| | | Fix #33066
* Improve "generate new access token" form (#33730)Guillaume2025-02-273-41/+8
| | | | | | | | | | | | | | | | | | | | | 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>
* Fix git empty check and HEAD request (#33690)wxiaoguang2025-02-241-0/+5
|
* Deleting repository should unlink all related packages (#33653)Lunny Xiao2025-02-212-6/+7
| | | | | | | | Fix #33634 --------- Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Use test context in tests and new loop system in benchmarks (#33648)TheFox0x72025-02-2026-522/+498
| | | | | | | | Replace all contexts in tests with go1.24 t.Context() --------- Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* git graph: don't show detached commits (#33645)ericLemanissier2025-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current git graph is not usable for mirrors of repos having a lot of PRs, as can be seen at https://demo.gitea.com/ericLemanissier/conan-center-index/graph ![image](https://github.com/user-attachments/assets/ace40dd2-3eea-4d69-8e19-10fb7224e326) Manually running `git log --graph --date-order --all` on such a repo indeed shows: ``` * commit c4a34bd39d7977c8630177c5f88507000ea3e943 |\ Merge: a4bbd3ad6b 35a102c77c | | Author: toge <toge.mail@gmail.com> | | Date: Wed Feb 19 08:36:41 2025 +0000 | | | | Merge 35a102c77cbc38d84baca0ca63466fb410336ea8 into a4bbd3ad6bb5a0f8e5117a897d8c55941f533d98 | | | * commit 35a102c77cbc38d84baca0ca63466fb410336ea8 | | Author: toge <toge.mail@gmail.com> | | Date: Wed Feb 19 17:36:35 2025 +0900 | | | | update 4.4.2 | | | | * commit 5d610f4fd3c0428731e402a2f618fad9ce055875 | |/| Merge: a4bbd3ad6b fe916fb70a |/| | Author: Antony Peacock <ant.peacock@gmail.com> | | | Date: Wed Feb 19 08:31:30 2025 +0000 | | | | | | Merge fe916fb70a8bf49503cce70a5c7124bcc4314ddc into a4bbd3ad6bb5a0f8e5117a897d8c55941f533d98 | | | | | * commit fe916fb70a8bf49503cce70a5c7124bcc4314ddc | | | Author: Antony Peacock <ant.peacock@gmail.com> | | | Date: Wed Feb 19 08:31:18 2025 +0000 | | | | | | Remove parquet cmakelist patch | | | | | | * commit 9f6d2759d650ec3c86d01bb940e829e7e14220c2 | |_|/| Merge: a4bbd3ad6b f0963429b0 |/| | | Author: Thomas Sedlmair <thomas.sedlmair@googlemail.com> | | | | Date: Wed Feb 19 08:03:08 2025 +0100 | | | | | | | | Merge f0963429b0952499da0da7e559f8d53387097307 into a4bbd3ad6bb5a0f8e5117a897d8c55941f533d98 | | | | | | | * commit f0963429b0952499da0da7e559f8d53387097307 | |_|/ Author: Thomas Sedlmair <thomas.sedlmair@googlemail.com> |/| | Date: Wed Feb 19 08:01:43 2025 +0100 | | | | | | added cwt-cucumber 2.5 | | | ``` On the other hand, running `git log --graph --date-order --branches --tags` returns the expected: ``` * commit a4bbd3ad6bb5a0f8e5117a897d8c55941f533d98 (HEAD -> master) | Author: Dan <mstr.danila@gmail.com> | Date: Fri Feb 14 18:46:11 2025 +0200 | | grpc: add version 1.69.0 (#26446) | | * grpc: add version 1.69.0 | | * add cmake tool requires | | --------- | | Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> | * commit a7868807cb2e21206ebf95278cb588f29a3e2205 | Author: Guillaume Egles <gegles@users.noreply.github.com> | Date: Thu Feb 13 05:44:35 2025 -0800 | | openssl: add versions `3.0.16`, `3.1.8`, `3.2.4`, `3.3.3`, `3.4.1`, stop publishing revisions for version `3.0.15` (#26578) | * commit 86057d3e63ac71e2fe48c07bb301f2d54187044d | Author: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> | Date: Thu Feb 13 13:34:41 2025 +0000 | | android-ndk: dont set LD and AS variables (#26581) | | * android-ndk: dont set LD and AS variables | | * android-ndk: refactor test package | * commit 123e382fafd2f5e811e10faac02efc275c45ec2a | Author: Nikita <root.kidik@gmail.com> | Date: Thu Feb 13 12:29:39 2025 +0300 | | libffi: fix conditionals when building on Windows (#26500) | | * fix: add missing or `clang` | | * fix: libffi - always require as tool `automake` ```
* Make actions URL in commit status webhooks absolute (#33620)Lunny Xiao2025-02-181-1/+7
| | | | | | | | | | Gitea Actions generated target url doesn't contain host and port. So we need to include them for external webhook visiting. Fix #33603 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor error system (#33626)wxiaoguang2025-02-173-7/+13
|
* Move issue pin to an standalone table for querying performance (#33452)Lunny Xiao2025-02-174-10/+13
| | | | | | | | | | | | | | | | | | | Noticed a SQL in gitea.com has a bigger load. It seems both `is_pull` and `pin_order` are not indexed columns in the database. ```SQL SELECT `id`, `repo_id`, `index`, `poster_id`, `original_author`, `original_author_id`, `name`, `content`, `content_version`, `milestone_id`, `priority`, `is_closed`, `is_pull`, `num_comments`, `ref`, `pin_order`, `deadline_unix`, `created_unix`, `updated_unix`, `closed_unix`, `is_locked`, `time_estimate` FROM `issue` WHERE (repo_id =?) AND (is_pull = 0) AND (pin_order > 0) ORDER BY pin_order ``` I came across a comment https://github.com/go-gitea/gitea/pull/24406#issuecomment-1527747296 from @delvh , which presents a more reasonable approach. Based on this, this PR will migrate all issue and pull request pin data from the `issue` table to the `issue_pin` table. This change benefits larger Gitea instances by improving scalability and performance. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor error system (#33610)wxiaoguang2025-02-169-81/+75
|
* Fix project issues list and counting (#33594)Lunny Xiao2025-02-173-0/+348
| | | | Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add API to support link package to repository and unlink it (#33481)Lunny Xiao2025-02-161-0/+78
| | | | | | | Fix #21062 --------- Co-authored-by: Zettat123 <zettat123@gmail.com>
* Move commits signature and verify functions to service layers (#33605)Lunny Xiao2025-02-168-11/+512
| | | | No logic change, just move functions.
* Artifacts download api for artifact actions v4 (#33510)ChristopherHX2025-02-161-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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 mirror bug (#33597)ericLemanissier2025-02-152-3/+32
| | | | | | | | | follows-up be4e961240883778c44d9651eaaf9ab8723bbbb0 Fix https://github.com/go-gitea/gitea/issues/33200 --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Use default Git timeout when checking repo health (#33593)Zettat1232025-02-141-1/+1
|
* Performance optimization for pull request files loading comments attachments ↵Lunny Xiao2025-02-141-1/+1
| | | | (#33585)
* Only show the latest version in the Arch index (#33262)Exploding Dragon2025-02-133-12/+166
| | | | | | | | | | Only show the latest version of the package in the arch repo. closes #33534 --------- Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>