aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web
Commit message (Collapse)AuthorAgeFilesLines
* Display pull request in merged commit view (#35202)Nicolas Auvray9 days1-0/+6
| | | | | | | | | | | | | | | | | | Fixes #34634 --- I am not a Web dev so I'm open to any change on the design. The important thing for me is to have the feature implemented. Here are screenshots on a test instance: <img width="2758" height="420" alt="Capture d'écran 2025-08-02 161710" src="https://github.com/user-attachments/assets/30abbeb5-6139-4a91-9348-36e78f1646e6" /> <img width="2769" height="520" alt="Capture d'écran 2025-08-02 161725" src="https://github.com/user-attachments/assets/29871f05-f0b5-4a31-9ada-812780269c7d" />
* Fix bug when review pull request commits (#35192)Lunny Xiao10 days2-85/+63
| | | | | | | | | | | | | | The commit range in the UI follows a half-open, half-closed convention: (,]. When reviewing a range of commits, the beforeCommitID should be set to the commit immediately preceding the first selected commit. For single-commit reviews, we must identify and use the previous commit of that specific commit. The endpoint ViewPullFilesStartingFromCommit is currently unused and can be safely removed. Fix #35157 Replace #35184 Partially extract from #35077
* A small refactor to use context in the service layer (#35179)Lunny Xiao14 days1-1/+1
|
* Fix repo file list partial reloading for submodules (#35183)wxiaoguang14 days2-22/+33
| | | Fix the TODO and add more tests
* Fix various bugs (#35177)wxiaoguang2025-07-301-4/+9
| | | | | | * Fix #35144 * Fix #35117 * Fix https://github.com/go-gitea/gitea/issues/35054#issuecomment-3131793977 * Fix #35136
* Fix session gob (#35128)wxiaoguang2025-07-205-22/+40
| | | Fix #35126
* Fix submodule parsing when the gitmodules is missing (#35109)wxiaoguang2025-07-181-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.
* Rename pull request GetGitRefName to GetGitHeadRefName (#35093)Lunny Xiao2025-07-164-18/+18
|
* Redirect to a presigned URL of HEAD for HEAD requests (#35088)Risu2025-07-165-5/+5
| | | | | | | 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>
* 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>
* 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>
* Refactor mail template and support preview (#34990)wxiaoguang2025-07-092-0/+60
|
* 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-061-1/+1
| | | | | | | 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.
* Fix git graph page (#34948)wxiaoguang2025-07-041-2/+5
| | | fix #34946
* Refactor head navbar icons (#34922)wxiaoguang2025-07-041-1/+1
| | | | 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.
* 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-301-5/+5
| | | | | | | | | * 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>
* enforce explanation for necessary nolints and fix bugs (#34883)TheFox0x72025-06-273-4/+4
| | | | | | | Follows up https://github.com/go-gitea/gitea/pull/34851 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Use standalone function to update repository cols (#34811)Lunny Xiao2025-06-261-17/+10
| | | | | | | | Extract `UpdateRepository` Follow up #34762 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor "change file" API (#34855)wxiaoguang2025-06-251-0/+6
| | | | | | | | | 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(issue): Replace stopwatch toggle with explicit start/stop actions (#34818)Junsik Kong2025-06-253-21/+31
| | | | | | | | | | | | | | | | 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 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-211-2/+10
| | | | | | | | | | | | | | | | 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>
* Rework delete org and rename org UI (#34762)Lunny Xiao2025-06-212-53/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # What's the problem of the original implementation Renaming organization will mix with organization's information change make the operation difficult to keep consistent. This PR created a danger zone like what's repository setting. It also moved organization's `rename` and `delete` operations to this zone. The original updating repository will not change the name any more. This is also a step to extract the `updaterepository` function completely. Before: ![image](https://github.com/user-attachments/assets/d097dfdf-07be-4d79-8fcf-e78822515575) ![image](https://github.com/user-attachments/assets/42ee832c-cb44-41ec-9fe3-92a1c94747d2) After: ![image](https://github.com/user-attachments/assets/f7700ed7-f104-4302-a924-09e118f24be3) ![image](https://github.com/user-attachments/assets/4c49952a-578e-4d14-bd01-4a68c9e02412) ![image](https://github.com/user-attachments/assets/814829d3-00fe-4e87-ae05-625c129170d2) ![image](https://github.com/user-attachments/assets/b067b263-c909-4b48-b23c-73481c32d350) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor editor (#34780)wxiaoguang2025-06-2111-1139/+655
| | | A complete rewrite
* Add workflow_run api + webhook (#33964)ChristopherHX2025-06-202-17/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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ák2025-06-191-1/+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.
* Fix tag target (#34781)wxiaoguang2025-06-191-3/+3
| | | Fix #34779
* Refactor packages (func name & UI) (#34773)wxiaoguang2025-06-181-2/+2
| | | | | | 1. Use `OpenXxx` instead of `GetXxx` because the returned readers should be correctly closed, and clarify the behaviors of the functions: they increase the download counter 2. Use `packages-content` styles instead of `issue-content`
* Fix remaining issues after `gopls modernize` formatting (#34771)silverwind2025-06-182-10/+2
| | | | | | | | 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-192-10/+42
| | | | 1. Fix #33787 2. Fix container image display
* when using rules to delete packages, remove unclean bugs (#34632)anthony-zh2025-06-181-3/+7
| | | | | | | | | | | | | By default, the code extracts 200 package versions. If too many packages are generated every day or if rule cleaning is enabled later, which means there are more than 200 versions corresponding to the library package, it may not be cleaned up completely, resulting in residue Fix #31961 --------- Co-authored-by: yeyuanjie <yecao100@126.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix readme path and markdown link paste (#34755)wxiaoguang2025-06-181-2/+2
|
* Run `gopls modernize` on codebase (#34751)silverwind2025-06-1828-121/+41
| | | | Recent modernize fixes: https://github.com/golang/tools/commits/master/gopls/internal/analysis/modernize
* Refactor some file edit related code (#34744)wxiaoguang2025-06-181-4/+11
| | | | | | | Follow up #34350 --------- Co-authored-by: delvh <dev.lh@web.de>
* Fix ghost user in feeds when pushing in an actions, it should be ↵Lunny Xiao2025-06-171-1/+1
| | | | gitea-actions (#34703)