aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* use hosted runners for nightly actions (#27485)techknowlogick2023-10-062-3/+42
| | | | | | | | I'm temporarily unable to properly evaluate actuated runners, and so I'm switching back to hosted runners until I am able to focus on that again. --------- Co-authored-by: silverwind <me@silverwind.io>
* Avoid run change title process when the title is same (#27467)yp053272023-10-061-0/+4
| | | | | | | | | If user only changed the target branch or just did nothing and clicked the `Save` button, you will see the change log as following: ![image](https://github.com/go-gitea/gitea/assets/18380374/d30927dd-9227-4653-8fac-b890ef0b3f88) This makes no sense, so we should check whether the title is surely changed before run the `ChangeTitle`.
* Fix panic in storageHandler (#27446)Sergey Zolotarev2023-10-061-51/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | storageHandler() is written as a middleware but is used as an endpoint handler, and thus `next` is actually `nil`, which causes a null pointer dereference when a request URL does not match the pattern (where it calls `next.ServerHTTP()`). Example CURL command to trigger the panic: ``` curl -I "http://yourhost/gitea//avatars/a" ``` Fixes #27409 --- Note: the diff looks big but it's actually a small change - all I did was to remove the outer closure (and one level of indentation) ~and removed the HTTP method and pattern checks as they seem redundant because go-chi already does those checks~. You might want to check "Hide whitespace" when reviewing it. Alternative solution (a bit simpler): append `, misc.DummyOK` to the route declarations that utilize `storageHandler()` - this makes it return an empty response when the URL is invalid. I've tested this one and it works too. Or maybe it would be better to return a 400 error in that case (?)
* Rename the default themes to gitea-light, gitea-dark, gitea-auto (#27419)silverwind2023-10-0620-269/+308
| | | | | | | | | | | | | | | | | | | | | | | | | Part of https://github.com/go-gitea/gitea/issues/27097: - `gitea` theme is renamed to `gitea-light` - `arc-green` theme is renamed to `gitea-dark` - `auto` theme is renamed to `gitea-auto` I put both themes in separate CSS files, removing all colors from the base CSS. Existing users will be migrated to the new theme names. The dark theme recolor will follow in a separate PR. ## :warning: BREAKING :warning: 1. If there are existing custom themes with the names `gitea-light` or `gitea-dark`, rename them before this upgrade and update the `theme` column in the `user` table for each affected user. 2. The theme in `<html>` has moved from `class="theme-name"` to `data-theme="name"`, existing customizations that depend on should be updated. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Rephrase template documentation to be more clear about .gitea/template (#27450)Andrew Imeson2023-10-061-5/+8
| | | | | | | Closes #27336 --------- Co-authored-by: silverwind <me@silverwind.io>
* Remove redundant `len` check around loop (#27464)Eng Zer Jun2023-10-064-46/+32
| | | | | | | | | | | | | | | | | | | | This pull request is a minor code cleanup. From the Go specification (https://go.dev/ref/spec#For_range): > "1. For a nil slice, the number of iterations is 0." > "3. If the map is nil, the number of iterations is 0." `len` returns 0 if the slice or map is nil (https://pkg.go.dev/builtin#len). Therefore, checking `len(v) > 0` before a loop is unnecessary. --- At the time of writing this pull request, there wasn't a lint rule that catches these issues. The closest I could find is https://staticcheck.dev/docs/checks/#S103 Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2023-10-061-26/+131
|
* fix wording in SECURITY.md (#27463)Nuyube2023-10-061-1/+1
|
* Fix `Installation from package` doc (#27459)Nanguan Lin2023-10-051-12/+15
| | | | Fix the title size and add notes to the Gitea snap package. Related issue #27424, #27423, #27422, #27420
* Don't let API add 2 exclusive labels from same scope (#27433)JakobDev2023-10-053-1/+40
| | | Fixes #27380
* Refactor system setting (#27000)wxiaoguang2023-10-0521-507/+411
| | | | | | | | | This PR reduces the complexity of the system setting system. It only needs one line to introduce a new option, and the option can be used anywhere out-of-box. It is still high-performant (and more performant) because the config values are cached in the config system.
* [skip ci] Updated translations via CrowdinGiteaBot2023-10-0527-71/+275
|
* When comparing with an non-exist repository, return 404 but 500 (#27437)Lunny Xiao2023-10-041-1/+3
|
* Fix pr template (#27436)Lunny Xiao2023-10-041-1/+1
| | | Fix #27431
* Use minimal required version on CI and remove unnecessary services (#27429)Lunny Xiao2023-10-041-17/+3
|
* Fix missing `ctx` in new_form.tmpl (#27434)CaiCandong2023-10-041-2/+2
| | | | Fix #27432 Regression of #27265
* Use flex-container for repo and org settings (#27418)silverwind2023-10-044-6/+6
| | | | | | | | | | | Same as https://github.com/go-gitea/gitea/pull/26046 but for repo and org settings pages, reducing the margins between the boxes: <img width="1247" alt="Screenshot 2023-10-03 at 23 25 19" src="https://github.com/go-gitea/gitea/assets/115237/4e68ad5e-5fdc-4466-aefb-ec71bf411d45"> <img width="1255" alt="Screenshot 2023-10-03 at 23 27 12" src="https://github.com/go-gitea/gitea/assets/115237/9068369b-a75d-401e-8b8d-3bd4bbe097dc"> Co-authored-by: Giteabot <teabot@gitea.io>
* Fix yet another `ctx` template bug (#27417)delvh2023-10-041-1/+1
| | | Fixes #27416
* Add Index to `action.user_id` (#27403)JakobDev2023-10-033-1/+19
| | | | | | Another Column that needs a Index. Found at https://codeberg.org/forgejo/discussions/issues/61#issuecomment-1258744. Co-authored-by: Giteabot <teabot@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2023-10-041-0/+1
|
* Require MySQL 8.0, PostgreSQL 12, MSSQL 2012 (#27337)silverwind2023-10-038-210/+21
| | | | | | | | | | | | | | | | | | | | | | | - MySQL 5.7 support and testing is dropped - MySQL tests now execute against 8.1, up from 5.7 and 8.0 - PostgreSQL 10 and 11 support ist dropped - PostgreSQL tests now execute against 16, up from 15 - MSSQL 2008 support is dropped - MSSQL tests now run against locked 2022 version Fixes: https://github.com/go-gitea/gitea/issues/25657 Ref: https://endoflife.date/mysql Ref: https://endoflife.date/postgresql Ref: https://endoflife.date/mssqlserver ## :warning: BREAKING :warning: Support for MySQL 5.7, PostgreSQL 10 and 11, and MSSQL 2008 is dropped. You are encouraged to upgrade to supported versions. --------- Co-authored-by: techknowlogick <techknowlogick@gitea.com>
* Add 1.20.5 changelog (#27404) (#27411)Lunny Xiao2023-10-031-0/+27
| | | | | | | frontport #27404 --------- Co-authored-by: delvh <dev.lh@web.de>
* verify MinIO works with bitnami/minio:2023.8.31 (#27022)Earl Warren2023-10-031-3/+3
|
* Even more `db.DefaultContext` refactor (#27352)JakobDev2023-10-0397-294/+298
| | | | | | | | Part of #27065 --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: delvh <dev.lh@web.de>
* Don't use subselect in `DeleteIssuesByRepoID` (#27332)JakobDev2023-10-031-64/+79
| | | | | Part of https://codeberg.org/forgejo/discussions/issues/61 This is workaround for a bug in MariaDB
* Add support for HEAD ref in /src/branch and /src/commit routes (#27384)Kirill Sorokin2023-10-032-0/+24
| | | | | | | | | Add support for HEAD in paths: ``` /src/branch/HEAD/README.md /src/commit/HEAD/README.md ``` Closes #26920
* Make Actions tasks/jobs timeouts configurable by the user (#27400)Francesco Antognazza2023-10-024-9/+21
| | | | | | | | | | | | | | | | | | | With this PR we added the possibility to configure the Actions timeouts values for killing tasks/jobs. Particularly this enhancement is closely related to the `act_runner` configuration reported below: ``` # The timeout for a job to be finished. # Please note that the Gitea instance also has a timeout (3h by default) for the job. # So the job could be stopped by the Gitea instance if it's timeout is shorter than this. timeout: 3h ``` --- Setting the corresponding key in the INI configuration file, it is possible to let jobs run for more than 3 hours. Signed-off-by: Francesco Antognazza <francesco.antognazza@gmail.com>
* Fix git 2.11 error when checking IsEmpty (again) (#27399)wxiaoguang2023-10-021-1/+1
| | | | | | Follow #27393 Sorry that I made a mistake in #27393. The `errbuf` is not empty when the err is `exit status 129`.
* Differentiate between `push` and `pull` `mirror sync in progress` (#27390)delvh2023-10-023-5/+6
| | | | | | | | | | | Previously, if you had both a push and a pull mirror, the message did not clarify if you've accidentally synchronized the wrong one. Additionally fixed two typos that were encountered while debugging. ## Screenshots ![grafik](https://github.com/go-gitea/gitea/assets/51889757/164d5d20-728d-4365-9cb5-c37e95857cdf) ![grafik](https://github.com/go-gitea/gitea/assets/51889757/90bfffd2-abd4-4847-b8e2-db4231700a6d)
* Fix git 2.11 error when checking IsEmpty (#27393)wxiaoguang2023-10-021-1/+2
| | | Fix #27389
* fix: comment typo (#27388)246012023-10-021-1/+1
| | | fix a typo in the comment
* Test more templates for if they contain an error (#27367)Lunny Xiao2023-10-022-0/+53
|
* Document the line-number counting behavior (#27386)wxiaoguang2023-10-021-2/+7
| | | Ref #27377
* Remove upgrade from Gogs doc because the diverse has been 7 years and the ↵Lunny Xiao2023-10-024-405/+0
| | | | | code base changed totally (#27387) The documentation becomes no help since that but make people confusing.
* Fix incorrect Chinese translation of linked-references.zh-cn.md (#27382)Ayaka2023-10-021-1/+1
| | | | | | --- The original text "To address this" should be translated to "为了解决这个问题". "工单" looks like corresponds to "issue".
* link to file from its history (#27354)Denys Konovalov2023-10-024-12/+10
| | | | | | | | | Fixes #3852 Fixes https://github.com/go-gitea/gitea/issues/26707 Add a button on file history which directs you to the file at the selected commit. Co-authored-by: silverwind <me@silverwind.io>
* simplify issue deletion query (#27312)Earl Warren2023-10-022-47/+18
| | | | | | | | | | - There's no need for `In` to be used, as it's a single parameter that's being passed. Refs: https://codeberg.org/forgejo/forgejo/pulls/1521 (cherry picked from commit 4a4955f43ae7fc50cfe3b48409a0a10c82625a19) Co-authored-by: Gusted <postmaster@gusted.xyz>
* [skip ci] Updated licenses and gitignoresGiteaBot2023-10-0226-2/+406
|
* Cargo package - Fix missing domain in cargo sparse url (#27370)merlleu2023-10-011-1/+1
| | | | | | | | | | | | | | | | | | Hello, it seems that one my previous PR (adding the sparse index to the cargo package content page), did not worked as expected: the gitea-origin-url does not add the AppURL because of the `sparse+` prefix in the url. Currently the rendered page gives the following: ```toml [registry] default = "gitea" [registries.gitea] index = "sparse+/api/packages/ownername/cargo/" # Sparse index # index = "https://git.example.com/ownername/_cargo-index.git" # Git [net] git-fetch-with-cli = true ```
* Hide archived labels when filtering by labels on the issue list (#27115)puni98692023-10-0110-162/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup https://github.com/go-gitea/gitea/pull/26820 ## Archived labels UI for issue filter and issue filter actions for issues/pull request pages. Changed: * Enhanced the Issue filter and Issue filter actions UI page to seamlessly incorporate a list of archived labels. * Pagination functionality is same as before. If archived label checkbox is checked then we are adding a query string`archived=true` in the url to save the state of page. * Issue filter actions menu is separated into different template. * Adding the archived flag in issue url labels. * Pull Request page is also work the same. Outsourced: * Defer the implementation of specialized handling for archived labels to upcoming pull requests. This step will be undertaken subsequent to the successful merge of this pull request. Screenshots ### Issue page <img width="1360" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/d7efb2ef-5b2b-449d-83f0-d430a32ec432"> ### Issue page with label filter on archived label checkbox when not checked --> No archived label is there in list <img width="1249" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/ceea68ef-91f2-4693-910f-2e25e236bfc9"> ### Issue page with label filter on archived label checkbox when checked --> Show archived label in the list. <img width="710" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/2414d26b-2079-4c3c-bd9e-f2f5411bcabf"> ### Issue page with label filter on issue action menu on archived label checkbox when checked --> Show archived label in the list. <img width="409" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/259cac87-3e21-4778-99a2-a6a0b8c81178"> ### Applied the archived=true in Issue labels when archived checkbox is checked. <img width="984" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/657ce3db-c0ae-402e-b12d-3b580d3c2ed0"> --- Part of https://github.com/go-gitea/gitea/issues/25237 --------- Signed-off-by: puni9869 <punitinani1@hotmail.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Fix unexpected context canceled when migrating repository (#27368)CaiCandong2023-10-011-5/+5
| | | | | Fix #27363 Regression of #27089
* Fix ldap admin privileges update bug (#27051)CaiCandong2023-10-011-10/+7
| | | | | | | | | | | | When the user does not set a username lookup condition, LDAP will get an empty string `""` for the user, hence the following code ``` if isExist, err := user_model.IsUserExist(db.DefaultContext, 0, sr.Username) ``` The user presence determination will always be nonexistent, so updates to user information will never be performed. Fix #27049
* Allow get release download files and lfs files with oauth2 token format (#26430)Lunny Xiao2023-10-018-6/+66
| | | | Fix #26165 Fix #25257
* Fix missing ctx for GetRepoLink in dashboard (#27372)CaiCandong2023-10-011-1/+1
| | | | | As title Fix #27369 Regression of #27265
* highlight user details link (#26998)Denys Konovalov2023-10-012-3/+10
| | | | | | | | | | | | This PR adds a separated column in the users table for operations. The username link now redirects back to user page. ![grafik](https://github.com/go-gitea/gitea/assets/47871822/df8c8b30-3da6-443c-ae0f-6e3cac7dd9bb) Resolves https://github.com/go-gitea/gitea/pull/26713#pullrequestreview-1603001285 Co-authored-by: silverwind <me@silverwind.io>
* Feed UI Improvements (#27356)silverwind2023-09-302-13/+14
| | | | | | | | | | | | | | | | | Various improvements related to feeds: - Fix markdown rendering - Increase font size from 13px to default 14px via `flex-item` - Add style to hashes - Move the timestamp to title line. I realize it's not optimal for translation, we may need to change all these translations Before: <img width="768" alt="Screenshot 2023-09-29 at 22 52 58" src="https://github.com/go-gitea/gitea/assets/115237/edda8b84-23cf-4a43-90ad-a892798f4e6c"> After: <img width="781" alt="Screenshot 2023-09-29 at 22 58 09" src="https://github.com/go-gitea/gitea/assets/115237/7097474d-efcf-4f22-a2ab-834a4e25c4e8">
* Absolute positioned checkboxes overlay floated elements (#26870)Rafael Heard2023-09-301-10/+16
| | | | | | | | | | | | | | | | | | | | | | | Currently, checkboxes are positioned as absolute. This positioning causes the input to overlay an element that has been floated within the editor. Floated elements are useful if you want your text to wrap around this element. This PR fixes the overlaying of checkboxes by removing the absolute positioning, updating the `ul` padding, and displaying`.task-list-item` `flex` to ensure inputs and the associated label are on the same line. Screenshots: Before: <img width="762" alt="Screenshot 2023-09-01 at 3 40 59 PM" src="https://github.com/go-gitea/gitea/assets/6152817/570247c7-7f5c-4697-bfc9-ad4655e37991"> After: <img width="762" alt="Screenshot 2023-09-01 at 3 42 20 PM" src="https://github.com/go-gitea/gitea/assets/6152817/db53df45-1294-4eee-84c0-b21ac4fdf805"> --------- Co-authored-by: rafh <rafaelheard@gmail.com>
* Fix template bug (#27362)Lunny Xiao2023-09-301-1/+1
| | | Fix #27361
* [skip ci] Updated translations via CrowdinGiteaBot2023-09-302-0/+14
|
* Fix repo count in org action settings (#27245)yp053272023-09-293-0/+18
| | | | | | | | | | | | | | | | | | | | | | Only in org action settings, repo count is missing Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/4a74c090-c55f-4f06-810a-c390337efa9d) ![image](https://github.com/go-gitea/gitea/assets/18380374/e234f7e7-178c-4186-bbc0-0f291192b011) ![image](https://github.com/go-gitea/gitea/assets/18380374/c1db70cd-973b-40d5-ba17-1f354aed9149) In other setting page: ![image](https://github.com/go-gitea/gitea/assets/18380374/43bfec6b-a1a4-48a9-8280-ab6f967b7ec4) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/9a697bd8-ce9f-40e2-8749-b46726d68d84) ![image](https://github.com/go-gitea/gitea/assets/18380374/3b6d1e59-64dd-4655-953b-064718e6aa7a) ![image](https://github.com/go-gitea/gitea/assets/18380374/5604c063-556c-4252-8778-4e5a5e23b7e1)