aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update JS dependencies (#28537)silverwind2023-12-30160-1025/+890
| | | | | | | | | | - Update all JS dependencies excluding mcaptcha (breaking changes) and stylelint (plugin not compatible with v16) - Regenerate SVGs - Update markdownlint rule names - Fix one issue of heading in markdown discovered during lint - Update for monaco options renames - Fix stylelint rule length-zero-no-unit for custom properties - Tested editor, swagger, sorting, vue, lint
* Improve document for ARTIFACT_RETENTION_DAYS (#28646)wxiaoguang2023-12-292-2/+2
| | | Follow #28626
* fix empty ref for cron workflow runs (#28640)Denys Konovalov2023-12-291-2/+3
| | | | | | Fix #27678 Please see https://github.com/go-gitea/gitea/issues/27678#issuecomment-1871445853 for details.
* Improve 1.22 document for Database Preparation (#28643)wxiaoguang2023-12-291-1/+1
| | | Fix #28247
* [skip ci] Updated translations via CrowdinGiteaBot2023-12-291-1/+1
|
* switch destination directory for apt signing keys (#28639)Denys Konovalov2023-12-283-8/+8
| | | | | | | | | | | | | | | According to [Debian docs](https://wiki.debian.org/DebianRepository/UseThirdParty): > The certificate MUST NOT be placed in /etc/apt/trusted.gpg.d or loaded by apt-key add. > ... > If future updates to the certificate will be managed by an apt/dpkg package as recommended below, then it SHOULD be downloaded into /usr/share/keyrings using the same filename that will be provided by the package. If it will be managed locally , it SHOULD be downloaded into /etc/apt/keyrings instead. > ... > A sources.list entry SHOULD have the signed-by option set.
* Extend description for ARTIFACT_RETENTION_DAYS (#28626)Gerd Katzenbeisser2023-12-281-1/+1
| | | | Make it clear that this value is just a default value and that every artifact can have it's own value.
* Refactor timeutil package (#28623)wxiaoguang2023-12-289-39/+30
| | | | | 1. make names more readable 2. remove unused FormatLong/FormatShort 3. use `FormatDate` instead of `Format "2006-01-02"`
* Refactor some legacy code and remove unused code (#28622)wxiaoguang2023-12-287-76/+14
| | | | | 1. use slices.Contains, remove Int64sContains 2. use HashEmail, remove base.EncodeMD5 3. remove BasicAuthEncode, IsLetter
* Remove unnecessary syncbranchToDB with tests (#28624)Lunny Xiao2023-12-282-20/+45
| | | | | | #28361 introduced `syncBranchToDB` in `CreateNewBranchFromCommit`. This PR will revert the change because it's unnecessary. Every push will already be checked by `syncBranchToDB`. This PR also created a test to ensure it's right.
* Do not set `Accept` header twice (#28598)KN4CK3R2023-12-281-4/+1
| | | | | Revert #28550 Don't add the `Accept` header twice.
* [skip ci] Updated translations via CrowdinGiteaBot2023-12-281-4/+5
|
* fix wrong link in user and organization profile when using relative url (#28617)katsu2023-12-273-15/+28
| | | | | | | | | | fix #28436. the doc https://docs.gitea.com/usage/profile-readme maybe also need to be updated to tell that the main branch is necessary,which means the following three conditions should be satisfied: - repo: **.profile** - branch: **[default branch]** - markdown: **README.md**
* Add get actions runner registration token for API routes, repo, org, user ↵Lunny Xiao2023-12-278-14/+285
| | | | | | | | | | and global level (#27144) Replace #23761 --------- Co-authored-by: Denys Konovalov <kontakt@denyskon.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix session key conflict with database keyword (#28613)Lunny Xiao2023-12-272-7/+47
| | | | | | | | | This is a regression from #28220 . `builder.Cond` will not add `` ` `` automatically but xorm method `Get/Find` adds `` ` ``. This PR also adds tests to prevent the method from being implemented incorrectly. The tests are added in `integrations` to test every database.
* [skip ci] Updated translations via CrowdinGiteaBot2023-12-272-1/+49
|
* Use known issue IID to generate new PR index number when migrating from ↵wxiaoguang2023-12-262-11/+45
| | | | | GitLab (#28616) Fix #13884
* Update repo-mirror.en-us.md (#28612)Volodymyr Stelmashchuk2023-12-271-1/+1
| | | | | Add small changes to the doc. The workflow scope require for push code to github mirror in case the project use the github action compatibility ui.
* [skip ci] Updated translations via CrowdinGiteaBot2023-12-2625-45/+8
|
* Refactor deletion (#28610)delvh2023-12-2531-169/+89
| | | | | | | | | | | | | | | | | | Introduce the new generic deletion methods - `func DeleteByID[T any](ctx context.Context, id int64) (int64, error)` - `func DeleteByIDs[T any](ctx context.Context, ids ...int64) error` - `func Delete[T any](ctx context.Context, opts FindOptions) (int64, error)` So, we no longer need any specific deletion method and can just use the generic ones instead. Replacement of #28450 Closes #28450 --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Refactor CORS handler (#28587)wxiaoguang2023-12-2511-78/+131
| | | | | | | | | | | The CORS code has been unmaintained for long time, and the behavior is not correct. This PR tries to improve it. The key point is written as comment in code. And add more tests. Fix #28515 Fix #27642 Fix #17098
* Added instance-level variables (#28115)Jean-Baptiste Gomond2023-12-256-18/+42
| | | | | | | | | | | This PR adds instance-level variables, and so closes #27726 ![gitea_instance_variables_1](https://github.com/go-gitea/gitea/assets/8344487/ad409cd4-ce36-4c84-a764-34451b0fb63a) ![gitea_instance_variables_2](https://github.com/go-gitea/gitea/assets/8344487/426f0965-dec6-4560-948c-067cdeddd720) ![gitea_instance_variables_3](https://github.com/go-gitea/gitea/assets/8344487/cf1d7776-4938-4825-922e-cbbbf28a5f33)
* Revert "improve possible performance bottleneck (#28547)" (#28593)Lunny Xiao2023-12-251-3/+8
| | | | | | | | This reverts commit b35d3fddfac389a7be401a63b4e1283dd74af681. This is totally wrong. I think `Update join` hasn't been supported well by xorm. I just revert the PR and will try to send another one.
* [skip ci] Updated licenses and gitignoresGiteaBot2023-12-252-0/+15
|
* Fix flex container width (#28603)wxiaoguang2023-12-241-0/+1
| | | Fix #28489
* Fix the scroll behavior for emoji/mention list (#28597)wxiaoguang2023-12-241-3/+3
| | | Fix #28595 by https://github.com/github/combobox-nav/pull/79 (combobox-nav v2.3.1)
* bump to use alpine3.19 (#28594)techknowlogick2023-12-232-4/+4
|
* Include heap pprof in diagnosis report to help debugging memory leaks (#28596)wxiaoguang2023-12-231-0/+7
|
* Disable query token param in integration tests (#28592)Kyle D2023-12-238-52/+45
| | | | | Follow up to https://github.com/go-gitea/gitea/pull/28484, this PR enables the setting for integration tests and migrates a few additional test queries.
* Fix wrong due date rendering in issue list page (#28588)Yarden Shoham2023-12-221-1/+1
| | | | | | It included the hours, minutes, and seconds. By removing these, the date renders correctly. Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Fix `status_check_contexts` matching bug (#28582)Zettat1232023-12-221-1/+9
| | | | | | | | | | | | | | | | Fix #28570 Follow #24633 --- Copied from https://github.com/go-gitea/gitea/issues/28570#issuecomment-1867327999 The feature introduced in #24633 should be compatible with `status_check_contexts`. However, if one or more of `status_check_contexts` is not a legal glob expressions, `glob.Compile` will fail and the contexts cannot match. https://github.com/go-gitea/gitea/blob/21229ed2c8ed00f57100adf9ebc5f4a08da9a66e/routers/web/repo/pull.go#L653-L663
* Fix 405 method not allowed CORS / OIDC (#28583)morphelinho2023-12-221-0/+2
| | | | | | Follow #28184 Follow #28515 Fix problem with 405 method not allowed for CORS wrt OIDC
* Add more ways to try (#28581)Jason Song2023-12-222-2/+11
|
* Convert to url auth to header auth in tests (#28484)KN4CK3R2023-12-21102-1522/+1714
| | | Related #28390
* 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>