aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Improve language in en-US locale strings (#35124)Dominik Rubo15 hours1-1/+1
| | | | | | | | | | | | | | | | | | | | | | | #35015 For easier review, the changes are split into separate commits by broad category. The extended commit messages include brief summaries. I am happy to make a separate pull request for each category if preferred. While many of the changes are corrections, some are influenced by style. In those cases I have aimed mainly for consistency throughout the file, picking a style variant that I think is widely accepted and aids clarity. There are additional things that could be improved that I have not touched. For example, contractions (phrasing variants such as "doesn't" vs. "does not") could be made more consistent. Not sure how colloquial or formal the maintainers would like the UI to be. --------- Signed-off-by: Dominik Rubo <dr-1@posteo.net> Co-authored-by: Dominik Rubo <dominik.rubo@posteo.net> Co-authored-by: delvh <dev.lh@web.de>
* Fix session gob (#35128)wxiaoguang4 days1-1/+1
| | | Fix #35126
* Rename pull request GetGitRefName to GetGitHeadRefName (#35093)Lunny Xiao7 days2-4/+4
|
* Redirect to a presigned URL of HEAD for HEAD requests (#35088)Risu7 days1-24/+12
| | | | | | | Resolves https://github.com/go-gitea/gitea/issues/35086. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor view issue & comment list styles (#35061)wxiaoguang10 days2-4/+4
| | | Fix #35060
* Fix git commit committer parsing and add some tests (#35007)Lunny Xiao13 days1-26/+46
| | | | | | | | * Fix #34991 * Fix #34882 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor OpenIDConnect to support SSH/FullName sync (#34978)wxiaoguang13 days2-1/+114
| | | | | * Fix #26585 * Fix #28327 * Fix #34932
* Start automerge check again after the conflict check and the schedule (#34989)wxiaoguang2025-07-082-18/+54
| | | | | Fix #34988 Co-authored-by: posativ
* Improve NuGet API Parity (#21291) (#34940)Scion2025-07-071-17/+71
| | | | | | | | | | 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
* Improve OAuth2 provider (correct Issuer, respect ENABLED) (#34966)wxiaoguang2025-07-061-9/+37
| | | | | | | | 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.
* Mark old reviews as stale on agit pr updates (#34933)Dan Čermák2025-07-051-0/+102
| | | Fixes: https://github.com/go-gitea/gitea/issues/34134
* Refactor head navbar icons (#34922)wxiaoguang2025-07-042-38/+34
| | | | Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
* Support getting last commit message using contents-ext API (#34904)RickyMa2025-07-035-39/+68
| | | | | | | | Fix #34870 Fix #34929 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Follow file symlinks in the UI to their target (#28835)delvh2025-07-011-0/+17
| | | | | | | | | | 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-1/+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-301-4/+5
| | | | | | | Fix #34775 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* enforce explanation for necessary nolints and fix bugs (#34883)TheFox0x72025-06-273-4/+3
| | | | | | | Follows up https://github.com/go-gitea/gitea/pull/34851 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add issue delete notifier (#34592)badhezi2025-06-252-0/+79
| | | | | | 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)wxiaoguang2025-06-252-14/+16
| | | | | | | | | 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/+14
| | | Fix #34852
* Refactor repo contents API and add "contents-ext" API (#34822)wxiaoguang2025-06-252-14/+93
| | | See the updated swagger document for details.
* fix(issue): Replace stopwatch toggle with explicit start/stop actions (#34818)Junsik Kong2025-06-251-5/+5
| | | | | | | | | | | | | | | | 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-241-0/+33
| | | | * Fix #34793 * Fix #33456
* Edit file workflow for creating a fork and proposing changes (#34240)Brecht Van Lommel2025-06-223-259/+372
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Forks repository list page follow other repositories page (#34784)Lunny Xiao2025-06-211-1/+1
| | | | | | | | | | | | 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)
* Refactor editor (#34780)wxiaoguang2025-06-215-21/+30
| | | A complete rewrite
* Fix container range bug (#34795)wxiaoguang2025-06-211-2/+14
| | | Fix #34792 and add new tests
* Add workflow_run api + webhook (#33964)ChristopherHX2025-06-203-11/+375
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+32
| | | | | | | | | 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 remaining issues after `gopls modernize` formatting (#34771)silverwind2025-06-182-12/+4
| | | | | | | | 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
* when using rules to delete packages, remove unclean bugs (#34632)anthony-zh2025-06-181-7/+11
| | | | | | | | | | | | | 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>
* Remove unused param `doer` (#34545)Philip Peterson2025-06-185-9/+5
|
* Run `gopls modernize` on codebase (#34751)silverwind2025-06-1814-43/+36
| | | | Recent modernize fixes: https://github.com/golang/tools/commits/master/gopls/internal/analysis/modernize
* Refactor some file edit related code (#34744)wxiaoguang2025-06-181-67/+58
| | | | | | | Follow up #34350 --------- Co-authored-by: delvh <dev.lh@web.de>
* Improve nuget/rubygems package registries (#34741)wxiaoguang2025-06-173-33/+81
| | | | | | | | 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>
* Allow renaming/moving binary/LFS files in the UI (#34350)bytedream2025-06-161-0/+176
| | | | | | | | | | | | | | | | | | | Adds the ability to rename/move binary files like binary blobs or images and files that are too large in the web ui. This was purposed in #24722, along with the ability edit images via an upload of a new image, which I didn't implement here (could be done in a separate PR). Binary file content: ![binary](https://github.com/user-attachments/assets/61d9ff71-25d3-4832-9288-452cdefc7283) File too large: ![toolarge](https://github.com/user-attachments/assets/3b42dbd0-e76a-4c3c-92d2-52ebffedea64) GitHub does the same (I've copied the text from there): ![gh](https://github.com/user-attachments/assets/e1499813-fb71-4544-9d58-086046a5f13e)
* Refactor container and UI (#34736)wxiaoguang2025-06-161-4/+6
|
* Prevent duplicate form submissions when creating forks (#34714)Kerwin Bryant2025-06-161-1/+3
| | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix container range bug (#34725)wxiaoguang2025-06-151-2/+3
| | | Fix #34724
* Improve instance wide ssh commit signing (#34341)ChristopherHX2025-06-111-0/+35
| | | | | | | | | | | | | | | | | * 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>
* Migrate to urfave v3 (#34510)TheFox0x72025-06-101-7/+10
| | | | | | | | | migrate cli to urfave v3 add more cli tests --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix "oras" OCI client compatibility (#34666)wxiaoguang2025-06-091-0/+17
| | | | | | 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
* Keeping consistent between UI and API about combined commit status state and ↵Lunny Xiao2025-06-096-29/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Refactor FindOrgOptions to use enum instead of bool, fix membership ↵wxiaoguang2025-06-092-4/+5
| | | | visibility (#34629)
* Refactor some tests (#34580)wxiaoguang2025-06-0310-41/+17
| | | | 1. use `test.MockVariableValue` as much as possible 2. avoid `time.Sleep` as much as possible
* Add webhook assigning test and fix possible bug (#34420)Lunny Xiao2025-05-272-185/+233
| | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Split GetLatestCommitStatus as two functions (#34535)Lunny Xiao2025-05-261-2/+2
| | | | | | | | Extract from #34531. This will reduce unnecessary count operation in databases. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* fix: return 201 Created for CreateVariable API responses (#34517)Bo-Yi Wu2025-05-262-8/+8
| | | | | | | | | | | | | | | | | | | - Change CreateVariable API response status from 204 No Content to 201 Created - Update related integration tests to expect 201 Created instead of 204 No Content ## :warning: BREAKING :warning: Change the response status code of the Create Variable API under both Org and Repo levels to `201` instead of 204. API SDK: https://gitea.com/gitea/go-sdk/pulls/713 --------- Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> Signed-off-by: appleboy <appleboy.tw@gmail.com> Co-authored-by: delvh <dev.lh@web.de>
* Fix ephemeral runner deletion (#34447)ChristopherHX2025-05-202-12/+93
| | | | | | | | | * repository deletion, delete ephemeral runners with active tasks as well skips regular cleanup * user deletion, delete ephemeral runners with active tasks as well skips regular cleanup * delete ephemeral runners once status changes to done * You no longer see used ephemeral runners after the task is done * if you see one the cron job takes care of it