aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Switch back to `vue-tsc` (#33248)silverwind2025-01-132-30/+29
| | | | It supports Typescript 5.7 now, so we can switch back to the official version.
* Let API create and edit system webhooks, attempt 2 (#33180)Michael B.2025-01-135-1/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR fixes inconsistencies between system and default webhooks in the Gitea API. (See also #26418) - A system webhook is a webhook that captures events for all repositories. - A default webhook is copied to a new repository when it is created. Before this PR `POST /api/v1/admin/hooks/` creates default webhooks (if not configured otherwise) and `GET /api/v1/admin/hooks/` returns system webhooks. The PR introduces an optional query parameter to `GET /api/v1/admin/hooks/` to enable selecting if either default, system or both kind of webhooks should be retrieved. By default the flag is set to return system webhooks keep current behaviour. ## Examples ### System Webhooks #### Create ``` POST /api/v1/admin/hooks/ { "type": "gitea", "active": false, "branch_filter": "*", "events": [ "create", "..." ], "config": { "url": "http://...", "content_type": "json", "secret": "secret", "is_system_webhook": true // <-- controls hook type } } ``` #### List ``` GET/api/v1/admin/hooks?type=system //type argument is optional here since it's the default ``` #### Others The other relevant endpoints work as expected by referencing the hook by id ``` GET /api/v1/admin/hooks/:id PATCH /api/v1/admin/hooks/:id DELETE /api/v1/admin/hooks/:id ``` ### Default Webhooks #### Create ``` POST /api/v1/admin/hooks/ { "type": "gitea", "active": false, "branch_filter": "*", "events": [ "create", "..." ], "config": { "url": "http://...", "content_type": "json", "secret": "secret", "is_system_webhook": false // optional, as false is the default value } } ``` #### List ``` GET/api/v1/admin/hooks?type=default ``` #### Others The other relevant endpoints work as expected by referencing the hook by id ``` GET /api/v1/admin/hooks/:id PATCH /api/v1/admin/hooks/:id DELETE /api/v1/admin/hooks/:id ```
* Fix incorrect ref "blob" (#33240)wxiaoguang2025-01-133-14/+10
| | | | | 1. "blob" is not a "ref", it shouldn't (and not unable to) be handled by `RepoRefByType` 2. the `/blob/{sha}` handle should use the path param "sha" directly
* Refactor RefName (#33234)wxiaoguang2025-01-1313-60/+58
| | | And fix some FIXMEs
* Refactor context RefName and RepoAssignment (#33226)wxiaoguang2025-01-1320-219/+187
| | | | | | | The `ctx.Repo.RefName` was used to be a "short name", it causes a lot of ambiguity. This PR does some refactoring and use `RefFullName` to replace the legacy `RefName`, and simplify RepoAssignment
* [skip ci] Updated translations via CrowdinGiteaBot2025-01-132-13/+22
|
* Fix upload file form (#33230)wxiaoguang2025-01-131-3/+5
| | | Fix #33228
* Fix mirror bug (#33224)Lunny Xiao2025-01-122-1/+16
| | | | | Fix #33200 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove unused CSS styles and move some styles to proper files (#33217)wxiaoguang2025-01-124-210/+110
|
* Refactor context repository (#33202)wxiaoguang2025-01-1229-164/+125
|
* [skip ci] Updated translations via CrowdinGiteaBot2025-01-1216-14/+29
|
* Fix unpin hint on the pinned pull requests (#33207)Lunny Xiao2025-01-123-4/+4
|
* fix(cache): cache test triggered by non memory cache (#33220)TheFox0x72025-01-122-3/+9
| | | | | | | Change SlowCacheThreshold to 30 milliseconds so it doesn't trigger on non memory cache Closes: https://github.com/go-gitea/gitea/issues/33190 Closes: https://github.com/go-gitea/gitea/issues/32657
* Update README.md (#33149)yp053272025-01-104-29/+90
| | | | | | | | ~~Waiting for the upload of screenshots~~ I have a good idea about the screenshots. I will do it later. --------- Co-authored-by: Gary Wang <git@blumia.net>
* Fix editor markdown not incrementing in a numbered list (#33187)Harry Vince2025-01-102-33/+273
| | | | | | | | | | | | | | | Amended the logic for newPrefix in the MarkdownEditor to resolve incorrect number ordering. Fixes #33184 Attached screenshot of fixed input similar to issue <img width="175" alt="Screenshot 2025-01-09 at 23 59 24" src="https://github.com/user-attachments/assets/dfa23cf1-f3db-4b5e-99d2-a71bbcb289a8" /> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Some small refactors (#33144)Lunny Xiao2025-01-105-48/+92
|
* Fix sync fork for consistency (#33147)Chai-Shi2025-01-108-13/+308
| | | | | | | | | Fixes #33145 An integration test could be added. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Use updated path to s6-svscan after alpine upgrade (#33185)techknowlogick2025-01-101-1/+1
| | | | | Fix #33163 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix raw file API ref handling (#33172)wxiaoguang2025-01-103-47/+52
| | | Fix #33164 and add more tests
* [skip ci] Updated translations via CrowdinGiteaBot2025-01-102-1/+49
|
* Fix ACME panic (#33178)wxiaoguang2025-01-091-2/+4
| | | | | | | | | | Fix #33177, Manually tested: ```` 1.7364311850484018e+09 info maintenance started background certificate maintenance {"cache": "0x1400ca64180"} 1.736431185054049e+09 info obtain acquiring lock {"identifier": "example.com"} 1.736431185058073e+09 info obtain lock acquired {"identifier": "example.com"} 1.736431185058133e+09 info obtain obtaining certificate {"identifier": "example.com"} ````
* Automerge supports deleting branch automatically after merging (#32343)Lunny Xiao2025-01-1016-97/+149
| | | | | | | | | | | | Resolve #32341 ~Depends on #27151~ - [x] It will display a checkbox of deleting the head branch on the pull request view page when starting an auto-merge task. - [x] Add permission check before deleting the branch - [x] Add delete branch comment for those closing pull requests because of head branch or base branch was deleted. - [x] Merge `RetargetChildrenOnMerge` and `AddDeletePRBranchComment` into `service.DeleteBranch`.
* Fix branch dropdown not display ref name (#33159)yp053272025-01-093-20/+30
| | | | | | | | | | | | Before: ![image](https://github.com/user-attachments/assets/899d25a9-80e9-48d5-a820-79c911c858e9) After: ![image](https://github.com/user-attachments/assets/cf2a7407-909a-41db-9957-19d9214af57e) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add .run to gitignore (#33175)hiifong2025-01-091-0/+1
| | | ![image](https://github.com/user-attachments/assets/340a6c2a-8575-4ef9-be75-84af8af82b93)
* Fix assignee list overlapping in Issue sidebar (#33176)wxiaoguang2025-01-101-4/+4
| | | | | | | Fix #33170 ![image](https://github.com/user-attachments/assets/714cebdc-ee76-43e3-9ece-a189f8ecb17a) ![image](https://github.com/user-attachments/assets/cbb58425-42b4-41ee-ba3c-7efbd24607dc)
* Fix pam auth test regression (#33169)TheFox0x72025-01-091-1/+1
| | | fixes: https://github.com/go-gitea/gitea/issues/33168
* Move repo size to sidebar (#33155)yp053272025-01-092-5/+5
| | | ![image](https://github.com/user-attachments/assets/8b14dbb7-ec36-4596-a6aa-72c14d93309d)
* Fix fuzz test (#33156)Lunny Xiao2025-01-091-0/+2
|
* Refactor older tests to use testify (#33140)TheFox0x72025-01-0942-348/+218
| | | | | Refactor checks to use assert/require Use require.Eventually for waiting in elastic and meilisearch tests Use require to exit early instead of assert
* [skip ci] Updated translations via CrowdinGiteaBot2025-01-091-0/+13
|
* Fix typo in gitea downloader test and add missing codebase in ↵yp053272025-01-083-3/+13
| | | | `ToGitServiceType` (#33146)
* Fix form width (#33151)wxiaoguang2025-01-0815-1214/+1194
| | | Fix #33150
* Convert github.com/xanzy/go-gitlab into gitlab.com/gitlab-org/api/client-go ↵yp053272025-01-085-19/+19
| | | | | (#33126) Fix #32985
* Refactor HTMLFormat, update chroma render, fix js error (#33136)wxiaoguang2025-01-0812-17/+34
| | | | | | A small refactor to improve HTMLFormat, to help to prevent low-level mistakes. And fix #33141, fix #33139
* Add missed transaction on setmerged (#33079)Lunny Xiao2025-01-087-146/+121
| | | | | | Follow #33045. There are two updates on `Set Merged`, which should be in one transaction. This also introduced some refactors for changeissuestatus to make it more clear.
* add submodule diff links (#33097)Rowan Bohde2025-01-0823-341/+690
| | | | | | | | | | | | This adds links to submodules in diffs, similar to the existing link when viewing a repo at a specific commit. It does this by expanding diff parsing to recognize changes to submodules, and find the specific refs that are added, deleted or changed. Related #25888 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2025-01-081-16/+16
|
* Update status check for all supported on.pull_request.types in Gitea (#33117)yp053272025-01-084-24/+234
| | | | | | | | | | | | | | | | | | | | | | | Thanks @Zettat123 Follow #33116 Fix #33051 on.pull_request.types doc: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request on.pull_request.types added in this PR: ``` assigned, unassigned, review_requested, review_request_removed, milestoned, demilestoned, labeled, unlabeled ``` unsupported types in Gitea: ``` // Unsupported activity types: // converted_to_draft, ready_for_review, locked, unlocked, auto_merge_enabled, auto_merge_disabled, enqueued, dequeued ``` TODO: - [x] add test
* Support the new exit code for `git remote` subcommands for git version ↵yp053272025-01-073-8/+16
| | | | | | | | | >=2.30.0 (#33129) Fix #32889 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Make git clone URL could use current signed-in user (#33091)wxiaoguang2025-01-0721-142/+272
| | | | | | | | | | | | | | close #33086 * Add a special value for "SSH_USER" setting: `(DOER_USERNAME)` * Improve parseRepositoryURL and add tests (now it doesn't have hard dependency on some setting values) Many changes are just adding "ctx" and "doer" argument to functions. By the way, improve app.example.ini, remove all `%(key)s` syntax, it only makes messy and no user really cares about it. Document: https://gitea.com/gitea/docs/pulls/138
* Filter reviews of one pull request in memory instead of database to reduce ↵Lunny Xiao2025-01-074-39/+53
| | | | | | | | | | | | | | slow response because of lacking database index (#33106) This PR fixes a performance problem when reviewing a pull request in a big instance which have many records in the `review` table. Traditionally, we should add more indexes in that table. But since dismissed reviews of 1 pull request will not be too many as expected in a common repository. Filtering reviews in the memory should be more quick . --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2025-01-072-0/+3
|
* Remove extended glob pattern from branch protection UI (#33125)TheFox0x72025-01-071-1/+1
| | | | | | | | | | | | | | Underlying go library has no support for it Fixes: https://github.com/go-gitea/gitea/issues/33121 --- I never touched frontend tests so pointers how to write them are welcome. This can be either fix or workaround, depending if this is something gitea should support in the future or not. The golang side is unlikely to get updates though.
* fix empty repo updated time (#33120)Chai-Shi2025-01-072-1/+10
| | | | | | | | | | | | | | | | | | fixes #33119 routers/web/repo/view_home.go ![image](https://github.com/user-attachments/assets/b0d6c5f5-7abc-478a-8d41-4b44dbd460aa) Calling `updateContextRepoEmptyAndStatus` will always ask the DB to update the updated Unix attributes. When revisiting the repo's home page, the timestamp will be updated unexpectedly, so I added the needsUpdate variable to check whether, in the end, the commitment to db update is necessary if columns have not changed at all. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor package (routes and error handling, npm peer dependency) (#33111)wxiaoguang2025-01-0628-245/+154
|
* Refactor legacy JS (#33115)wxiaoguang2025-01-065-29/+31
|
* Fix repo empty guide (#33114)wxiaoguang2025-01-063-2/+7
|
* [skip ci] Updated translations via CrowdinGiteaBot2025-01-061-0/+1
|
* Fix dropdown menu header and mobile view (#33108)wxiaoguang2025-01-054-6/+7
| | | | | | | | | | | ![image](https://github.com/user-attachments/assets/3f831c8c-ef87-4282-880a-c2738f3e1d17) ---- ![image](https://github.com/user-attachments/assets/c4c0519b-cfa6-42b4-bd28-205ee514eb34) ---- ![image](https://github.com/user-attachments/assets/8624a605-9f2b-4905-9cbc-0af073972874)
* workflow_dispatch use workflow from trigger branch (#33098)ChristopherHX2025-01-056-117/+184
| | | | | | | | | | | | | * htmx updates the input form on branch switch * add workflow warning to dispatch modal * use name if description of input is empty * show error if workflow_dispatch not available on branch Closes #33073 Closes #33099 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>