summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* More refactoring of `db.DefaultContext` (#27083)JakobDev2023-09-1583-320/+336
| | | Next step of #27065
* [skip ci] Updated translations via CrowdinGiteaBot2023-09-151-0/+4
|
* Reduce usage of `db.DefaultContext` (#27073)JakobDev2023-09-1483-324/+339
| | | | | | | | | | | | | | Part of #27065 This reduces the usage of `db.DefaultContext`. I think I've got enough files for the first PR. When this is merged, I will continue working on this. Considering how many files this PR affect, I hope it won't take to long to merge, so I don't end up in the merge conflict hell. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove the useless function `GetUserIssueStats` and move relevant tests to ↵Nanguan Lin2023-09-143-315/+82
| | | | | | | | | | | | | | | | | | | `indexer_test.go` (#27067) Since the issue indexer has been refactored, the issue overview webpage is built by the `buildIssueOverview` function and underlying `indexer.Search` function and `GetIssueStats` instead of `GetUserIssueStats`. So the function is no longer used. I moved the relevant tests to `indexer_test.go` and since the search option changed from `IssueOptions` to `SearchOptions`, most of the tests are useless now. We need more tests about the db indexer because those tests are highly connected with the issue overview webpage and now this page has several bugs. Any advice about those test cases is appreciated. --------- Co-authored-by: CaiCandong <50507092+CaiCandong@users.noreply.github.com>
* Fix issue templates when blank isses are disabled (#27061)JakobDev2023-09-142-11/+14
| | | | | | | | Fixes #27060 --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de>
* Display all user types and org types on admin management UI (#27050)Lunny Xiao2023-09-146-4/+32
| | | | | | | | | | Follow #24026 <img width="1049" alt="图片" src="https://github.com/go-gitea/gitea/assets/81045/d3fc5159-b5e7-411a-b6f8-4a111a027e6b"> --------- Co-authored-by: delvh <dev.lh@web.de>
* Apply lng2020 to maintainers (#27068)Nanguan Lin2023-09-141-0/+1
| | | | | | | | | Hi all, I've very much enjoyed working on Gitea and was hoping to make it official by requesting maintainership. My [merged PRs list](https://github.com/go-gitea/gitea/pulls?q=is%3Apr+sort%3Aupdated-desc+author%3Alng2020+is%3Amerged)
* Fix incorrect default branch label while switching between branches (#27053)yp053272023-09-142-9/+9
| | | Fix #27008
* set version in snapcraft yamltechknowlogick2023-09-131-1/+1
|
* Replace 'userxx' with 'orgxx' in all test files when the user type is org ↵Nanguan Lin2023-09-1491-280/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#27052) Currently 'userxx' and 'orgxx' are both used as username in test files when the user type is org, which is confusing. This PR replaces all 'userxx' with 'orgxx' when the user type is org(`user.type==1`). Some non-trivial changes 1. Rename `user3` dir to `org3` in `tests/git-repositories-meta` 2. Change `end` in `issue reference` because 'org3' is one char shorter than 'user3' ![ksnip_20230913-112819](https://github.com/go-gitea/gitea/assets/70063547/442988c5-4cf4-49b8-aa01-4dd6bf0ca954) 3. Change the search result number of `user/repo2` because `user3/repo21` can't be searched now ![ksnip_20230913-112931](https://github.com/go-gitea/gitea/assets/70063547/d9ebeba4-479f-4110-9a85-825efbc981fd) 4. Change the first org name getting from API because the result is ordered by alphabet asc and now `org 17` is before `org25` ![JW8U7NIO(J$H _YCRB36H)T](https://github.com/go-gitea/gitea/assets/70063547/f55a685c-cf24-40e5-a87f-3a2327319548) ![)KFD411O4I8RB5ZOH7E0 Z3](https://github.com/go-gitea/gitea/assets/70063547/a0dc3299-249c-46f6-91cb-d15d4ee88dd5) Other modifications are just find all and replace all. Unit tests with SQLite are all passed. --------- Co-authored-by: caicandong <1290147055@qq.com>
* [skip ci] Updated translations via CrowdinGiteaBot2023-09-141-0/+3
|
* Load reviewer before sending notification (#27063)sebastian-sauer2023-09-131-0/+3
| | | | | | | | The [template](https://github.com/go-gitea/gitea/blob/main/templates/mail/issue/default.tmpl#L51) uses the Reviewer.Name property - this was not loaded. Fixes #27035
* bump all nightly builds to 16gbtechknowlogick2023-09-131-3/+3
|
* Show the repo count in code tab on both user profile and org page. (#27048)puni98692023-09-131-0/+5
| | | | | | | | | | | | | | | | | | | | | as title Screenshot before User Profile page <img width="1367" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/24e79689-ba2f-4c85-b591-fe5621746965"> after <img width="1346" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/754a7ee8-c2f0-424d-9ba8-be38a48140aa"> Org page <img width="1354" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/c96178d8-664f-45c5-a162-f4df5690d9d0"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix Fomantic's line-height causing vertical scrollbars to appear (#26961)Kerwin Bryant2023-09-132-1/+11
| | | | | | | | | | | | | | | | | | Before: ![before](https://github.com/go-gitea/gitea/assets/3371163/bc5a3b20-3490-4e14-ab1d-2fcfbc4a2e20) After: ![after](https://github.com/go-gitea/gitea/assets/3371163/70e8be6a-11a2-46af-9e1e-78ac153cd2a4) --- 1. **Remove the scroll bar exception that in the a tag** 2. **Reduce the actual width of the a tag to the actual width of the content** ![c363a5b5883e105a0c65d7337893b50](https://github.com/go-gitea/gitea/assets/3371163/789d9b83-ad14-46d2-8a1b-df551a063f6a) As shown in the screenshot, the red box area should not be clickable
* Dashboard context dropdown position fix on landing page in mobile view. (#27047)puni98692023-09-131-6/+0
| | | | | | | | | | | | | as title. Screensots before ![image](https://github.com/go-gitea/gitea/assets/80308335/d72da379-1fb1-4d75-9f3e-f70e06ad4065) after ![image](https://github.com/go-gitea/gitea/assets/80308335/110ea806-feed-4947-bf56-2985b1e1ec5f)
* fix media description render for orgmode (#26895)Earl Warren2023-09-132-9/+34
| | | | | | | | | | | | | | | - In org mode you can specify an description for media via the following syntax `[[description][media link]]`. The description is then used as title or alt. - This patch fixes the rendering of the description by seperating the description and non-description cases and using `org.String()`. - Added unit tests. - Inspired by https://github.com/niklasfasching/go-org/blob/6eb20dbda93cb88c3503f7508dc78cbbc639378f/org/html_writer.go#L406-L427 - Resolves https://codeberg.org/Codeberg/Community/issues/848 (cherry picked from commit 8b8aab83113b34bade61964e2097ed497abc39e9) Co-authored-by: Gusted <postmaster@gusted.xyz>
* Show OpenID Connect and OAuth on signup page (#20242)Dmitry Sharshakov2023-09-134-0/+41
| | | | | | | | Fix #19809 --------- Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> Co-authored-by: jackHay22 <jack@allspice.io>
* Update status and code index after changing the default branch (#27018)Nanguan Lin2023-09-138-52/+97
| | | | | | | | | | | Fix #26723 Add `ChangeDefaultBranch` to the `notifier` interface and implement it in `indexerNotifier`. So when changing the default branch, `indexerNotifier` sends a message to the `indexer queue` to update the index. --------- Co-authored-by: techknowlogick <matti@mdranta.net>
* add sparse url in cargo package guide (#26937)merlleu2023-09-133-5/+14
| | | | | | | | | | | | | | Hello, The current package guide for cargo gives you only the git index, with the HTTP Index stabilized being used as default for crates.io and being better for most use-cases. However, it's not documented that gitea supports the sparse spec, and it does not require the _crates-index git repo for the sparse api. I personally think we should push users to use the sparse instead of the git repository. (Even let users disable crates-index repos if they only want to use sparse)
* Add missing 404 response to Swagger (#27038)JakobDev2023-09-1346-0/+750
| | | | | Most middleware throw a 404 in case something is not found e.g. a Repo that is not existing. But most API endpoints don't include the 404 response in their documentation. This PR changes this.
* Fix object storage path handling (#27024)wxiaoguang2023-09-132-14/+48
| | | | | | Object storage path rules: * No single `/` or `.`, use empty string for root path * Need to use trailing `/` for a list prefix to distinguish a "dir/"
* [skip ci] Updated translations via CrowdinGiteaBot2023-09-131-0/+22
|
* bump rootful to 16gbtechknowlogick2023-09-121-1/+1
|
* setup go in the nightly release pipelinetechknowlogick2023-09-121-0/+8
|
* Speed up nightly builds (#27045)techknowlogick2023-09-122-1/+37
| | | | | | | * Rootless/ful docker images build separately * Vendor go modules outside docker to speed up the build Thanks to Alex Ellis for these suggestions (and actuated runner build time)
* Improve repo/user/org search (#27030)wxiaoguang2023-09-123-10/+4
| | | | | | | | | | | | | | | * Fix a regression from #26809 (the `data-org` is missing) * Remove unnecessary style Screenshots: ![image](https://github.com/go-gitea/gitea/assets/2114189/3f5cf628-db7f-4705-898a-7a4a1fbfbba8) ![image](https://github.com/go-gitea/gitea/assets/2114189/453d1fad-1090-4524-bf45-6c5da2465f04) ![image](https://github.com/go-gitea/gitea/assets/2114189/f14d9808-7596-42c8-84b4-0d57a0bf2278)
* Use Actuated.dev runner for nightly buildstechknowlogick2023-09-121-2/+2
|
* update snap package (#27021)Sienna Lloyd2023-09-122-5/+7
|
* resolve issue with sort icons on admin/users and admin/runners (#24360)jladbrook2023-09-123-3/+19
| | | | Fixes #24327 to avoid the sort icon changing the table header over multiple lines and adds missing sort icons on the runners page.
* Add more package registry paths to the labeler (#27032)JakobDev2023-09-121-0/+3
| | | Found this while working on #26960
* Extract auth middleware from service (#27028)KN4CK3R2023-09-124-266/+262
| | | | | | Related #27027 Extract the router logic from `services/auth/middleware.go` into `routers/web` <-> `routers/common` <-> `routers/api`.
* S3: log human readable error on connection failure (#26856)Earl Warren2023-09-122-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | Should BucketExists (HeadBucket) fail because of an error related to the connection rather than the existence of the bucket, no information is available and the admin is left guessing. https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html > This action is useful to determine if a bucket exists and you have > permission to access it. The action returns a 200 OK if the bucket > exists and you have permission to access it. > > If the bucket does not exist or you do not have permission to access > it, the HEAD request returns a generic 400 Bad Request, 403 > Forbidden or 404 Not Found code. A message body is not included, so > you cannot determine the exception beyond these error codes. GetBucketVersioning is used instead and exclusively dedicated to asserting if using the connection does not return a BadRequest. If it does the NewMinioStorage logs an error and returns. Otherwise it keeps going knowing that BucketExists is not going to fail for reasons unrelated to the existence of the bucket and the permissions to access it. (cherry picked from commit d1df4b3bc62e5e61893a923f1c4b58f084eb03af) Refs: https://codeberg.org/forgejo/forgejo/issues/1338
* [skip ci] Updated translations via CrowdinGiteaBot2023-09-121-1/+1
|
* Fix "delete" modal dialog for issue/PR (#27015)wxiaoguang2023-09-113-3/+15
| | | | | | | | | | | Close #27012 By the way, rename the single-word ID to a long ID. ![image](https://github.com/go-gitea/gitea/assets/2114189/9f05ecc3-0a3d-4612-85e0-da60f7a45d2e) ![image](https://github.com/go-gitea/gitea/assets/2114189/9133808c-bd89-4265-99c5-83b986bd266f)
* Fix context cache bug & enable context cache for dashabord commits' authors ↵Lunny Xiao2023-09-118-87/+72
| | | | | | | | | | | (#26991) Unfortunately, when a system setting hasn't been stored in the database, it cannot be cached. Meanwhile, this PR also uses context cache for push email avatar display which should avoid to read user table via email address again and again. According to my local test, this should reduce dashboard elapsed time from 150ms -> 80ms .
* fix: typo (#27009)MomentQYC2023-09-111-1/+1
|
* Use secure cookie for HTTPS sites (#26999)wxiaoguang2023-09-114-5/+5
| | | | | | | | | | | If the AppURL(ROOT_URL) is an HTTPS URL, then the COOKIE_SECURE's default value should be true. And, if a user visits an "http" site with "https" AppURL, they won't be able to login, and they should have been warned. The only problem is that the "language" can't be set either in such case, while I think it is not a serious problem, and it could be fixed easily if needed. ![image](https://github.com/go-gitea/gitea/assets/2114189/7bc9a859-dcc1-467d-bc7c-1dd6a10389e3)
* Add fetch wrappers, ignore network errors in actions view (#26985)silverwind2023-09-114-28/+79
| | | | | | | | | | | | | | | 1. Introduce lightweight `fetch` wrapper functions that automatically sets csfr token, content-type and use it in `RepoActionView.vue`. 2. Fix a specific issue on `RepoActionView.vue` where a fetch network error is shortly visible during page reload sometimes. It can be reproduced by F5-in in quick succession on the actions view page and was also producing a red error box on the page. Once approved, we can replace all current `fetch` uses in UI with this in another PR. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2023-09-111-143/+284
|
* Add some more labels to labeler (#26987)silverwind2023-09-101-2/+9
| | | | | | | | - Add more automatic labels - Consistently use `**` glob for recursive directory globs. --------- Co-authored-by: techknowlogick <techknowlogick@gitea.com>
* Fix INI parsing for value with trailing slash (#26995)wxiaoguang2023-09-102-2/+20
| | | Fix #26977 (a temp fix)
* Correct the database.LOG_SQL default value in config cheat sheet (#26997)Infinoid2023-09-102-2/+2
| | | | | The default is false, fix the docs to reflect that. Fixes: #26989
* Improve "language stats" UI (#26968)wxiaoguang2023-09-105-144/+62
| | | | | | | | | | | Before: * The layout is quite complex * The UI flickers when switch the stats (https://try.gitea.io/) After: * Simplify the code * The UI doesn't flicker
* [skip ci] Updated translations via CrowdinGiteaBot2023-09-101-109/+216
|
* Update chroma to v2.9.1 (#26990)silverwind2023-09-092-3/+3
|
* Improve issue list layout (#26983)wxiaoguang2023-09-093-11/+26
| | | | | | | | Align everything with a new layout. * Use "baseline" for some special elements, the "flex-item-icon" is for the issue list only at the moment and I think it should be general enough now (but not using "flex-item-leading" anymore in this case). * Make the labels stretch themselves.
* [skip ci] Updated translations via CrowdinGiteaBot2023-09-092-22/+44
|
* Move some functions to service layer (#26969)Lunny Xiao2023-09-0822-748/+733
|
* Lock yamllint and update indirect python deps (#26979)silverwind2023-09-082-98/+108
| | | | I forgot to lock `yamllint` to exact version, so did that and regenerated `poetry.lock` as well.