summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix some UI problems (install/checkbox) (#30854) (#30870)Giteabot2024-05-064-158/+160
| | | | | Backport #30854 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Have time.js use UTC-related getters/setters (#30857) (#30869)Giteabot2024-05-064-17/+22
| | | | | | Backport #30857 by kemzeb Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com> Co-authored-by: Sam Fisher <fisher@3echelon.local>
* Do not show monaco JS errors (#30862) (#30866)Giteabot2024-05-061-11/+20
| | | | | | | Backport #30862 by wxiaoguang Fix #30861 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix issue/PR title edit (#30858) (#30865)Giteabot2024-05-057-137/+139
| | | | | | | | Backport #30858 by wxiaoguang 1. "enter" doesn't work (I think it is the last enter support for #14843) 2. if a branch name contains something like `&`, then the branch selector doesn't update Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add result check in TestAPIEditUser (#29674) (#30860)Giteabot2024-05-051-2/+5
| | | | | | | | | | Backport #29674 by @yp05327 Fix #29514 there are too many usage of `NewRequestWithValues`, so there's no need to check all of them. Just one is enough I think. Co-authored-by: yp05327 <576951401@qq.com>
* Fix markdown URL parsing for commit ID (#30812) (#30855)Giteabot2024-05-044-74/+115
| | | | | Backport #30812 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix no edit history after editing issue's title and content (#30814) (#30845)Giteabot2024-05-036-105/+56
| | | | | | | | | Backport #30814 by @yp05327 Fix #30807 reuse functions in services Co-authored-by: yp05327 <576951401@qq.com>
* Improve grep search (#30843) (#30850)Giteabot2024-05-036-8/+95
| | | | | | | | Backport #30843 by wxiaoguang Reduce the context line number to 1, make "git grep" search respect the include/exclude patter, and fix #30785 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Don't only list code-enabled repositories when using repository API (#30817) ↵Giteabot2024-05-032-3/+35
| | | | | | | | | | | (#30848) Backport #30817 by kemzeb We should be listing all repositories by default. Fixes #28483. Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com>
* Ignore useless error message "broken pipe" (#30801) (#30842)Giteabot2024-05-033-7/+4
| | | | | | | Backport #30801 by wxiaoguang Fix #30792 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix JS error on pull request page (#30838) (#30841)Giteabot2024-05-031-0/+1
| | | | | | | | | Backport #30838 by silverwind Fix this error seen on PR page, regression from https://github.com/go-gitea/gitea/pull/30803: Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve repo button row layout (#30668) (#30839)Giteabot2024-05-024-19/+52
| | | | | | | | | | | | | | | | | | | | | | | Backport #30668 by @silverwind Since there is now a second `<input>` in the repo buttons, we can make a better-looking layout with no empty space, except on mobile. Also I fixed one bug with focus border on clone panel. ## Large <img width="1163" alt="Screenshot 2024-04-23 at 22 25 22" src="https://github.com/go-gitea/gitea/assets/115237/8135a572-aa67-4672-ad49-b76b06890b52"> ## Medium <img width="870" alt="Screenshot 2024-04-23 at 22 25 34" src="https://github.com/go-gitea/gitea/assets/115237/9e93f61c-3315-4a78-8328-8cefad5b50fa"> ## Mobile <img width="416" alt="Screenshot 2024-04-23 at 22 25 52" src="https://github.com/go-gitea/gitea/assets/115237/859e341f-807a-48e6-8bcf-31715963216c"> Co-authored-by: silverwind <me@silverwind.io>
* Prevent automatic OAuth grants for public clients (#30790) (#30836)Giteabot2024-05-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #30790 by archer-321 This commit forces the resource owner (user) to always approve OAuth 2.0 authorization requests if the client is public (e.g. native applications). As detailed in [RFC 6749 Section 10.2](https://www.rfc-editor.org/rfc/rfc6749.html#section-10.2), > The authorization server SHOULD NOT process repeated authorization requests automatically (without active resource owner interaction) without authenticating the client or relying on other measures to ensure that the repeated request comes from the original client and not an impersonator. With the implementation prior to this patch, attackers with access to the redirect URI (e.g., the loopback interface for `git-credential-oauth`) can get access to the user account without any user interaction if they can redirect the user to the `/login/oauth/authorize` endpoint somehow (e.g., with `xdg-open` on Linux). Fixes #25061. Co-authored-by: Archer <archer@beezig.eu> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Catch and handle unallowed file type errors in issue attachment API (#30791) ↵Giteabot2024-05-035-2/+78
| | | | | | | | | | | (#30834) Backport #30791 by kemzeb Before, we would just throw 500 if a user passes an attachment that is not an allowed type. This commit catches this error and throws a 422 instead since this should be considered a validation error. Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com>
* Fix incorrect message id for release email (#30825) (#30833)Giteabot2024-05-033-8/+20
| | | | | | | | Backport #30825 by wxiaoguang Make generateMessageIDForRelease outputs the same format as generateMessageIDForIssue (old `createReference`) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add hover outline to heatmap squares (#30828) (#30832)Giteabot2024-05-021-0/+4
| | | | | | | | | | | | | | Backport #30828 by @silverwind Makes it easier to use because you see which square is currently hovered: <img width="314" alt="Screenshot 2024-05-02 at 15 38 20" src="https://github.com/go-gitea/gitea/assets/115237/3a15dad1-2259-4f28-9fae-5cf6ad3d8798"> I did try a `scoped` style for this, but that did not work for some reason. Co-authored-by: silverwind <me@silverwind.io>
* Upgrade chi-binding (#30826) (#30830)Giteabot2024-05-022-3/+3
| | | | | | | Backport #30826 by @lunny Front port #30742 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Improve context popup rendering (#30824) (#30829)Giteabot2024-05-022-8/+15
| | | | | | | | | | | | | | | | | | Backport #30824 by @silverwind Before, lot of empty space when no labels or body: <img width="281" alt="Screenshot 2024-05-02 at 13 51 29" src="https://github.com/go-gitea/gitea/assets/115237/8a980ccd-d53c-43a3-a059-dc8c614621e1"> After, empty space collapsed: <img width="306" alt="Screenshot 2024-05-02 at 13 51 16" src="https://github.com/go-gitea/gitea/assets/115237/8d9c154d-5de1-43d0-8536-afd9194d99b3"> All `<p>` (unsuitable) and `<small>` (discouraged in favor of css) tags are removed. Co-authored-by: silverwind <me@silverwind.io>
* Fix activity heat map padding & locale (#30823) (#30827)Giteabot2024-05-024-26/+31
| | | | | | | | Backport #30823 by wxiaoguang Fix #30808 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Fix rounded border for segment followed by pagination (#30809) (#30818)Giteabot2024-05-021-0/+1
| | | | | | | | Backport #30809 by @silverwind Fixes https://github.com/go-gitea/gitea/issues/30673, specifically https://github.com/go-gitea/gitea/issues/30673#issuecomment-2085329812. Co-authored-by: silverwind <me@silverwind.io>
* Fix issue card layout (#30800) (#30820)Giteabot2024-05-023-10/+19
| | | | | | | Backport #30800 by wxiaoguang Fix #30788 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix branch selector UI (#30803) (#30819)Giteabot2024-05-027-117/+96
| | | | | | | Backport #30803 by wxiaoguang Fix #30802 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Skip gzip for some well-known compressed file types (#30796) (#30813)Giteabot2024-05-023-1/+42
| | | | | | Backport #30796 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Fix markdown rendering when mentioning users (#30795) (#30810)Giteabot2024-05-024-10/+14
| | | | | Backport #30795 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix bleve fuzziness (#30799) (#30804)Giteabot2024-05-014-10/+16
| | | | | | | | Backport #30799 by wxiaoguang Fix #30797 Fix #30317 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix duplicate status check contexts (#30660) (#30779)Zettat1232024-05-012-25/+61
| | | | | | | | | | | | | | | | | | | | | Backport #30660. Caused by #30076. There may be some duplicate status check contexts when setting status checks for a branch protection rule. The duplicate contexts should be removed. Before: <img src="https://github.com/go-gitea/gitea/assets/15528715/97f4de2d-4868-47a3-8a99-5a180f9ac0a3" width="600px" /> After: <img src="https://github.com/go-gitea/gitea/assets/15528715/ff7289c5-9793-4090-ba31-e8cb3c85f8a3" width="600px" />
* Rework and fix stopwatch (#30732) (#30787)Giteabot2024-04-3011-113/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #30732 by @silverwind Fixes https://github.com/go-gitea/gitea/issues/30721 and overhauls the stopwatch. Time is now shown inside the "dot" icon and on both mobile and desktop. All rendering is now done by `<relative-time>`, the `pretty-ms` dependency is dropped. Desktop: <img width="557" alt="Screenshot 2024-04-29 at 22 33 27" src="https://github.com/go-gitea/gitea/assets/115237/3a46cdbf-6af2-4bf9-b07f-021348badaac"> Mobile: <img width="640" alt="Screenshot 2024-04-29 at 22 34 19" src="https://github.com/go-gitea/gitea/assets/115237/8a2beea7-bd5d-473f-8fff-66f63fd50877"> Note for tippy: Previously, tippy instances defaulted to "menu" theme, but that theme is really only meant for `.ui.menu`, so it was not optimal for the stopwatch popover. This introduces a unopinionated `default` theme that has no padding and should be suitable for all content. I reviewed all existing uses and explicitely set the desired `theme` on all of them. Co-authored-by: silverwind <me@silverwind.io>
* Improve logout from worker (#30775) (#30789)Giteabot2024-05-013-2/+13
| | | | | | | Backport #30775 by wxiaoguang A quick fix for #30756 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Get repo assignees and reviewers should ignore deactivated users (#30770) ↵65432024-04-303-8/+26
| | | | | | | | | | | | | (#30782) Backport #30770 If an user is deactivated, it should not be in the list of users who are suggested to be assigned or review-requested. old assignees or reviewers are not affected. --- *Sponsored by Kithara Software GmbH*
* Fix dashboard commit status null access (#30771) (#30786)Giteabot2024-04-301-2/+2
| | | | | | | Backport #30771 by wxiaoguang Fix #30768 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix cross-compilation errors when CGO_CFLAGS/CGO_LDFLAGS is set (#30749) ↵Giteabot2024-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#30774) Backport #30749 by @sryze When you cross-compile Gitea and you specify one of the envrionment variables related to C flags, cgo will fail to build the generator programs (e.g. generate-bindata) because GOOS and GOARCH are unset, but those additional flags variables are not unset together with those. To solve this issue, the simplest way that I've found is to disable cgo in the `go generate` command as it's not really used there. For example, I've had this problem with cross-compiling Gitea on FreeBSD x86_64 to ARMv7 where it's necessary to pass `--target` to `clang` via `CGO_CFLAGS`: ``` GOOS=freebsd \ GOARCH=arm \ GGOARM=7 \ CGO_ENABLED=1 \ SYSROOT=/usr/local/freebsd-sysroot/armv7 \ CC=clang \ CGO_CFLAGS="--target=armv7-unknown-freebsd13.2-gnueabihf" \ TAGS="bindata sqlite sqlite_unlock_notify" \ make SHELL='sh -x' build ``` ``` Running go generate... # runtime/cgo In file included from gcc_freebsd_amd64.c:9: In file included from /usr/include/signal.h:42: /usr/include/sys/_ucontext.h:44:2: error: unknown type name 'mcontext_t' modules/migration/schemas_bindata.go:8: running "go": exit status 1 # runtime/cgo In file included from gcc_freebsd_amd64.c:9: In file included from /usr/include/signal.h:42: /usr/include/sys/_ucontext.h:44:2: error: unknown type name 'mcontext_t' modules/options/options_bindata.go:8: running "go": exit status 1 # runtime/cgo In file included from gcc_freebsd_amd64.c:9: In file included from /usr/include/signal.h:42: /usr/include/sys/_ucontext.h:44:2: error: unknown type name 'mcontext_t' modules/public/public_bindata.go:8: running "go": exit status 1 # runtime/cgo In file included from gcc_freebsd_amd64.c:9: In file included from /usr/include/signal.h:42: /usr/include/sys/_ucontext.h:44:2: error: unknown type name 'mcontext_t' modules/templates/templates_bindata.go:8: running "go": exit status 1 gmake[1]: *** [Makefile:781: generate-go] Error 1 *** Error code 2 Stop. ``` But with this fix Gitea compiles successfully. Co-authored-by: Sergey Zolotarev <4525736+sryze@users.noreply.github.com>
* Fix issue label rendering in the issue popup (#30763) (#30773)Giteabot2024-04-305-48/+36
| | | | | Backport #30763 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Right align the "Settings" menu item in overflow-menu (#30764) (#30777)Giteabot2024-04-305-38/+39
| | | | | Backport #30764 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Rename CodeIndexerEnabled to IsRepoIndexerEnabled (#30762) (#30767)Giteabot2024-04-294-5/+5
| | | | | | | | | | Backport #30762 by @wxiaoguang Fix #30761 Most places use `IsRepoIndexerEnabled` but not `CodeIndexerEnabled`, so it should always use `IsRepoIndexerEnabled` for consistency. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix all rounded borders, change affected tab menus to pills (#30707) (#30769)Giteabot2024-04-2925-68/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #30707 by @silverwind Fixes https://github.com/go-gitea/gitea/issues/30673, all 23 issues. Notes: - Tab bar menus had to change to pills because of unsolvable issue with the border-radius as tab bar renders a overlapping border onto the box below. And I think pills look better. - Added padding to code editor empty preview message - Hide monaco's built-in blue focus border, we don't need it and it never showed before either. - Label add menu is simplified, removing the nested segment. <img width="1322" alt="Screenshot 2024-04-25 at 22 26 19" src="https://github.com/go-gitea/gitea/assets/115237/7e394e0c-b7ad-417d-8e9f-12f1dea93ed1"> <img width="1326" alt="Screenshot 2024-04-25 at 22 28 00" src="https://github.com/go-gitea/gitea/assets/115237/66c8499f-aa9f-4d95-8cca-ef13dfa82c65"> <img width="997" alt="Screenshot 2024-04-25 at 22 36 53" src="https://github.com/go-gitea/gitea/assets/115237/07896102-c71d-4246-8173-c2bc2e1d3cae"> <img width="832" alt="Screenshot 2024-04-25 at 22 56 09" src="https://github.com/go-gitea/gitea/assets/115237/d83afc96-08ca-4adc-baf4-3d02804be57c"> <img width="361" alt="Screenshot 2024-04-25 at 22 57 12" src="https://github.com/go-gitea/gitea/assets/115237/c7371a68-00b5-47d8-84d0-ddc5268b2b2c"> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix nil dereference on error (#30740) (#30746)wxiaoguang2024-04-292-4/+5
| | | | | Backport #30740 manually Co-authored-by: Chongyi Zheng <git@zcy.dev>
* Gitea with first upper case + typos (#30739) (#30747)Giteabot2024-04-281-4/+4
| | | | | | | | Backport #30739 by @mainboarder * Corrected gitea to Gitea * fixed some typos Co-authored-by: mainboarder <git@mainboarder.de>
* Fix documentation build problems because of MDX syntax conflicts (#30744) ↵Giteabot2024-04-282-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#30745) Backport #30744 by @lunny Documentation building has encountered a problem like below. This is because MDX syntax doesn't allow `{customPath}`, we have to use \`{customPath}\` ``` Error: Can't render static file for pathname "/next/administration/config-cheat-sheet" at generateStaticFile (/workspace/gitea/gitea-docusaurus/node_modules/@docusaurus/core/lib/ssg.js:119:15) at runNextTicks (node:internal/process/task_queues:60:5) at process.processImmediate (node:internal/timers:449:9) at async /workspace/gitea/gitea-docusaurus/node_modules/p-map/index.js:57:22 { [cause]: ReferenceError: CustomPath is not defined at _createMdxContent (server.bundle.js:4406:106) at MDXContent (server.bundle.js:10745:8) at Uc (server.bundle.js:264171:44) at Xc (server.bundle.js:264173:253) at Z (server.bundle.js:264179:89) at Yc (server.bundle.js:264182:98) at $c (server.bundle.js:264181:140) at Z (server.bundle.js:264179:345) at Xc (server.bundle.js:264177:231) at Z (server.bundle.js:264179:89) ``` Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Make Ctrl+Enter work for issue/comment edit (#30720)v1.22.0-rc1wxiaoguang2024-04-274-8/+13
| | | Fix #30710
* Rename migration package name for 1.22-rc1 (#30730)wxiaoguang2024-04-277-13/+14
| | | Ref: Propose to restart 1.22 release #30501
* Issue card improvements (#30687)silverwind2024-04-272-11/+16
| | | | | | | | | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/30682 and does a few improvements: - Use gap instead of margin/padding - Don't render empty image div - Remove `right floated` class that did nothing <img width="406" alt="Screenshot 2024-04-24 at 20 21 20" src="https://github.com/go-gitea/gitea/assets/115237/2fa88707-c2c4-40df-aee7-a684c3097ed0"> --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Don't show loading indicators when refreshing the system status (#30712)Yarden Shoham2024-04-271-1/+2
| | | | | Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Add some tests to clarify the "must-change-password" behavior (#30693)wxiaoguang2024-04-279-17/+81
| | | | | | | | | | Follow #30472: When a user is created by command line `./gitea admin user create`: Old behavior before #30472: the first user (admin or non-admin) doesn't need to change password. Revert to the old behavior before #30472
* Prevent allow/reject reviews on merged/closed PRs (#30686)Kemal Zebari2024-04-275-14/+119
| | | Resolves #30675.
* Update JS dependencies (#30713)silverwind2024-04-274-359/+349
| | | | | | | | - Update all JS dependencies - Remove [now-unnecessary](https://github.com/microsoft/monaco-editor/issues/4325) monaco workaround - Update stylelint config for new rule - Tested Monaco, Swagger UI, Mermaid
* Improve diff stats bar (#30669)silverwind2024-04-272-2/+2
| | | | | | | | | | | | | Minor tweaks: - Remove unnecessary `item` class which was causing unwanted padding to be added. - Add some padding and prevent wrapping so it looks better on mobile. - Increase width by 4px. <img width="116" alt="Screenshot 2024-04-24 at 00 15 07" src="https://github.com/go-gitea/gitea/assets/115237/1f1cf54c-8053-4297-b309-71d9c2ceb9ee"> <img width="441" alt="Screenshot 2024-04-24 at 00 14 57" src="https://github.com/go-gitea/gitea/assets/115237/2f3a33dc-edad-4b97-b64c-6812aae513cb">
* Remove unused parameter for some functions in `services/mirror` (#30724)Chongyi Zheng2024-04-272-5/+5
| | | Suggested by gopls `unusedparams`
* Update misspell to 0.5.1 and add `misspellings.csv` (#30573)silverwind2024-04-2734-82/+103
| | | | | | Misspell 0.5.0 supports passing a csv file to extend the list of misspellings, so I added some common ones from the codebase. There is at least one typo in a API response so we need to decided whether to revert that and then likely remove the dict entry.
* Suppress browserslist warning in webpack target (#30571)silverwind2024-04-271-2/+3
| | | | | | | | | | | | | | | | | 1. Set [`BROWSERSLIST_IGNORE_OLD_DATA`](https://github.com/browserslist/browserslist/blob/c6ddf7b3870a4585822d06ec77e8dd2401b8e1ed/node.js#L400) to avoid warning on outdated browserslist data which the end user can likely not do anything about and which is currently visible in the v1.21 branch. 2. Suppress all command echoing and add a "Running webpack..." message in place. Warning in question was this: ``` Browserslist: caniuse-lite is outdated. Please run: npx update-browserslist-db@latest Why you should do it regularly: https://github.com/browserslist/update-db#readme ```
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-271-0/+1
|