summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Avoid unnecessary 500 panic when a commit doesn't exist (#28719) (#28721)Giteabot2024-01-072-1/+11
| | | | | | | | | | | | | Backport #28719 by wxiaoguang In #26851, it assumed that `Commit` always exists when `PageIsDiff==true`. But for a 404 page, the `Commit` doesn't exist, so the following code would cause panic because nil value can't be passed as string parameter to `IsMultilineCommitMessage(string)` (or the StringUtils.Cut in later PRs) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve frontend guideline (#28711) (#28713)Giteabot2024-01-061-1/+2
|
* Fix panic when parsing empty pgsql host (#28708) (#28709)Giteabot2024-01-062-1/+5
| | | | | | | | Backport #28708 by wxiaoguang Regression of #27723 Fix #28705 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix wrapping of label list (#28684) (#28688)Giteabot2024-01-041-0/+1
| | | | | | | | | | | | | Backport #28684 by @denyskon Before: ![grafik](https://github.com/go-gitea/gitea/assets/47871822/2fbd7ef2-22ad-4515-9c66-81c29bfbb7a3) After: ![grafik](https://github.com/go-gitea/gitea/assets/47871822/df86d1ae-03db-4543-834c-761859c367be) Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
* Make template `DateTime` show proper tooltip (#28677) (#28683)wxiaoguang2024-01-033-16/+24
| | | Backport #28677
* Fix: system webhooks API bug (#28531) (#28666)Giteabot2023-12-311-6/+17
| | | | | | | | Backport #28531 by @pulltheflower - Fix the bug about admin/hooks API that `GET /admin/hooks` can only fetch system_hooks, `POST /admin/hooks` can only create default_hooks. Co-authored-by: vincent <38434877+pulltheflower@users.noreply.github.com>
* Fix alpine package files are not rebuilt (#28638) (#28665)Giteabot2023-12-311-0/+5
| | | | | | | | | Backport #28638 by @lng2020 I noticed the `BuildAllRepositoryFiles` function under the Alpine folder is unused and I thought it was a bug. But I'm not sure about this. Was it on purpose? Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
* Upgrade xorm to new version which supported update join for all supported ↵Giteabot2023-12-314-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | databases (#28590) (#28668) Backport #28590 by @lunny Fix https://github.com/go-gitea/gitea/pull/28547#issuecomment-1867740842 Since https://gitea.com/xorm/xorm/pulls/2383 merged, xorm now supports UPDATE JOIN. To keep consistent from different databases, xorm use `engine.Join().Update`, but the actural generated SQL are different between different databases. For MySQL, it's `UPDATE talbe1 JOIN table2 ON join_conditions SET xxx Where xxx`. For MSSQL, it's `UPDATE table1 SET xxx FROM TABLE1, TABLE2 WHERE join_conditions`. For SQLITE per https://www.sqlite.org/lang_update.html, sqlite support `UPDATE table1 SET xxx FROM table2 WHERE join conditions` from 3.33.0(2020-8-14). POSTGRES is the same as SQLITE. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Avoid cycle-redirecting user/login page (#28636) (#28658)wxiaoguang2023-12-305-14/+6
| | | | | Backport #28636 Fix #28231, and remove some unused code.
* fix empty ref for cron workflow runs (#28640) (#28647)Giteabot2023-12-291-2/+3
| | | | | | | | | | Backport #28640 by @denyskon Fix #27678 Please see https://github.com/go-gitea/gitea/issues/27678#issuecomment-1871445853 for details. Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
* Remove unnecessary syncbranchToDB with tests (#28624) (#28629)Lunny Xiao2023-12-292-20/+45
| | | | | | | | | | Replace #28625 Backport #28624 by lunny #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.
* Improve document for ARTIFACT_RETENTION_DAYS (#28646) (#28648)Giteabot2023-12-292-2/+2
| | | | | | | Backport #28646 by wxiaoguang Follow #28626 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* switch destination directory for apt signing keys (#28639) (#28642)Giteabot2023-12-293-8/+8
| | | | | | | | | | | | | | | | | | | Backport #28639 by @denyskon 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. Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
* Improve 1.21 document for Database Preparation (#28643) (#28644)wxiaoguang2023-12-291-1/+3
| | | | | Backport #28643 Fix #28247
* Extend description for ARTIFACT_RETENTION_DAYS (#28626) (#28630)Giteabot2023-12-281-1/+1
| | | | | | | | Backport #28626 by @hakito Make it clear that this value is just a default value and that every artifact can have it's own value. Co-authored-by: Gerd Katzenbeisser <hakito@users.noreply.github.com>
* Use known issue IID to generate new PR index number when migrating from ↵Giteabot2023-12-272-11/+45
| | | | | | | | | GitLab (#28616) (#28618) Backport #28616 by wxiaoguang Fix #13884 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor CORS handler (#28587) (#28611)wxiaoguang2023-12-2511-78/+131
| | | | | | | | | | | | | Backport #28587, the only conflict is the test file. 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
* Revert "improve possible performance bottleneck (#28547)" (#28593) (#28608)Giteabot2023-12-251-3/+8
| | | | | | | | | | | | Backport #28593 by @lunny 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. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix the scroll behavior for emoji/mention list (#28597) (#28601)Giteabot2023-12-251-3/+3
| | | | | | | Backport #28597 by wxiaoguang Fix #28595 by https://github.com/github/combobox-nav/pull/79 (combobox-nav v2.3.1) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix flex container width (#28603) (#28605)Giteabot2023-12-241-0/+1
| | | | | | | Backport #28603 by wxiaoguang Fix #28489 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Include heap pprof in diagnosis report to help debugging memory leaks ↵Giteabot2023-12-241-0/+7
| | | | (#28596) (#28599)
* Fix wrong due date rendering in issue list page (#28588) (#28591)Giteabot2023-12-221-1/+1
| | | | | | | | | Backport #28588 by @yardenshoham It included the hours, minutes, and seconds. By removing these, the date renders correctly. Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Yarden Shoham <git@yardenshoham.com>
* Fix `status_check_contexts` matching bug (#28582) (#28589)Giteabot2023-12-221-1/+9
| | | | | | | | | | | | | | | | | | | | Backport #28582 by @Zettat123 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 Co-authored-by: Zettat123 <zettat123@gmail.com>
* Fix 405 method not allowed CORS / OIDC (#28583) (#28586)Giteabot2023-12-221-0/+2
| | | | | | | | | | Backport #28583 by @morphelinho Follow #28184 Follow #28515 Fix problem with 405 method not allowed for CORS wrt OIDC Co-authored-by: morphelinho <morphelinho@users.noreply.github.com>
* Fix 500 error of searching commits (#28576) (#28579)Giteabot2023-12-222-2/+2
| | | | | | | | | | Backport #28576 by wxiaoguang Regression of #28454 . Now the string is escaped HTML, so it doesn't need `| Safe`. Fix #28575 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* improve possible performance bottleneck (#28547) (#28578)Giteabot2023-12-211-8/+3
| | | | | | | Backport #28547 by @lunny Replace #28500 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Use information from previous blame parts (#28572) (#28577)Giteabot2023-12-221-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #28572 by @KN4CK3R 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. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Update mermaid for 1.21 (#28571)wxiaoguang2023-12-212-5/+5
| | | Try to fix #28170
* Add changelog for 1.21.3 (#28569)v1.21.3Lunny Xiao2023-12-211-0/+28
|
* Fix merging artifact chunks error when minio storage basepath is set ↵Giteabot2023-12-211-4/+9
| | | | | | | | | | | | | | | | | | (#28555) (#28568) Backport #28555 by @fuxiaohei 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. Co-authored-by: FuXiaoHei <fuxiaohei@vip.qq.com>
* Update actions document about comparsion as Github Actions (#28560) (#28564)Giteabot2023-12-202-0/+16
| | | | | Backport #28560 by @lunny Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix inperformant query on retrifing review from database. (#28552) (#28562)Giteabot2023-12-201-8/+10
| | | | | | | | | | | Backport #28552 by @6543 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) Co-authored-by: 6543 <m.huber@kithara.com>
* Fix the issue ref rendering for wiki (#28556) (#28559)Giteabot2023-12-201-1/+3
| | | | | | | | Backport #28556 by wxiaoguang Fix #28526, regression of * #26365 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix duplicate ID when deleting repo (#28520) (#28528)Giteabot2023-12-192-4/+4
| | | | | | | | | | | | | | | | | | | Backport #28520 by @framitdavid 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. I am submitting these pull requests to ensure that the correct input field is focused when the user clicks on the label. This change will also facilitate the writing of tests using Playwright or Testing Library to retrieve elements based on roles. This PR will also improve acessibility of this area. Co-authored-by: David Øvrelid <46874830+framitdavid@users.noreply.github.com>
* Only check online runner when detecting matching runners in workflows ↵Giteabot2023-12-193-4/+19
| | | | | | | | | | | | | | | | | (#28286) (#28512) Backport #28286 by @yp05327 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) Co-authored-by: yp05327 <576951401@qq.com>
* chore(api): support ignore password if login source type is LDAP for ↵Giteabot2023-12-193-16/+24
| | | | | | | | | | | | | creating user API (#28491) (#28525) Backport #28491 by @appleboy - 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> Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Update golang.org/x/crypto (#28519)wxiaoguang2023-12-192-10/+11
| | | | ref: https://groups.google.com/g/golang-announce/c/qA3XtxvMUyg, CVE-2023-48795, https://go.dev/issue/64784
* Improve the prompt for "ssh-keygen sign" (#28509) (#28510)Giteabot2023-12-181-1/+1
| | | | | | | Backport #28509 by wxiaoguang Close #28505 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add option to disable ambiguous unicode characters detection (#28454) (#28499)wxiaoguang2023-12-1817-146/+110
| | | | | | | | Backport #28454 (the only conflict is caused by some comments) * Close #24483 * Close #28123 * Close #23682 * Close #23149
* Initalize stroage for orphaned repository doctor (#28487) (#28490)Giteabot2023-12-161-0/+5
| | | | | | | | | | | | | Backport #28487 by @earl-warren - 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: Earl Warren <109468362+earl-warren@users.noreply.github.com> Co-authored-by: Gusted <postmaster@gusted.xyz>
* Update docs for DISABLE_QUERY_AUTH_TOKEN (#28485) (#28488)Giteabot2023-12-161-0/+1
| | | | | | | | Backport #28485 by @kdumontnu As described [here](https://github.com/go-gitea/gitea/pull/28390#issuecomment-1857553331). Co-authored-by: Kyle D <kdumontnu@gmail.com>
* Refactor SSH clone URL generation code (#28421) (#28480)Giteabot2023-12-152-13/+42
| | | | | | | Backport #28421 by wxiaoguang Refactor the code and add tests, keep the old logic. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Polyfill SubmitEvent for PaleMoon (#28441) (#28478)Giteabot2023-12-156-7/+31
| | | | | | | | | | Backport #28441 by wxiaoguang Fix #28319 It only polyfills if there is no "SubmitEvent" class, so it has no side effect for most users. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix Chinese translation of config cheat sheet[API] (#28472) (#28473)Giteabot2023-12-151-4/+5
| | | | | Backport #28472 by @CaiCandong Co-authored-by: CaiCandong <50507092+CaiCandong@users.noreply.github.com>
* Fix documents for "custom/public/assets/" (#28465) (#28467)Giteabot2023-12-145-8/+8
| | | | | | | Backport #28465 by wxiaoguang Fix #28463 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Retry SSH key verification with additional CRLF if it failed (#28392) (#28464)Giteabot2023-12-141-4/+9
| | | | | | | | | | | Backport #28392 by @nekrondev 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: nekrondev <heiko@noordsee.de> Co-authored-by: Heiko Besemann <heiko.besemann@qbeyond.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add endpoint for not implemented Docker auth (#28457) (#28462)Giteabot2023-12-132-1/+15
| | | | | | | | | | | | | | Backport #28457 by @KN4CK3R 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. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Fix possible nil pointer access (#28428) (#28440)Giteabot2023-12-124-28/+14
| | | | | | | | Backport #28428 by @KN4CK3R There could be a nil pointer exception if the file is not found because that specific error is suppressed but not handled. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Don't show unnecessary citation JS error on UI (#28433) (#28437)Giteabot2023-12-121-4/+11
| | | | | | | Backport #28433 by wxiaoguang Fix #28226 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* 1.21.2 changelog (#28387)v1.21.2techknowlogick2023-12-121-0/+39
| | | | | | | | To be rebuilt with latest golang version --------- Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>