aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix 500 error of searching commits (#28576)wxiaoguang2023-12-212-2/+2
| | | | | | Regression of #28454 . Now the string is escaped HTML, so it doesn't need `| Safe`. Fix #28575
* improve possible performance bottleneck (#28547)Lunny Xiao2023-12-211-8/+3
| | | | | | | Replace #28500 --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Use information from previous blame parts (#28572)KN4CK3R2023-12-211-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #28545 `git blame` output can contain blocks without commit information if it was outputted before (the `0dafa97ea3f6d9662299579e5be1875cd28baaae 48 26 1` line): ``` fec25436488499df7231f63b857f66457c193d5c 24 25 1 author Bastien Montagne author-mail <bastien@blender.org> author-time 1660731031 author-tz +0200 committer Bastien Montagne committer-mail <bastien@blender.org> committer-time 1660731031 committer-tz +0200 summary LibOverride: Add Make/Reset/Clear entries to IDTemplate contextual menu. previous 839ece6477203382b7a7483062961540180ff1cd source/blender/editors/interface/interface_ops.c filename source/blender/editors/interface/interface_ops.c #include "BLT_translation.h" 0dafa97ea3f6d9662299579e5be1875cd28baaae 48 26 1 3d57bc4397fca53bc9702a27bbf50102827829b0 27 27 1 author Hans Goudey author-mail <hans@blender.org> author-time 1700131315 author-tz +0100 committer Hans Goudey committer-mail <hooglyboogly@noreply.localhost> committer-time 1700131315 committer-tz +0100 summary Cleanup: Move several blenkernel headers to C++ previous 451c054d9b7d3148a646caa5a72fb127a5b5c408 source/blender/editors/interface/interface_ops.cc filename source/blender/editors/interface/interface_ops.cc #include "BKE_context.hh" ``` This PR reuses data from the previous blame part to fill these gaps.
* Make offline mode as default to no connect external avatar service by ↵Lunny Xiao2023-12-215-5/+6
| | | | | | | default (#28548) To keep user's privacy, make offline mode as true by default. Users can still change it from installation ui and app.ini
* Fix merging artifact chunks error when minio storage basepath is set (#28555)FuXiaoHei2023-12-211-4/+9
| | | | | | | | | | | | Related to https://github.com/go-gitea/gitea/issues/28279 When merging artifact chunks, it lists chunks from storage. When storage is minio, chunk's path contains `MINIO_BASE_PATH` that makes merging break. <del>So trim the `MINIO_BASE_PATH` when handle chunks.</del> Update the chunk file's basename to retain necessary information. It ensures that the directory in the chunk's path remains unaffected.
* feat: bump `dessant/lock-threads` and `actions/setup-go` to use nodejs20 ↵Rui Chen2023-12-2120-46/+46
| | | | | | | | | | | | | | runtime (#28565) Update more actions to use nodejs20 runtime and also update the docs for checkout action usage. similar to: - #27836 - #27096 --------- Signed-off-by: Rui Chen <rui@chenrui.dev>
* Update actions document about comparsion as Github Actions (#28560)Lunny Xiao2023-12-202-0/+16
|
* Fix inperformant query on retrifing review from database. (#28552)65432023-12-201-8/+10
| | | | | | | can we please PLEAS PLEASE only use raw SQL statements if it is relay needed!!! source is https://github.com/go-gitea/gitea/pull/28544 (before refactoring)
* Fix the issue ref rendering for wiki (#28556)wxiaoguang2023-12-201-1/+3
| | | | | | | | Fix #28526, regression of * #26365 (although the author of #26365 has recent activities, but there is no response for the regression, so I proposed this quick fix and keep the fix simple to make it easier to backport to 1.21)
* Add missing head of lfs client batch (#28550)Lunny Xiao2023-12-201-1/+4
| | | ref https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md#git-lfs-batch-api
* [skip ci] Updated translations via CrowdinGiteaBot2023-12-201-0/+4
|
* Remove deadcode under models/issues (#28536)Nanguan Lin2023-12-1911-200/+9
| | | | | | | Using the Go Official tool `golang.org/x/tools/cmd/deadcode@latest` mentioned by [go blog](https://go.dev/blog/deadcode). Just use `deadcode .` in the project root folder and it gives a list of unused functions. Though it has some false alarms. This PR removes dead code detected in `models/issues`.
* Always enable caches (#28527)Lunny Xiao2023-12-1914-82/+31
| | | | | | | | | Nowadays, cache will be used on almost everywhere of Gitea and it cannot be disabled, otherwise some features will become unaviable. Then I think we can just remove the option for cache enable. That means cache cannot be disabled. But of course, we can still use cache configuration to set how should Gitea use the cache.
* Improve ObjectFormat interface (#28496)Lunny Xiao2023-12-1939-168/+109
| | | | | | | | | | | | | | | | | | | | | | | The 4 functions are duplicated, especially as interface methods. I think we just need to keep `MustID` the only one and remove other 3. ``` MustID(b []byte) ObjectID MustIDFromString(s string) ObjectID NewID(b []byte) (ObjectID, error) NewIDFromString(s string) (ObjectID, error) ``` Introduced the new interfrace method `ComputeHash` which will replace the interface `HasherInterface`. Now we don't need to keep two interfaces. Reintroduced `git.NewIDFromString` and `git.MustIDFromString`. The new function will detect the hash length to decide which objectformat of it. If it's 40, then it's SHA1. If it's 64, then it's SHA256. This will be right if the commitID is a full one. So the parameter should be always a full commit id. @AdamMajer Please review.
* Fix duplicate ID when deleting repo (#28520)David Øvrelid2023-12-192-4/+4
| | | | | | | | There is an accessibility issue in the interface when attempting to delete a repository. When I click on "Delete repository," a dialog box appears, requiring confirmation to proceed with the repository deletion. However, when I press the "Repo name" label, the wrong input field gains focus. The focused field is located behind the dialog and is intended for renaming the repository.
* chore(api): support ignore password if login source type is LDAP for ↵Bo-Yi Wu2023-12-193-16/+24
| | | | | | | | | | | | creating user API (#28491) - Modify the `Password` field in `CreateUserOption` struct to remove the `Required` tag - Update the `v1_json.tmpl` template to include the `email` field and remove the `password` field --------- Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Update go dependencies (#28518)wxiaoguang2023-12-195-402/+273
| | | | | Update golang.org/x/crypto for CVE-2023-48795 and update other packages. `go-git` is not updated because it needs time to figure out why some tests fail.
* Bump google/go-github to v57 (#28514)Yevhen Pavlov2023-12-186-12/+13
|
* Only check online runner when detecting matching runners in workflows (#28286)yp053272023-12-183-4/+19
| | | | | | | | | | | Mentioned: [#28277](https://github.com/go-gitea/gitea/issues/28277#issuecomment-1831325276) We should only check online runner when detecting matching runners in workflows, as if runner is not online, the workflow will not run. ![image](https://github.com/go-gitea/gitea/assets/18380374/11855e9d-7241-4b7a-b8d7-49dbb94ba1c5)
* Add orphaned topic consistency check (#28507)Earl Warren2023-12-182-0/+16
| | | | | | | | | | | - If a topic has zero repository count, it means that none of the repositories are using that topic, that would make them 'useless' to keep. One caveat is that if that topic is going to be used in the future, it will be added again to the database, but simply with a new ID. Refs: https://codeberg.org/forgejo/forgejo/pulls/1964 Co-authored-by: Gusted <postmaster@gusted.xyz>
* Improve the prompt for "ssh-keygen sign" (#28509)wxiaoguang2023-12-181-1/+1
| | | | | Close #28505, ref: * https://github.com/go-gitea/gitea/pull/20112#issuecomment-1165423026 * https://github.com/go-gitea/gitea/issues/28505#issuecomment-1860048116
* [skip ci] Updated translations via CrowdinGiteaBot2023-12-181-2/+2
|
* Add option to disable ambiguous unicode characters detection (#28454)wxiaoguang2023-12-1717-147/+111
| | | | | | | | * Close #24483 * Close #28123 * Close #23682 * Close #23149 (maybe more)
* Adjust object format interface (#28469)Lunny Xiao2023-12-1754-202/+190
| | | | | | | - Remove `ObjectFormatID` - Remove function `ObjectFormatFromID`. - Use `Sha1ObjectFormat` directly but not a pointer because it's an empty struct. - Store `ObjectFormatName` in `repository` struct
* Remove duplicate option in admin screen and now-unused translation keys (#28492)The Magician2023-12-172-3/+0
| | | | | | | | | | | | | Resolves https://github.com/go-gitea/gitea/issues/28451. This change follows the recommendation by wxiaoguang to remove the "Disable Minimum Key Size Check" from the "Service Configuration" section of the UI, because this option belongs to the "SSH Configuration" section of the administration menu and already has a functioning indicator in that section of the UI. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2023-12-171-7/+24
|
* Initalize stroage for orphaned repository doctor (#28487)Earl Warren2023-12-161-0/+5
| | | | | | | | | | - When a repository is orphaned and has objects stored in any of the storages such as repository avatar or attachments the delete function would error, because the storage module wasn't initalized. - Add code to initialize the storage module. Refs: https://codeberg.org/forgejo/forgejo/pulls/1954 Co-authored-by: Gusted <postmaster@gusted.xyz>
* Update docs for DISABLE_QUERY_AUTH_TOKEN (#28485)Kyle D2023-12-151-0/+1
| | | | As described [here](https://github.com/go-gitea/gitea/pull/28390#issuecomment-1857553331).
* Improve CLI code and descriptions (#28482)wxiaoguang2023-12-1512-37/+27
| | | | | | | | | | * Close #28444 * Actually, it doesn't need to use that trick because it looks like it is not necessary, no user really needs it * Remove the hidden (legacy) "doctor" subcommand and update documents * Fix "actions" usage ![image](https://github.com/go-gitea/gitea/assets/2114189/3c2b34a7-4f92-4a6c-96fd-9505e413d4ec)
* Remove unnecessary forgot password link in delete user section (#28355)yp053272023-12-151-1/+0
| | | | | | | | | Before: <img width="458" alt="image" src="https://github.com/go-gitea/gitea/assets/18380374/92815496-38cc-4bb9-9182-1509a72b07f6"> After: ![image](https://github.com/go-gitea/gitea/assets/18380374/d96ed908-47ad-44cc-a624-4c10fa8c8c86)
* Refactor SSH clone URL generation code (#28421)wxiaoguang2023-12-152-13/+42
| | | Refactor the code and add tests, keep the old logic.
* Polyfill SubmitEvent for PaleMoon (#28441)wxiaoguang2023-12-156-7/+31
|
* Fix Chinese translation of config cheat sheet[API] (#28472)CaiCandong2023-12-151-4/+5
|
* Add combined index for issue_user.uid and issue_id (#28080)sebastian-sauer2023-12-146-2/+100
| | | | | | | | fixes #27877 --------- Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix documents for "custom/public/assets/" (#28465)wxiaoguang2023-12-145-8/+8
| | | Fix #28463
* Only use SHA256 feature when git >= 2.42 (#28466)wxiaoguang2023-12-144-12/+11
| | | And fix some comments
* Retry SSH key verification with additional CRLF if it failed (#28392)nekrondev2023-12-141-4/+9
| | | | | | | | | | Windows-based shells will add a CRLF when piping the token into ssh-keygen command resulting in verification error. This resolves #21527. --------- Co-authored-by: Heiko Besemann <heiko.besemann@qbeyond.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Abstract hash function usage (#28138)Adam Majer2023-12-13122-592/+945
| | | | | | Refactor Hash interfaces and centralize hash function. This will allow easier introduction of different hash function later on. This forms the "no-op" part of the SHA256 enablement patch.
* Add endpoint for not implemented Docker auth (#28457)KN4CK3R2023-12-132-1/+15
| | | | | | | | | | Recently Docker started to use the optional `POST /v2/token` endpoint which should respond with a `404 Not Found` status code instead of the current `405 Method Not Allowed`. > Note: Not all token servers implement oauth2. If the request to the endpoint returns 404 using the HTTP POST method, refer to Token Documentation for using the HTTP GET method supported by all token servers.
* docs: Update group membership fields to match application. (#28175)David Hulick2023-12-131-9/+9
| | | | | | | | Several fields in the "Verify group membership in LDAP" docs were confusingly titled when compared to the actual fields in the application, this change rectifies that by matching the docs to the fields already present in gitea. Signed-off-by: David Hulick <dave.hulick@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2023-12-131-0/+3
|
* Fix possible nil pointer access (#28428)KN4CK3R2023-12-124-28/+14
| | | | There could be a nil pointer exception if the file is not found because that specific error is suppressed but not handled.
* Don't show unnecessary citation JS error on UI (#28433)wxiaoguang2023-12-121-4/+11
| | | Fix #28226
* Do some missing checks (#28423)Lunny Xiao2023-12-123-3/+62
|
* Deprecate query string auth tokens (#28390)Jack Hay2023-12-125-7/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## Changes - Add deprecation warning to `Token` and `AccessToken` authentication methods in swagger. - Add deprecation warning header to API response. Example: ``` HTTP/1.1 200 OK ... Warning: token and access_token API authentication is deprecated ... ``` - Add setting `DISABLE_QUERY_AUTH_TOKEN` to reject query string auth tokens entirely. Default is `false` ## Next steps - `DISABLE_QUERY_AUTH_TOKEN` should be true in a subsequent release and the methods should be removed in swagger - `DISABLE_QUERY_AUTH_TOKEN` should be removed and the implementation of the auth methods in question should be removed ## Open questions - Should there be further changes to the swagger documentation? Deprecation is not yet supported for security definitions (coming in [OpenAPI Spec version 3.2.0](https://github.com/OAI/OpenAPI-Specification/issues/2506)) - Should the API router logger sanitize urls that use `token` or `access_token`? (This is obviously an insufficient solution on its own) --------- Co-authored-by: delvh <dev.lh@web.de>
* [skip ci] Updated translations via CrowdinGiteaBot2023-12-1227-319/+87
|
* Let `curl` write the content to file (#28427)KN4CK3R2023-12-121-1/+1
|
* Improve doctor cli behavior (#28422)wxiaoguang2023-12-113-34/+66
| | | | | | 1. Do not sort the "checks" slice again and again when "Register", it just wastes CPU when the Gitea instance runs 2. If a check doesn't exist, tell the end user 3. Add some tests
* Second part of refactor `db.Find` (#28194)Lunny Xiao2023-12-1114-222/+149
| | | Continue of #27798 and move more functions to `db.Find` and `db.Count`.
* Fix commit status in repo list (#28412)yp053272023-12-112-2/+4
| | | | | | | | | | | | | | | Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/00edf23a-aee1-4177-a12c-bd03ae14e65e) ![image](https://github.com/go-gitea/gitea/assets/18380374/0663e443-682c-4a68-b14e-a0fa0e4c3716) `TestOrg/testactions` does have commit status, but won't display in `All` After: ![image](https://github.com/go-gitea/gitea/assets/18380374/7231db29-9c4e-484f-afa2-87db19be19b8) Same to #26179.