aboutsummaryrefslogtreecommitdiffstats
path: root/routers
Commit message (Collapse)AuthorAgeFilesLines
* A small refactor to use context in the service layer (#35179)HEADmainLunny Xiao66 min.1-1/+1
|
* Fix repo file list partial reloading for submodules (#35183)wxiaoguang3 hours2-22/+33
| | | Fix the TODO and add more tests
* Fix various bugs (#35177)wxiaoguang22 hours1-4/+9
| | | | | | * Fix #35144 * Fix #35117 * Fix https://github.com/go-gitea/gitea/issues/35054#issuecomment-3131793977 * Fix #35136
* Add `owner` and `parent` fields clarification to docs (#35023)AlexMaryW8 days4-20/+20
| | | | | | | | | | | | | | | | | | Issue: https://github.com/go-gitea/gitea/issues/9637 Changes introduced: I have clarified the problematic terms (owner and parent) in all affected endpoints. The changes were made to relevant: - HTTP endpoint parameters' descriptions - response/request models' fields This MR is big, but most changes are the same. If you'd like me to break this MR into several smaller ones, let me know :) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix session gob (#35128)wxiaoguang11 days5-22/+40
| | | Fix #35126
* Fix submodule parsing when the gitmodules is missing (#35109)wxiaoguang13 days1-1/+2
| | | | | | Follow up #35096, fix #35095, fix #35115 and add more tests The old code used some fragile behaviors which depend on the "nil" receiver. This PR should be a complete fix for more edge cases.
* Fix error logs and improve some comments/messages (#35105)wxiaoguang14 days11-39/+12
|
* Improve package API log handling (#35100)wxiaoguang2025-07-1623-132/+101
| | | Simplify code and fix log processing logic
* Rename pull request GetGitRefName to GetGitHeadRefName (#35093)Lunny Xiao2025-07-166-25/+25
|
* Redirect to a presigned URL of HEAD for HEAD requests (#35088)Risu2025-07-1631-22/+38
| | | | | | | Resolves https://github.com/go-gitea/gitea/issues/35086. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Send email on Workflow Run Success/Failure (#34982)NorthRealm2025-07-153-7/+35
| | | | | | | | | | | | | | | Closes #23725 ![1](https://github.com/user-attachments/assets/9bfa76ea-8c45-4155-a5d4-dc2f0667faa8) ![2](https://github.com/user-attachments/assets/49be7402-e5d5-486e-a1c2-8d3222540b13) /claim #23725 --------- Signed-off-by: NorthRealm <155140859+NorthRealm@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: ChristopherHX <christopher.homberger@web.de>
* Improve submodule relative path handling (#35056)wxiaoguang2025-07-146-7/+6
| | | | | | | Fix #35054 --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Add Notifications section in User Settings (#35008)NorthRealm2025-07-113-31/+68
| | | | | | | | Related: #34982 --------- Signed-off-by: NorthRealm <155140859+NorthRealm@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix updating user visibility (#35036)Lunny Xiao2025-07-102-2/+2
| | | | | | | Fix #35030 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor OpenIDConnect to support SSH/FullName sync (#34978)wxiaoguang2025-07-108-74/+176
| | | | | * Fix #26585 * Fix #28327 * Fix #34932
* Also display "recently pushed branch" alert on PR view (#35001)Naxdy2025-07-103-51/+77
| | | | | | | | | | | This commit adds the "You recently pushed to branch X" alert also to PR overview, as opposed to only the repository's home page. GitHub also shows this alert on the PR list, as well as the home page. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Fix ListWorkflowRuns OpenAPI response model. (#35026)Scion2025-07-101-1/+1
| | | | | | | | | Change the OpenAPI response of `ListWorkflowRuns` to `WorkflowRunsList` like it is supposed to be. --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Partially refresh notifications list (#35010)Anbraten2025-07-101-59/+27
| | | | | | | | | This PR prevents full reloads for the notifications list when changing a notifications status (read, unread, pinned). --------- Co-authored-by: Anton Bracke <anton.bracke@fastleansmart.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix the response format for `actions/workflows`. (#35009)Scion2025-07-091-1/+1
| | | | | | | | This PR fixes the response format for the OpenAPI Spec of `ActionsListRepositoryWorkflows`. It was specified in the OpenAPI spec as returning a `[]*ActionWorkflow`, but it actually should return a `api.ActionWorkflowResponse`. The test already expects an `api.ActionWorkflowResponse` like expected.
* Refactor mail template and support preview (#34990)wxiaoguang2025-07-092-0/+60
|
* Improve NuGet API Parity (#21291) (#34940)Scion2025-07-071-41/+101
| | | | | | | | | | Fixes #21291, allowing icons and other missing attributes to appear for NuGet packages from inside Visual Studio like they do with GitHub Nuget packages. Adds additional NuGet package information, particularly `IconURL`, to bring the Gitea NuGet API more in-line with GitHub's NuGet API. ref: https://learn.microsoft.com/en-us/nuget/api/search-query-service-resource
* Rerun job only when run is done (#34970)NorthRealm2025-07-061-4/+4
| | | For consistency, limit rerunning Job(s) to only when Run is in Done status.
* Enable gocritic `equalFold` and fix issues (#34952)silverwind2025-07-064-4/+4
| | | | | | | Continuation of https://github.com/go-gitea/gitea/pull/34678. --------- Signed-off-by: silverwind <me@silverwind.io>
* Refactor webhook and fix feishu/lark secret (#34961)wxiaoguang2025-07-061-5/+2
|
* Improve OAuth2 provider (correct Issuer, respect ENABLED) (#34966)wxiaoguang2025-07-062-4/+15
| | | | | | | | 1. Make "Issuer" strictly follow the spec (see comment) 2. Make "/.well-known/openid-configuration" respond 404 if the OAuth2 provider is not enabled. Then by the way, remove the JSEscape template helper because it is not needed any more.
* Refactor some trivial problems (#34959)wxiaoguang2025-07-051-1/+1
| | | | | | | 1. make our "route group pattern match" also update chi's RoutePattern 2. fix incorrect "NotFound" call in conda package 3. make ".flex-item .flex-item-main" has a general gap, then no need to use `tw` tricks 4. improve the "test webhook" UI
* Fix git graph page (#34948)wxiaoguang2025-07-041-2/+5
| | | fix #34946
* Refactor head navbar icons (#34922)wxiaoguang2025-07-042-11/+19
| | | | Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
* Fix http auth header parsing (#34936)wxiaoguang2025-07-031-19/+10
| | | Using `strings.EqualFold` is wrong in many cases.
* Support getting last commit message using contents-ext API (#34904)RickyMa2025-07-031-3/+16
| | | | | | | | Fix #34870 Fix #34929 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix PR toggle WIP (#34920)wxiaoguang2025-07-011-0/+4
| | | | | | | Fix #34919 --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
* Follow file symlinks in the UI to their target (#28835)delvh2025-07-014-32/+62
| | | | | | | | | | 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>
* Fix: RPM package download routing & missing package version count (#34909)Exploding Dragon2025-06-302-5/+7
| | | | | | | | | * Fix RPM package download routing * Fix missing package version count --------- Signed-off-by: Exploding Dragon <explodingfkl@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add support for 3D/CAD file formats preview (#34794)Kerwin Bryant2025-06-306-215/+209
| | | | | | | Fix #34775 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add a `login`/`login-name`/`username` disambiguation to affected endpoint ↵AlexMaryW2025-06-2920-51/+51
| | | | | | | | | | | | 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
* Refactor container package (#34877)wxiaoguang2025-06-294-138/+76
| | | Use standard db.WithTx and introduce db.WithTx2
* enforce explanation for necessary nolints and fix bugs (#34883)TheFox0x72025-06-277-9/+9
| | | | | | | Follows up https://github.com/go-gitea/gitea/pull/34851 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* enforce nolint scope (#34851)TheFox0x72025-06-272-5/+5
| | | | | | | | | | | | | | | 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 Xiao2025-06-262-33/+20
| | | | | | | | Extract `UpdateRepository` Follow up #34762 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor "change file" API (#34855)wxiaoguang2025-06-254-294/+140
| | | | | | | | | 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>
* Fix archive API (#34853)wxiaoguang2025-06-251-3/+3
| | | Fix #34852
* Refactor repo contents API and add "contents-ext" API (#34822)wxiaoguang2025-06-255-12/+88
| | | See the updated swagger document for details.
* fix(issue): Replace stopwatch toggle with explicit start/stop actions (#34818)Junsik Kong2025-06-254-52/+56
| | | | | | | | | | | | | | | | This PR fixes a state de-synchronization bug with the issue stopwatch, it resolves the issue by replacing the ambiguous `/toggle` endpoint with two explicit endpoints: `/start` and `/stop`. - The "Start timer" button now exclusively calls the `/start` endpoint. - The "Stop timer" button now exclusively calls the `/stop` endpoint. This ensures the user's intent is clearly communicated to the server, eliminating the state inconsistency and fixing the bug. --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix team permissions (#34827)wxiaoguang2025-06-243-4/+17
| | | | * Fix #34793 * Fix #33456
* Add "Cancel workflow run" button to Actions list page (#34817)NorthRealm2025-06-221-1/+1
|
* Edit file workflow for creating a fork and proposing changes (#34240)Brecht Van Lommel2025-06-229-84/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When viewing a file that the user can't edit because they can't write to the branch, the new, upload, patch, edit and delete functionality is no longer disabled. If no user fork of the repository exists, there is now a page to create one. It will automatically create a fork with a single branch matching the one being viewed, and a unique repository name will be automatically picked. When a fork exists, but it's archived, a mirror or the user can't write code to it, there will instead be a message explaining the situation. If the usable fork exists, a message will appear at the top of the edit page explaining that the changes will be applied to a branch in the fork. The base repository branch will be pushed to a new branch to the fork, and then the edits will be applied on top. The suggestion to fork happens when accessing /_edit/, so that for example online documentation can have an "edit this page" link to the base repository that does the right thing. Also includes changes to properly report errors when trying to commit to a new branch that is protected, and when trying to commit to an existing branch when choosing the new branch option. Resolves #9017, #20882 --------- Co-authored-by: Brecht Van Lommel <brecht@blender.org> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor packages (#34777)wxiaoguang2025-06-225-202/+74
|
* Refactor wiki (#34805)wxiaoguang2025-06-222-144/+44
| | | Remove unclear code
* Forks repository list page follow other repositories page (#34784)Lunny Xiao2025-06-213-2/+5
| | | | | | | | | | | | Replace #24130 Before: ![image](https://github.com/user-attachments/assets/98c39bce-bdbf-4fc1-b476-527c5139e01f) After: ![image](https://github.com/user-attachments/assets/65fef5b8-63b9-4283-b8ea-2ac2f27cb001)
* Add post-installation redirect based on admin account status (#34493)Kerwin Bryant2025-06-212-2/+12
| | | | | | | | | | | | | | | | This PR adds a feature to direct users to appropriate pages after system installation: - If no admin credentials were provided during installation, redirect to the registration page with a prominent notice about creating the first administrative account - If admin credentials were already set, redirect directly to the login page ![4d396ad132d9b57fc4f45a62117177f1](https://github.com/user-attachments/assets/3a5d8700-9194-4d3b-a862-e64c8c347932) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>