aboutsummaryrefslogtreecommitdiffstats
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
* Follow file symlinks in the UI to their target (#28835)delvh2 days14-160/+146
| | | | | | | | | | Symlinks are followed when you click on a link next to an entry, either until a file has been found or until we know that the link is dead. When the link cannot be accessed, we fall back to the current behavior of showing the document containing the target. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add support for 3D/CAD file formats preview (#34794)Kerwin Bryant3 days6-81/+103
| | | | | | | Fix #34775 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add a `login`/`login-name`/`username` disambiguation to affected endpoint ↵AlexMaryW3 days6-6/+16
| | | | | | | | | | | | parameters and response/request models (#34901) Issue: [link](https://github.com/go-gitea/gitea/issues/9637) Changes introduced: I have clarified the problematic terms (`login`, `login_name`, and `username`) in all affected endpoints. The changes were made to relevant: - HTTP endpoint parameters' descriptions - response/request models' fields
* Improve `labels-list` rendering (#34846)silverwind5 days4-11/+52
| | | | | | | Make labels list use consistent gap --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* enforce explanation for necessary nolints and fix bugs (#34883)TheFox0x75 days19-36/+34
| | | | | | | Follows up https://github.com/go-gitea/gitea/pull/34851 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* enforce nolint scope (#34851)TheFox0x76 days4-7/+7
| | | | | | | | | | | | | | | enable nolintlint scope requirement add comments to new directives so it's more obvious why they are in place --- I can also toggle the mandatory comments on if that's something of interest. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Use standalone function to update repository cols (#34811)Lunny Xiao6 days1-4/+5
| | | | | | | | Extract `UpdateRepository` Follow up #34762 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add issue delete notifier (#34592)badhezi7 days1-0/+2
| | | | | | Fixes https://github.com/go-gitea/gitea/issues/34591 A reference regarding the deletion of issue webhooks on GitHub: https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=deleted#issues
* Refactor "change file" API (#34855)wxiaoguang7 days1-36/+26
| | | | | | | | | Follow up the "editor" refactor, use the same approach to simplify code, and fix some docs & comments --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: delvh <dev.lh@web.de>
* Refactor repo contents API and add "contents-ext" API (#34822)wxiaoguang8 days6-28/+43
| | | See the updated swagger document for details.
* Fix SSH LFS timeout (#34838)wxiaoguang8 days1-0/+1
| | | Fix #34834
* Refactor template helper (#34819)wxiaoguang9 days4-27/+7
| | | | | | | | FIx abuses and remove unused code --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Refactor packages (#34777)wxiaoguang11 days2-44/+74
|
* Refactor wiki (#34805)wxiaoguang11 days3-6/+7
| | | Remove unclear code
* Refactor editor (#34780)wxiaoguang12 days1-0/+2
| | | A complete rewrite
* Improve img lazy loading (#34804)wxiaoguang12 days3-9/+22
| | | Related #32051 and #13526
* Fix OCI manifest parser (#34797)wxiaoguang12 days2-10/+26
| | | Do not parse the media type we don't know.
* Add workflow_run api + webhook (#33964)ChristopherHX12 days4-3/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements - https://docs.github.com/en/rest/actions/workflow-jobs?apiVersion=2022-11-28#list-jobs-for-a-workflow-run--code-samples - https://docs.github.com/en/rest/actions/workflow-jobs?apiVersion=2022-11-28#get-a-job-for-a-workflow-run--code-samples - https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository - https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#get-a-workflow-run - `/actions/runs` for global + user + org (Gitea only) - `/actions/jobs` for global + user + org + repository (Gitea only) - workflow_run webhook + action trigger - limitations - workflow id is assigned to a string, this may result into problems in strongly typed clients Fixes - workflow_job webhook url to no longer contain the `runs/<run>` part to align with api - workflow instance does now use it's name inside the file instead of filename if set Refactoring - Moved a lot of logic from workflows/workflow_job into a shared module used by both webhook and api TODO - [x] Verify Keda Compatibility - [x] Edit Webhook API bug is resolved Closes https://github.com/go-gitea/gitea/issues/23670 Closes https://github.com/go-gitea/gitea/issues/23796 Closes https://github.com/go-gitea/gitea/issues/24898 Replaces https://github.com/go-gitea/gitea/pull/28047 and is much more complete --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add ff_only parameter to POST /repos/{owner}/{repo}/merge-upstream (#34770)Dan Čermák13 days1-0/+1
| | | | | | | | | The merge-upstream route was so far performing any kind of merge, even those that would create merge commits and thus make your branch diverge from upstream, requiring manual intervention via the git cli to undo the damage. With the new optional parameter ff_only, we can instruct gitea to error out, if a non-fast-forward merge would be performed.
* Upgrade `gopls` to v0.19.0, add `make fix` (#34772)silverwind2025-06-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upgrade to [v0.19.0](https://github.com/golang/tools/releases/tag/gopls%2Fv0.19.0) and fix issues. Runs with new `warning` serverity setting. This likely does less checks than before. Additionally, add `make fix` which runs modernize. This is also verified on CI. For the record, here are the issues discoverd when running with `info` severity, in case we want to fix these: ``` tests/integration/repo_test.go:95:5-14: could use tagged switch on i tests/integration/api_packages_generic_test.go:149:4-64: could use tagged switch on setting.Packages.Storage.Type services/webhook/msteams_test.go:33:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:59:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:85:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:111:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:138:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:161:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:187:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:213:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:239:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:266:4-33: could use tagged switch on fact.Name services/webhook/msteams_test.go:407:4-33: could use tagged switch on fact.Name tests/integration/api_packages_conan_test.go:350:6-33: could use tagged switch on pf.Name models/issues/tracked_time_test.go:98:3-18: could use tagged switch on user.ID tests/integration/api_token_test.go:505:5-43: could use tagged switch on minRequiredLevel services/gitdiff/gitdiff.go:220:33-46: method "getLineLegacy" is unused ``` --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix remaining issues after `gopls modernize` formatting (#34771)silverwind2025-06-182-15/+3
| | | | | | | | Followup https://github.com/go-gitea/gitea/pull/34751, fix all remaining marked issues. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix some package registry problems (#34759)wxiaoguang2025-06-191-2/+1
| | | | 1. Fix #33787 2. Fix container image display
* Support annotated tags when using create release API (#31840)Kemal Zebari2025-06-181-0/+1
| | | | | | | | | | This adds a new field, "tag_message", that represents the message of the annotated tag. Resolves #31835. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Run `gopls modernize` on codebase (#34751)silverwind2025-06-1877-180/+135
| | | | Recent modernize fixes: https://github.com/golang/tools/commits/master/gopls/internal/analysis/modernize
* Refactor some file edit related code (#34744)wxiaoguang2025-06-181-0/+6
| | | | | | | Follow up #34350 --------- Co-authored-by: delvh <dev.lh@web.de>
* Improve nuget/rubygems package registries (#34741)wxiaoguang2025-06-175-68/+143
| | | | | | | | 1. Add some missing (optional) fields for nuget v2, and sort the fields to make it easier to maintain 2. Add missing "platform" for rubygems: `VERSION-PLATFORM` and `VERSION_PLATFORM` Co-authored-by: Giteabot <teabot@gitea.io>
* remove unnecessary duplicate code (#34733)Lunny Xiao2025-06-171-30/+5
|
* Refactor embedded assets and drop unnecessary dependencies (#34692)wxiaoguang2025-06-1217-143/+555
| | | | | | | | | Benefits: 1. smaller binary size (reduces more than 1MB) 2. better control of the assets details 3. fewer unmaintained dependencies 4. faster startup if the assets are not needed 5. won't hang up editors when open "bindata.go" by accident
* Improve instance wide ssh commit signing (#34341)ChristopherHX2025-06-116-4/+54
| | | | | | | | | | | | | | | | | * Signed SSH commits can look in the UI like on GitHub, just like gpg keys today in Gitea * SSH format can be added in gitea config * SSH Signing worked before with DEFAULT_TRUST_MODEL=committer `TRUSTED_SSH_KEYS` can be a list of additional ssh public key contents to trust for every user of this instance Closes #34329 Related #31392 --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix commit message rendering and some UI problems (#34680)wxiaoguang2025-06-103-6/+10
| | | | | | * Fix #34679 * Fix #34676 * Fix #34674 * Fix #34526
* Update x/crypto package and make builtin SSH use default parameters (#34667)wxiaoguang2025-06-093-18/+17
|
* Fix "oras" OCI client compatibility (#34666)wxiaoguang2025-06-092-1/+10
| | | | | | Fix #25846 1. the ImageConfig can be empty, fall back to default 2. the blob size can be empty, it still needs "Content-Length" header
* Fix: skip paths check on tag push events in workflows (#34602)endo0911engineer2025-06-092-0/+26
| | | | | | | | | | | | ## Summary Fix skipping of `paths` condition in workflows triggered by tag push events. ## Details - Ensure workflows triggered by tag pushes bypass the `paths` filter check. - Prevent incorrect skipping of workflows due to `paths` conditions on tag pushes. - Added and updated unit tests to verify correct behavior.
* Fix footnote jump behavior on the issue page. (#34621)charles2025-06-095-3/+43
| | | | | | | | | | Close #34511 Close #34590 Add comment ID to the footnote item's id attribute to ensure uniqueness. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Keeping consistent between UI and API about combined commit status state and ↵Lunny Xiao2025-06-094-66/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix some bugs (#34562) Extract from #34531 ## Move Commit status state to a standalone package Move the state from `structs` to `commitstatus` package. It also introduce `CommitStatusStates` so that the combine function could be used from UI and API logic. ## Combined commit status Changed This PR will follow Github's combined commit status. Before this PR, every commit status could be a combined one. According to https://docs.github.com/en/rest/commits/statuses?apiVersion=2022-11-28#get-the-combined-status-for-a-specific-reference > Additionally, a combined state is returned. The state is one of: > failure if any of the contexts report as error or failure > pending if there are no statuses or a context is pending > success if the latest status for all contexts is success This PR will follow that rule and remove the `NoBetterThan` logic. This also fixes the inconsistent between UI and API. In the API convert package, it has implemented this which is different from the UI. It also fixed the missing `URL` and `CommitURL` in the API. ## `CalcCommitStatus` return nil if there is no commit statuses The behavior of `CalcCommitStatus` is changed. If the parameter commit statuses is empty, it will return nil. The reference places should check the returned value themselves.
* Validate hex colors when creating/editing labels (#34623)Kemal Zebari2025-06-072-5/+19
| | | | | | | | Resolves #34618. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* add codecommit to supported services in api docs (#34626)TheFox0x72025-06-071-1/+1
|
* Refactor some tests (#34580)wxiaoguang2025-06-034-33/+20
| | | | 1. use `test.MockVariableValue` as much as possible 2. avoid `time.Sleep` as much as possible
* Do not mutate incoming options to SearchRepositoryByName (#34553)Philip Peterson2025-06-021-1/+1
| | | | | | | | | | | | | | Similar to #34544, this PR changes the `opts` argument in `SearchRepositoryByName()` to be passed by value instead of by pointer, as its mutations do not escape the function scope and are not used elsewhere. This simplifies reasoning about the function and avoids unnecessary pointer usage. This insight emerged during an initial attempt to refactor `RenderUserSearch()`, which currently intermixes multiple concerns. --------- Co-authored-by: Philip Peterson <philip-peterson@users.noreply.github.com>
* Fix some trivial problems (#34579)wxiaoguang2025-06-022-4/+15
|
* Fix actions skipped commit status indicator (#34507)badhezi2025-05-282-169/+19
| | | | | Addresses https://github.com/go-gitea/gitea/issues/34500 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add "View workflow file" to Actions list page (#34538)NorthRealm2025-05-281-9/+11
| | | | | | | | | | This PR adds "View workflow file" to Actions list page, and replaces the redundant link. Related #34530 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor commit reader (#34542)wxiaoguang2025-05-274-84/+68
|
* Don't display error log when .git-blame-ignore-revs doesn't exist (#34457)Lunny Xiao2025-05-261-18/+22
| | | Fix #34454
* Performance optimization for tags synchronization (#34355)Lunny Xiao2025-05-221-124/+9
| | | | | | | | | The tags synchronization is very slow for a non-mirror repository with many tags especially forking. This PR make all repositories' tags synchronization use the same function and remove the low performance synchronization function. The commit count of tag now will not be stored into database when syncing. Since the commits count will always be read from cache or git data, the `NumCommits` in the release table will be updated for the first read from git data.
* Fix possible panic (#34508)Lunny Xiao2025-05-222-0/+39
|
* feat(api): add date range filtering to commit retrieval endpoints (#34497)Bo-Yi Wu2025-05-194-7/+25
| | | | | | | | | | | | | | | - Add support for filtering commits by date range via new "since" and "until" parameters - Update API endpoints and command logic to handle the new parameters for fetching commits within given dates - Extend API documentation and Swagger specs to describe the new "since" and "until" query parameters - Refactor related function signatures and implementations to accept and pass "since" and "until" values --------- Signed-off-by: appleboy <appleboy.tw@gmail.com> Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Export repo's manual merge settings (#34502)Adam Majer2025-05-191-0/+2
|
* Remove legacy template helper functions (#34426)wxiaoguang2025-05-114-108/+2
| | | | These functions have been marked as `panicIfDevOrTesting` since 1.23 (#32422)
* Fix a bug when uploading file via lfs ssh command (#34408)Lunny Xiao2025-05-092-6/+40
| | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>