summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix nil pointer panic when exec some gitea cli command (#28791) (#28795)Giteabot2024-01-153-0/+9
| | | | | | | | | | | | | Backport #28791 by @yp05327 panic: ![image](https://github.com/go-gitea/gitea/assets/18380374/7fcde2ad-1d42-4b60-b120-3b60a8926e8e) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/49d9f0ca-e590-4a35-8ca2-1317d1b7c939) Co-authored-by: yp05327 <576951401@qq.com>
* Fix when private user following user, private user will not be counted in ↵Giteabot2024-01-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | his own view (#28037) (#28792) Backport #28037 by @yp05327 Doer: asdasasdasasdasasdasasdasasdasasdasasdas (private user) Followed: TestUser (public user) Before: (From doer's view) ![image](https://github.com/go-gitea/gitea/assets/18380374/9ba16b3b-068c-43c5-a3dd-e3343b5b32f2) (From followed user's view, can see doer) ![image](https://github.com/go-gitea/gitea/assets/18380374/dfd1b564-d689-4393-b3d3-1e6bf52c94ba) After: (From doer's view) ![image](https://github.com/go-gitea/gitea/assets/18380374/1c85c1d1-c9f7-40c8-948c-145f7cae9a04) Co-authored-by: yp05327 <576951401@qq.com>
* Update github.com/cloudflare/circl (#28789) (#28790)Chongyi Zheng2024-01-152-2/+3
| | | | | | | | Backport #28789 cloudflare/circl: https://github.com/advisories/GHSA-9763-4f94-gfch Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Speed up loading the dashboard on mysql/mariadb (#28546) (#28784)Giteabot2024-01-151-3/+6
| | | | | | | Backport #28546 by @lunny Fixes #28155 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Modernize merge button (#28140) (#28786)Giteabot2024-01-153-63/+65
| | | | | | | | | | | | | | | | | | Backport #28140 by @earl-warren - Make use of the `form-fetch-action` for the merge button, which will automatically prevent the action from happening multiple times and show a nice loading indicator as user feedback while the merge request is being processed by the server. - Adjust the merge PR code to JSON response as this is required for the `form-fetch-action` functionality. - Resolves https://codeberg.org/forgejo/forgejo/issues/774 - Likely resolves the cause of https://codeberg.org/forgejo/forgejo/issues/1688#issuecomment-1313044 (cherry picked from commit 4ec64c19507caefff7ddaad722b1b5792b97cc5a) Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com> Co-authored-by: Gusted <postmaster@gusted.xyz>
* Fix schedule tasks bugs (#28691) (#28780)Lunny Xiao2024-01-1419-87/+203
| | | | | | | | | | | | | | Fix #28157 Backport #28691 This PR fix the possible bugs about actions schedule. - Move `UpdateRepositoryUnit` and `SetRepoDefaultBranch` from models to service layer - Remove schedules plan from database and cancel waiting & running schedules tasks in this repository when actions unit has been disabled or global disabled. - Remove schedules plan from database and cancel waiting & running schedules tasks in this repository when default branch changed.
* Require token for GET subscription endpoint (#28765) (#28778)Jack Hay2024-01-131-1/+4
| | | Backport #28765 for 1.21
* Assign pull request to project during creation (#28227) (#28775)Giteabot2024-01-122-1/+13
| | | | | | | | | | | | | | | | Backport #28227 by @denyskon When creating a pull request, allow directly assigning it to a project, as it is already possible for issues. After: ![grafik](https://github.com/go-gitea/gitea/assets/47871822/01dc2b3d-d56a-4053-b2fc-138725d7633a) --------- Co-authored-by: Denys Konovalov <kontakt@denyskon.de> Co-authored-by: delvh <dev.lh@web.de>
* Fix issue dependencies (#27736) (#28776)Giteabot2024-01-122-56/+55
| | | | | | | | | | | | | | | | | | | | | | | | | Backport #27736 by @lng2020 Fix #27722 Fix #27357 Fix #25837 Fix #28732 1. Fix the typo `BlockingByDependenciesNotPermitted`, which causes the `not permitted message` not to show. The correct one is `Blocking` or `BlockedBy` 2. Rewrite the perm check. The perm check uses a very tricky way to avoid duplicate checks for a slice of issues, which is confusing. In fact, it's also the reason causing the bug. It uses `lastRepoID` and `lastPerm` to avoid duplicate checks, but forgets to assign the `lastPerm` at the end of the code block. So I rewrote this to avoid this trick. ![I U1AT{GNFY3 1HZ`6L{(2L](https://github.com/go-gitea/gitea/assets/70063547/79acd02a-a567-4316-ae0d-11c6461becf1) 3. It also reuses the `blocks` slice, which is even more confusing. So I rewrote this too. ![UARFPXRGGZQFB7J$2`R}5_R](https://github.com/go-gitea/gitea/assets/70063547/f21cff0f-d9ac-4ce4-ae4d-adffc98ecd99) Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
* Fix button size in "attached header right" (#28770) (#28774)Giteabot2024-01-124-8/+9
| | | | | Backport #28770 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix `convert.ToTeams` on empty input (#28426) (#28767)Giteabot2024-01-122-26/+26
| | | | | | | | | Backport #28426 by @KN4CK3R Fixes #28420 Don't return `nil` if the input was empty. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Require token for GET subscription endpoint (#28765) (#28768)Giteabot2024-01-121-3/+3
| | | | | | | | | | | Backport #28765 by @jackHay22 Fixes #28756 ## Changes - Require and check API token for `GET /repos/{owner}/{repo}/subscription` in order to populate `ctx.Doer`. Co-authored-by: Jack Hay <jack@allspice.io>
* Show description as tooltip instead of title for labels (#28754) (#28766)Giteabot2024-01-121-2/+2
| | | | | | | | | | | | | | | | | Backport #28754 by @delvh Follow GitHubs behavior of showing the label description as a tooltip instead of the browser native title. ## Before ![grafik](https://github.com/go-gitea/gitea/assets/51889757/70448327-467b-4bee-b799-40a442a5ce16) ## After ![grafik](https://github.com/go-gitea/gitea/assets/51889757/abe7d700-148b-4cef-a487-6b0f8f20b212) Co-authored-by: delvh <dev.lh@web.de>
* Hide code related setting options in repository when code unit is disabled ↵Giteabot2024-01-112-19/+19
| | | | | | | | | | | | | | (#28631) (#28749) Backport #28631 by @lunny Since #20805, code can be hidden. However, the related settings are still shown even though they don't have any meaning then. https://github.com/go-gitea/gitea/assets/81045/5fdee54d-ac81-418a-82f7-eadff048cedd Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add -F to commit search to treat keywords as strings (#28744) (#28748)Giteabot2024-01-101-0/+3
| | | | | | | | | | | | | | | | | Backport #28744 by @me-heer Fixes #28269 The [default behavior](https://git-scm.com/docs/git-log#Documentation/git-log.txt---basic-regexp) of --grep in git log is to interpret the keyword as a regular expression. This causes the search to fail in the cases where the search keyword contains a `[`, since `[` is a special character used in grep. If we want our keywords to be interpreted as 'strings', we should use [-F flag](https://git-scm.com/docs/git-log#Documentation/git-log.txt---basic-regexp). Co-authored-by: Mihir Joshi <mihir67mj@gmail.com>
* Concatenate error in `checkIfPRContentChanged` (#28731) (#28737)Giteabot2024-01-091-0/+4
| | | | | | | | | | | | Backport #28731 by @earl-warren - If there's a error with the Git command in `checkIfPRContentChanged` the stderr wasn't concatendated to the error, which results in still not knowing why an error happend. - Adds concatenation for stderr to the returned error. - Ref: https://codeberg.org/forgejo/forgejo/issues/2077 Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com> Co-authored-by: Gusted <postmaster@gusted.xyz>
* Add download attribute to release attachments (#28739) (#28740)Giteabot2024-01-091-1/+1
| | | | | | | Backport #28739 by @JakobDev Fixes #28736 Co-authored-by: JakobDev <jakobdev@gmx.de>
* Suggest to use Type=simple for systemd service (#28717) (#28722)wxiaoguang2024-01-071-2/+1
| | | | | Backport #28717 (only the gitea.service sample) Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Fix incorrect URL for "Reference in New Issue" (#28716) (#28723)Giteabot2024-01-072-1/+21
| | | | | | | | | | | | | Backport #28716 by wxiaoguang Gitea prefers to use relative URLs in code (to make multiple domain work for some users) So it needs to use `toAbsoluteUrl` to generate a full URL when click "Reference in New Issues" And add some comments in the test code Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* 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>