Commit Graph

16576 Commits (forgejo)

Author SHA1 Message Date
Nanguan Lin da50be7360
Replace 'userxx' with 'orgxx' in all test files when the user type is org (#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'

3. Change the search result number of `user/repo2` because
`user3/repo21` can't be searched now

4. Change the first org name getting from API because the result is
ordered by alphabet asc and now `org 17` is before `org25`

Other modifications are just find all and replace all.
Unit tests with SQLite are all passed.


Co-authored-by: caicandong <>
2023-09-14 02:59:53 +00:00
GiteaBot d0318c4ae0 [skip ci] Updated translations via Crowdin 2023-09-14 00:22:27 +00:00
sebastian-sauer e116ad4500
Load reviewer before sending notification (#27063)
uses the Reviewer.Name property - this was not loaded.

Fixes #27035
2023-09-13 19:48:36 +00:00
techknowlogick 5d755ac6ae
bump all nightly builds to 16gb 2023-09-13 10:43:03 -04:00
puni9869 e0aacc7624
Show the repo count in code tab on both user profile and org page. (#27048)
as title

Screenshot before
User Profile page 
<img width="1367" alt="image"

<img width="1346" alt="image"

Org page
<img width="1354" alt="image"


Co-authored-by: wxiaoguang <>
2023-09-13 18:47:35 +08:00
Kerwin Bryant a38eca3f52
Fix Fomantic's line-height causing vertical scrollbars to appear (#26961)





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

As shown in the screenshot, the red box area should not be clickable
2023-09-13 09:08:45 +00:00
puni9869 0989f437df
Dashboard context dropdown position fix on landing page in mobile view. (#27047)
as title.





2023-09-13 15:15:36 +08:00
Earl Warren 79afd280e1
fix media description render for orgmode (#26895)
- 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
6eb20dbda9/org/html_writer.go (L406-L427)
- Resolves

(cherry picked from commit 8b8aab8311)

Co-authored-by: Gusted <>
2023-09-13 05:44:59 +00:00
Dmitry Sharshakov 63b53af933
Show OpenID Connect and OAuth on signup page (#20242)
Fix #19809


Signed-off-by: Dmitry Sharshakov <>
Co-authored-by: jackHay22 <>
2023-09-13 05:14:21 +00:00
Nanguan Lin cda97a7253
Update status and code index after changing the default branch (#27018)
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


Co-authored-by: techknowlogick <>
2023-09-13 04:43:31 +00:00
merlleu e6a059a3d0
add sparse url in cargo package guide (#26937)

The current package guide for cargo gives you only the git index, with
the HTTP Index stabilized being used as default for 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)
2023-09-13 12:14:10 +08:00
JakobDev aaeec2a392
Add missing 404 response to Swagger (#27038)
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.
2023-09-13 10:37:54 +08:00
wxiaoguang 8ecdc93f8b
Fix object storage path handling (#27024)
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/"
2023-09-13 01:18:52 +00:00
GiteaBot 7d56459c6c [skip ci] Updated translations via Crowdin 2023-09-13 00:22:36 +00:00
techknowlogick 3bebcb2e9c
bump rootful to 16gb 2023-09-12 15:26:41 -04:00
techknowlogick 2abbc43dff
setup go in the nightly release pipeline 2023-09-12 13:36:15 -04:00
techknowlogick c892ab0600
Speed up nightly builds (#27045)
* 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
2023-09-12 13:33:45 -04:00
wxiaoguang 739e47cd80
Improve repo/user/org search (#27030)
* Fix a regression from #26809 (the `data-org` is missing)
* Remove unnecessary style




2023-09-12 16:44:48 +00:00
techknowlogick e6b68c579b
Use runner for nightly builds 2023-09-12 12:15:05 -04:00
Sienna Lloyd e986265ecb
update snap package (#27021) 2023-09-12 12:47:53 +00:00
jladbrook e33f112e01
resolve issue with sort icons on admin/users and admin/runners (#24360)
Fixes #24327 to avoid the sort icon changing the table header over
multiple lines and adds missing sort icons on the runners page.
2023-09-12 12:26:51 +00:00
JakobDev e481638010
Add more package registry paths to the labeler (#27032)
Found this while working on #26960
2023-09-12 02:29:09 -04:00
KN4CK3R 591f586bf1
Extract auth middleware from service (#27028)
Related #27027

Extract the router logic from `services/auth/middleware.go` into
`routers/web` <-> `routers/common` <-> `routers/api`.
2023-09-12 08:15:16 +02:00
Earl Warren 7818121d50
S3: log human readable error on connection failure (#26856)
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.

> 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 d1df4b3bc6)

2023-09-12 10:19:39 +08:00
GiteaBot f599814001 [skip ci] Updated translations via Crowdin 2023-09-12 00:21:32 +00:00
wxiaoguang 1875362383
Fix "delete" modal dialog for issue/PR (#27015)
Close #27012

By the way, rename the single-word ID to a long ID.


2023-09-11 17:06:05 +00:00
Lunny Xiao ebff0513db
Fix context cache bug & enable context cache for dashabord commits' authors (#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 .
2023-09-11 10:14:01 +00:00
MomentQYC 598465eb43
fix: typo (#27009) 2023-09-11 09:30:18 +00:00
wxiaoguang 998cea5888
Use secure cookie for HTTPS sites (#26999)
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.

2023-09-11 17:03:51 +08:00
silverwind 6d96f0b0d1
Add fetch wrappers, ignore network errors in actions view (#26985)
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 <>
2023-09-11 10:25:10 +02:00
GiteaBot 148c9c4b05 [skip ci] Updated translations via Crowdin 2023-09-11 00:22:57 +00:00
silverwind 3442ea62cd
Add some more labels to labeler (#26987)
- Add more automatic labels
- Consistently use `**` glob for recursive directory globs.


Co-authored-by: techknowlogick <>
2023-09-10 19:54:20 +00:00
wxiaoguang e7745c94f8
Fix INI parsing for value with trailing slash (#26995)
Fix #26977 (a temp fix)
2023-09-10 16:15:51 +00:00
Infinoid de68953bac
Correct the database.LOG_SQL default value in config cheat sheet (#26997)
The default is false, fix the docs to reflect that.

Fixes: #26989
2023-09-10 15:45:06 +00:00
wxiaoguang dd6e8ab57b
Improve "language stats" UI (#26968)

* The layout is quite complex 
* The UI flickers when switch the stats (


* Simplify the code
* The UI doesn't flicker
2023-09-10 18:27:23 +08:00
GiteaBot a20e0affba [skip ci] Updated translations via Crowdin 2023-09-10 00:23:48 +00:00
silverwind 539ecc24a3
Update chroma to v2.9.1 (#26990) 2023-09-09 14:37:38 +00:00
wxiaoguang 58abd4f06c
Improve issue list layout (#26983)
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.
2023-09-09 20:23:57 +08:00
GiteaBot 049b9f3718 [skip ci] Updated translations via Crowdin 2023-09-09 00:21:42 +00:00
Lunny Xiao e3ed67859a
Move some functions to service layer (#26969) 2023-09-08 21:09:23 +00:00
silverwind b8ad558c93
Lock yamllint and update indirect python deps (#26979)
I forgot to lock `yamllint` to exact version, so did that and
regenerated `poetry.lock` as well.
2023-09-08 15:36:40 -04:00
silverwind 4693bdbda0
Chroma color tweaks (#26978) 2023-09-08 11:03:01 -05:00
Lunny Xiao 9c0a3532a4
Add a new column schedule_id for action_run to track (#26975)
Fix #26971 

And the UI now will display it's scheduled but not triggered by a push.

<img width="954" alt="图片"
2023-09-08 23:01:19 +08:00
wxiaoguang ffa4949eaa
Improve flex list UI (#26970)
1. There is already `gt-ac`, so no need to introduce `flex-item-center`
2. The `flex-item-baseline` and `.flex-item-icon svg { margin-top: 1px
}` seem to be a tricky patch, they don't resolve the root problem, and
still cause misalignment in some cases.
* The root problem is: the "icon" needs to align with the sibling
    * So, make the "icon" and the "title" both have the same height 
3. `flex-text-inline` could only be used if the element is really
"inline", otherwise its `vertical-align` would make the box size change.
In most cases, `flex-text-block` is good enough.



Co-authored-by: silverwind <>
Co-authored-by: Giteabot <>
2023-09-08 13:57:18 +00:00
wxiaoguang 4807f7be22
Clarify the git command Stdin hanging problem (#26967) 2023-09-08 13:20:38 +00:00
Lunny Xiao bafe1334c6
Add v1.20.4 changelog (#26974)
frontport from #26966


Co-authored-by: techknowlogick <>
2023-09-08 10:32:26 +00:00
wxiaoguang 80d14b8f4a
Check newly added node type before "attachDirAuto" (#26972) 2023-09-08 18:17:08 +08:00
zareck 4e240f2304
Expanding documentation in queue.go (#26889)
A set of terminology, along with a broader description, can help more
people engage with the Gitea queue system, providing insights and
ensuring its correct use.


Co-authored-by: wxiaoguang <>
2023-09-08 05:22:43 +00:00
Lunny Xiao 4f32abaf94
move repository deletion to service layer (#26948)
Co-authored-by: wxiaoguang <>
2023-09-08 04:51:15 +00:00
silverwind 3c0c279658
Add `yamllint` (#26965)
So that does not happen
again. Merge this after that PR. Config is based on


Co-authored-by: techknowlogick <>
2023-09-07 22:24:06 -04:00