aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use context parameter in services/repository (#23186)Jason Song2023-02-2829-100/+102
| | | | | | | | Use context parameter in `services/repository`. And use `cache.WithCacheContext(ctx)` to generate push action history feeds. Fix #23160
* Pass `--global` when calling `git config --get`, for consistency with `git ↵Philip Peterson2023-02-281-4/+4
| | | | | | | | config --set` (#23157) This arose out of #22451; it seems we are checking using non-global settings to see if a config value is set, in order to decide whether to call another global(-indeed) configuration command. This PR changes it so that both the check and the set are for global configuration.
* Make `gitea serv` respect git binary home (#23138)wxiaoguang2023-02-281-10/+15
| | | | | | | | | | | | | Close #23137 The old code is too old (8-9 years ago) Let's try to execute the git commands from git bin home directly. The verb has been checked above, it could only be: * git-upload-pack * git-upload-archive * git-receive-pack * git-lfs-authenticate
* Write Gitpod `app.ini` only once (#23192)Yarden Shoham2023-02-281-3/+6
| | | | | | | | | | | | | | Before this change, the `app.ini` would get overwritten on each workspace start, confusing Gitea. It asked for reinstallation each time. This makes sure the file is written only once by checking it does not exist before creating it. --- [Review without whitespace diff](https://github.com/go-gitea/gitea/pull/23192/files?w=1) --------- Co-authored-by: delvh <dev.lh@web.de>
* Avoid too long names for actions (#23162)Jason Song2023-02-283-2/+6
| | | | | The name of the job or step comes from the workflow file, while the name of the runner comes from its registration. If the strings used for these names are too long, they could cause db issues.
* [skip ci] Updated translations via CrowdinGiteaBot2023-02-2829-3003/+2331
|
* Change button text for commenting and closing an issue at the same time (#23135)wxiaoguang2023-02-272-1/+10
| | | | | | | | | Close #10468 Without SimpleMDE/EasyMDE, using Simple Textarea, the button text could be changed when content changes. After introducing SimpleMDE/EasyMDE, there is no code for updating the button text.
* Don't run unnecessary steps when only docs changed (#23103)Lunny Xiao2023-02-271-0/+21
| | | | | Remove some unnecessary steps from drone when only docs changed. ref: https://drone.gitea.io/go-gitea/gitea/68090/1/3
* Add word-break to sidebar-item-link (#23146)yp053272023-02-271-1/+1
| | | | | | | Fixes https://github.com/go-gitea/gitea/issues/22953 ![image](https://user-images.githubusercontent.com/18380374/221351117-1e4b8922-04ca-4717-8e3b-c338a61bc062.png) Co-authored-by: delvh <leon@kske.dev>
* Speed up HasUserStopwatch & GetActiveStopwatch (#23051)zeripath2023-02-274-39/+28
| | | | | | | | | | | | GetActiveStopwatch & HasUserStopwatch is a hot piece of code that is repeatedly called and on examination of the cpu profile for TestGit it represents 0.44 seconds of CPU time. This PR reduces this time to 80ms. --------- Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: delvh <leon@kske.dev>
* Add InsecureSkipVerify to Minio Client for Storage (#23166)Yarden Shoham2023-02-275-9/+28
| | | | | | | Allows using Minio with untrusted certificates Closes #23128 Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
* Fix Fomantic UI's `touchstart` fastclick, always use `click` for click ↵wxiaoguang2023-02-272-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | events (#23065) Using `touchstart` for `click` events is a black magic for mobile browsers (Google: `fastclick`). However, it causes many UX problems if the fastclick is used without careful design. Fomantic UI uses this fastclick for its `dimmer` and `dropdown`, it makes mobile users feel strange when they "touch" the dropdown menu. This PR uses a simple patch to fix that behavior. Then the Fomantic dropdown only uses `click` for click events. This PR is simple enough and won't cause hidden bugs even if the patch doesn't work. In the future, if there are more patches for Fomantic UI, the patches could be placed in a directory like `web_src/fomantic/patches/001-fix-click-touchstart`, etc. ![image](https://user-images.githubusercontent.com/2114189/220551915-bd28e8cc-507f-43c7-bb4a-b24f7ff3934d.png) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Remove useless comment in #23114 (#23173)Zettat1232023-02-271-1/+0
| | | | | | The `isAdmin` param is no longer used so the comment should be removed. https://github.com/go-gitea/gitea/blob/d27d36f2f4dd389050e613967ad2a5d02d250acc/routers/web/explore/repo.go#L36-L37
* Remove xin-u from maintainers (#23170)xin-u2023-02-271-1/+0
|
* Revert "[skip ci] Updated translations via Crowdin" (#23167)Lunny Xiao2023-02-2798-136529/+46506
|
* [skip ci] Updated translations via CrowdinGiteaBot2023-02-2798-46506/+136529
|
* Return 404 instead of 403 if user can not access the repo (#23155)yp053272023-02-261-1/+1
| | | | | | | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/23150 Before: ![image](https://user-images.githubusercontent.com/18380374/221390802-2317c6bc-d163-4def-b68b-6bb297143fe2.png) After: ![image](https://user-images.githubusercontent.com/18380374/221390823-87490351-39c3-4a40-b1d2-11fc5b85fa24.png) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [skip ci] Updated licenses and gitignoresGiteaBot2023-02-2632-0/+1144
|
* Fix secrets overview page missing from docs sidebar (#23143)Yarden Shoham2023-02-252-2/+2
| | | | | | | | | | | | | | | | There was a warning while building the docs: `Building sites … WARN 2023/02/25 08:56:37 "/workspace/gitea/docs/content/doc/secrets/overview.en-us.md:1:1": duplicate menu entry with identifier "overview" in menu "sidebar"`. ### Before ![image](https://user-images.githubusercontent.com/20454870/221348741-55cef254-f2ac-4507-9a66-818b406c668f.png) ### After ![image](https://user-images.githubusercontent.com/20454870/221348757-42066303-e1b7-43fe-9c4f-e05182fbabdd.png) Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
* Add "Reviewed by you" filter for pull requests (#22927)Brecht Van Lommel2023-02-249-7/+100
| | | | | | | | | | This includes pull requests that you approved, requested changes or commented on. Currently such pull requests are not visible in any of the filters on /pulls, while they may need further action like merging, or prodding the author or reviewers. Especially when working with a large team on a repository it's helpful to get a full overview of pull requests that may need your attention, without having to sift through the complete list.
* Projects: rename Board to Column in interface and improve consistency (#22767)Brecht Van Lommel2023-02-245-68/+70
|
* Fix DBConsistency checks on MSSQL (#23132)zeripath2023-02-241-4/+4
| | | | | | | | | | | | | Unfortunately xorm's `builder.Select(...).From(...)` does not escape the table names. This is mostly not a problem but is a problem with the `user` table. This PR simply escapes the user table. No other uses of `From("user")` where found in the codebase so I think this should be all that is needed. Fix #23064 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add pagination for dashboard and user activity feeds (#22937)Brecht Van Lommel2023-02-249-32/+81
| | | | Previously only the last few activities where available. This works for all activity and for activity on a date chosen on the heatmap.
* Update go.mod dependencies (#23126)zeripath2023-02-244-334/+144
| | | | | | | | | | | | | | This PR does a bulk update of a lot of our go deps. I have not included nektos/act and xorm for the following reasons: * Xorm updates can sometimes be complex and I'd rather do that in a separate PR * I think people more update with the actions code should double check that the latest nektos/act library works correctly. --------- Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Show empty repos in Admin Repository Management page (#23114)Zettat1232023-02-242-21/+23
| | | | | | | | | | | | | | | | | | | | | The **Admin Repository Management** page and the **Explore Repository** page both use the `RenderRepoSearch` function. In this function, the `OnlyShowRelevant` search option is `true` when querying repositories for admin page. https://github.com/go-gitea/gitea/blob/edf98a2dc30956c8e04b778bb7f1ce55c14ba963/routers/web/explore/repo.go#L99-L115 Refer to [#19361](https://github.com/go-gitea/gitea/pull/19361/files#diff-8058dfb85557010e0592d586675ec62ce406af7068e6311f39c160deac37f149R497), the repositories with `is_empty=true` will be hidden if `OnlyShowRelevant` is `true`. Administrators should be able to see all repositories. So `OnlyShowRelevant` shouldn't be set to `true` . --------- Co-authored-by: Andrew Thornton <art27@cantab.net>
* Redirect to the commit page after applying patch (#23056)yp053272023-02-241-6/+4
| | | | | Fixes https://github.com/go-gitea/gitea/issues/22621
* Bump go.etcd.io/bbolt and blevesearch deps (#23062)WÁNG Xuěruì2023-02-242-18/+15
| | | | | | | | This notably brings support for GOARCH=loong64, among other fixes. --------- Signed-off-by: WANG Xuerui <xen0n@gentoo.org> Co-authored-by: zeripath <art27@cantab.net>
* Fix height for sticky head on large screen on PR page (#23111)HesterG2023-02-241-10/+2
| | | | | | | | | | | | | | | Right now on the PR 'File Change' Tab, the file title header sticky to the top on large screens has wrong height, resulting in wrong ui behavior when scrolling down. This PR is to fix this. Before: <img width="964" alt="截屏2023-02-24 17 12 29" src="https://user-images.githubusercontent.com/17645053/221140409-025c4a84-6bbe-4b5b-a13f-bd2b79063522.png"> After: <img width="1430" alt="截屏2023-02-24 21 10 12" src="https://user-images.githubusercontent.com/17645053/221186750-0344d652-4610-4a90-a4c0-7f6269f950d6.png">
* Fix db.Find bug (#23115)Lunny Xiao2023-02-242-2/+50
| | | | | Caused by #20821 Fix #23110
* Avoid warning for system setting when start up (#23054)Lunny Xiao2023-02-2411-34/+43
| | | | | | | | | | | | | Partially fix #23050 After #22294 merged, it always has a warning log like `cannot get context cache` when starting up. This should not affect any real life but it's annoying. This PR will fix the problem. That means when starting up, getting the system settings will not try from the cache but will read from the database directly. --------- Co-authored-by: Lauris BH <lauris@nix.lv>
* Require approval to run actions for fork pull request (#22803)Jason Song2023-02-2410-16/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, Gitea will run actions automatically which are triggered by fork pull request. It's a security risk, people can create a PR and modify the workflow yamls to execute a malicious script. So we should require approval for first-time contributors, which is the default strategy of a public repo on GitHub, see [Approving workflow runs from public forks](https://docs.github.com/en/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks). Current strategy: - don't need approval if it's not a fork PR; - always need approval if the user is restricted; - don't need approval if the user can write; - don't need approval if the user has been approved before; - otherwise, need approval. https://user-images.githubusercontent.com/9418365/217207121-badf50a8-826c-4425-bef1-d82d1979bc81.mov GitHub has an option for that, you can see that at `/<owner>/<repo>/settings/actions`, and we can support that later. <img width="835" alt="image" src="https://user-images.githubusercontent.com/9418365/217199990-2967e68b-e693-4e59-8186-ab33a1314a16.png"> --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix nil context in RenderMarkdownToHtml (#23092)Zettat1232023-02-2413-23/+24
| | | | | | | | | | Fix #23082. This bug is caused by a nil context in https://github.com/go-gitea/gitea/issues/23082#issuecomment-1441276546 . --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add HesterG to maintainers (#23104)HesterG2023-02-241-1/+2
| | | | [List of mine merged PR](https://github.com/go-gitea/gitea/pulls?q=is%3Apr+author%3AHesterG+is%3Amerged+)
* improve FindProjects (#23085)yp053272023-02-241-10/+3
| | | | | | | | I found `FindAndCount` which can `Find` and `Count` in the same time Maybe it is better to use it in `FindProjects` --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Make issue meta dropdown support Enter, confirm before reloading (#23014)wxiaoguang2023-02-245-20/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the title. Label/assignee share the same code. * Close #22607 * Close #20727 Also: * partially fix for #21742, now the comment reaction and menu work with keyboard. * partially fix for #17705, in most cases the comment won't be lost. * partially fix for #21539 * partially fix for #20347 * partially fix for #7329 ### The `Enter` support Before, if user presses Enter, the dropdown just disappears and nothing happens or the window reloads. After, Enter can be used to select/deselect labels, and press Esc to hide the dropdown to update the labels (still no way to cancel .... maybe you can do a Cmd+R or F5 to refresh the window to discard the changes .....) This is only a quick patch, the UX is still not perfect, but it's much better than before. ### The `confirm` before reloading And more fixes for the `reload` problem, the new behaviors: * If nothing changes (just show/hide the dropdown), then the page won't be reloaded. * If there are draft comments, show a confirm dialog before reloading, to avoid losing comments. That's the best effect can be done at the moment, unless completely refactor these dropdown related code. Screenshot of the confirm dialog: <details> ![image](https://user-images.githubusercontent.com/2114189/220538288-e2da8459-6a4e-43cb-8596-74057f8a03a2.png) </details> --------- Co-authored-by: Brecht Van Lommel <brecht@blender.org> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix SyncOnCommit always return false in API of push_mirrors (#23088)sillyguodong2023-02-231-0/+1
| | | | | | | | | | Fix: #22990 --- Before, the return value of the api is always false,regrardless of whether the entry of `sync_on_commit` is true or false. I have confirmed that the value of `sync_on_commit` dropped into the database is correct. So, I think it is enough to make some small changes.
* Fix commit name in Apply Patch page (#23086)yp053272023-02-232-1/+4
| | | | Fixes https://github.com/go-gitea/gitea/issues/22621#issuecomment-1439309200
* Add wrapper to author to avoid long name ui problem (#23030)HesterG2023-02-232-7/+18
| | | | | | This PR is a possible solution for issue #22866. Main change is to add a `author-wrapper` class around author name, like the wrapper added to message. The `max-width` is set to 200px on PC, and 100px on mobile device for now.
* Avoid Hugo from adding quote to actions url (#23097)Sven2023-02-231-1/+1
|
* Remove all package data after tests (#22984)KN4CK3R2023-02-2316-9/+62
| | | | | | | | Fixes #21020 --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Change style to improve whitespaces trimming inside inline markdown code ↵HesterG2023-02-231-0/+1
| | | | | | | | | | | | | | | | | (#23093) Given mardown source ``` x ` a` y x `a ` y x ` a ` y ``` Render <img width="1421" alt="2023-02-23 15 33 14" src="https://user-images.githubusercontent.com/17645053/220844280-a304c788-ac79-4a26-a55a-0db00f2fb3f3.png"> Fixes #23080.
* Nest metadata in refactoring docs (#23087)techknowlogick2023-02-231-5/+5
| | | | | Whitespace was missing from refactoring docs metadata. backport label applied so it is included in versioned docs.
* Improve reverse proxies documentation (#23068)Joakim Pettersen2023-02-231-0/+20
| | | | | | | Add "Traefik with a sub-path" documentation closes #23047 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Improve accessibility for issue comments (#22612)Andre Polykanine2023-02-232-6/+6
| | | | | | | | | | | | Currently in Gitea issue comments are not marked up with headings. I'm trying to fix this by adding an appropriate [ARIA](https://www.w3.org/WAI/standards-guidelines/aria/) role for comment header and also by enclosing the comment itself in a semantical article element. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Wrap unless-check in docker manifests (#23079)John Olheiser2023-02-222-2/+2
| | | | | | | Should fix the following: > failed to render template: Evaluation error: Helper 'unless' called with wrong number of arguments, needed 2 but got 3 Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add accessibility to the menu on the navbar (#23059)HesterG2023-02-221-2/+2
| | | | | | | | This PR is trying to add accessibility to the menu as mentioned in #23053 so the menu can be accessed using keyboard (A quick demo is added below), with a reference to [PR2612](https://github.com/go-gitea/gitea/pull/22612). The goal is to make the menu accessible merely using keyboard like shown below. And this PR might need confirmation from developers using screen readers.
* Use minio/sha256-simd for accelerated SHA256 (#23052)zeripath2023-02-2224-24/+33
| | | | | | | | | | | | minio/sha256-simd provides additional acceleration for SHA256 using AVX512, SHA Extensions for x86 and ARM64 for ARM. It provides a drop-in replacement for crypto/sha256 and if the extensions are not available it falls back to standard crypto/sha256. --------- Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Fix some more hidden problems (#23074)wxiaoguang2023-02-223-6/+6
| | | Follows #22950
* Add sillyguodong to maintainers (#23067)v1.20.0-devv1.19.0-rc0sillyguodong2023-02-221-0/+1
| | | | [List of mine merged PR](https://github.com/go-gitea/gitea/pulls?q=is%3Apr+author%3Asillyguodong+is%3Amerged+)
* Improving CONTRIBUTING.md for backport details (#23057)wxiaoguang2023-02-221-3/+11
| | | | | | | See the changes. Two key points: * Necessary enhancements could be backported. * The backports shouldn't break downgrade between minor releases.