f0d55e4819
Swap word order in Comment and Close ( #31148 ) ( #31165 )
...
Backport #31148 by @techknowlogick
Reduce accident closing of tickets only to re-open them right away. This
aligns the text on these buttons with what GitHub has.
Commit is authored by @LazyDodo, and was committed to the Blender fork
by @brechtvl
Background details:
https://projects.blender.org/infrastructure/gitea-custom/pulls/7
Co-authored-by: techknowlogick <techknowlogick@gitea.com >
Co-authored-by: Ray Molenkamp <github@lazydodo.com >
2024-05-30 01:07:27 +00:00
fb14ca30eb
Fix markup preview ( #31158 ) ( #31166 )
...
Backport #31158 by @wxiaoguang
Fix #31157
After:

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-30 02:38:30 +02:00
a672f066f7
Use vertical layout for multiple code expander buttons ( #31122 ) ( #31152 )
...
Backport #31122 by @silverwind
Fixes: https://github.com/go-gitea/gitea/issues/31068
- Now it only does a single call to `GetExpandDirection` per line
instead of multiples.
- Exposed `data-expand-direction` to frontend so it can correctly size
the buttons (it's a pain to do in tables).
<img width="142" alt="Screenshot 2024-05-27 at 20 44 56"
src="https://github.com/go-gitea/gitea/assets/115237/8b0b45a6-8e50-4081-8822-5e0775d8d941 ">
<img width="142" alt="Screenshot 2024-05-27 at 20 44 51"
src="https://github.com/go-gitea/gitea/assets/115237/b7ba2c57-8f55-4e9f-9606-c96d16b77892 ">
<img width="132" alt="Screenshot 2024-05-27 at 20 44 46"
src="https://github.com/go-gitea/gitea/assets/115237/0e838fb8-5e8c-4250-9843-a68b88d5418b ">
<img width="80" alt="Screenshot 2024-05-27 at 20 44 33"
src="https://github.com/go-gitea/gitea/assets/115237/da6c7f83-c160-4389-8ab2-889d0568cbe8 ">
<img width="80" alt="Screenshot 2024-05-27 at 20 44 26"
src="https://github.com/go-gitea/gitea/assets/115237/cdb490b2-5040-484a-92e5-46fc5e37c199 ">
<img width="78" alt="Screenshot 2024-05-27 at 20 44 20"
src="https://github.com/go-gitea/gitea/assets/115237/d2978ab0-764e-41ff-922c-25f8fe749f28 ">
Would backport as trivial enhancement.
Co-authored-by: silverwind <me@silverwind.io >
2024-05-29 09:06:34 +02:00
c6189cfcb9
Add an immutable tarball link to archive download headers for Nix ( #31139 ) ( #31145 )
...
Backport #31139 by @Mic92
This allows `nix flake metadata` and nix in general to lock a *branch*
tarball link in a manner that causes it to fetch the correct commit even
if the branch is updated with a newer version.
For further context, Nix flakes are a feature that, among other things,
allows for "inputs" that are "github:someuser/somerepo",
"https://some-tarball-service/some-tarball.tar.gz ",
"sourcehut:~meow/nya" or similar. This feature allows our users to fetch
tarballs of git-based inputs to their builds rather than using git to
fetch them, saving significant download time.
There is presently no gitea or forgejo specific fetcher in Nix, and we
don't particularly wish to have one. Ideally (as a developer on a Nix
implementation myself) we could just use the generic tarball fetcher and
not add specific forgejo support, but to do so, we need additional
metadata to know which commit a given *branch* tarball represents, which
is the purpose of the Link header added here.
The result of this patch is that a Nix user can specify
`inputs.something.url =
"https://forgejo-host/some/project/archive/main.tar.gz "` in flake.nix
and get a link to some concrete tarball for the actual commit in the
lock file, then when they run `nix flake update` in the future, they
will get the latest commit in that branch.
Example of it working locally:
» nix flake metadata --refresh
'http://localhost:3000/api/v1/repos/jade/cats/archive/main.tar.gz?dir=configs/nix '
Resolved URL:
http://localhost:3000/api/v1/repos/jade/cats/archive/main.tar.gz?dir=configs/nix
Locked URL:
http://localhost:3000/api/v1/repos/jade/cats/archive/804ede182b6b66469b23ea4d21eece52766b7a06.tar.gz?dir=configs
/nix&narHash=sha256-yP7KkDVfuixZzs0fsqhSETXFC0y8m6nmPLw2GrAMxKQ%3D
Description: Computers with the nixos
Path: /nix/store/s856c6yqghyan4v0zy6jj19ksv0q22nx-source
Revision: 804ede182b6b66469b23ea4d21eece52766b7a06
Last modified: 2024-05-02 00:48:32
For details on the header value, see:
https://github.com/nixos/nix/blob/56763ff918eb308db23080e560ed2ea3e00c80a7/doc/manual/src/protocols/tarball-fetcher.md
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com >
Co-authored-by: Jade Lovelace <software@lfcode.ca >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-29 01:34:14 +00:00
42b2541cb5
Update demo site location from try.gitea.io -> demo.gitea.com ( #31054 ) ( #31146 )
...
Backport #31054 by @lunny
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2024-05-29 01:05:07 +00:00
9c93c6249c
Remove duplicate ProxyPreserveHost in Apache httpd doc ( #31143 ) ( #31147 )
...
Backport #31143 by @HorlogeSkynet
---
(fix up for #31003 )
Co-authored-by: Samuel FORESTIER <HorlogeSkynet@users.noreply.github.com >
2024-05-29 08:54:14 +08:00
b615a59db8
Improve mobile review ui ( #31091 ) ( #31136 )
...
Backport #31091 by @silverwind
Fixes: https://github.com/go-gitea/gitea/issues/31071
Not perfect but much better than before.
Before: Overflows, sticky not working, filename unreadable:
<img width="506" alt="Screenshot 2024-05-27 at 02 02 40"
src="https://github.com/go-gitea/gitea/assets/115237/a06b1edf-dece-4402-98c2-68670fca265f ">
After:
<img width="457" alt="Screenshot 2024-05-27 at 01 59 06"
src="https://github.com/go-gitea/gitea/assets/115237/2a282c96-e719-4554-b418-81963ae6269c ">
Co-authored-by: silverwind <me@silverwind.io >
2024-05-28 14:10:01 +00:00
e6bacf1fed
Add missed return after ctx.ServerError ( #31130 ) ( #31133 )
...
Backport #31130 by @lunny
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2024-05-28 12:47:11 +02:00
d6ae2b3c4e
Fix API repository object format missed ( #31118 ) ( #31132 )
...
Backport #31118 by @lunny
Fix #31117
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2024-05-28 09:59:56 +00:00
447b3e2475
Fix DashboardRepoList margin ( #31121 ) ( #31128 )
...
Backport #31121 by @silverwind
Fixes: https://github.com/go-gitea/gitea/issues/31115
<img width="476" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/ba508ba9-b02d-47c6-ad9f-495101c81330 ">
Co-authored-by: silverwind <me@silverwind.io >
2024-05-28 17:12:15 +08:00
7ecb1d63bb
Move documents under actions ( #31110 ) ( #31116 )
...
Backport #31110 by @lunny
Move secrets and badge under actions
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2024-05-27 23:05:49 +08:00
b0981f6509
Fix missing memcache import ( #31105 ) ( #31109 )
...
Backport #31105 by wxiaoguang
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-27 14:23:47 +00:00
7f706bd171
Update pip related commands for docker ( #31106 ) ( #31111 )
...
Backport #31106 by wxiaoguang
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-27 21:54:19 +08:00
b903e2b753
Prevent tab shifting, remove extra margin on fluid pages ( #31090 ) ( #31099 )
...
Backport #31090 by @silverwind
1. Extend concept of https://github.com/go-gitea/gitea/pull/29831 to all
tabular menus, there were only three left that weren't already
`<overflow-menu>`.
<img width="634" alt="Screenshot 2024-05-27 at 00 42 16"
src="https://github.com/go-gitea/gitea/assets/115237/d9a7e219-d05e-40a1-9e93-777f9a8a90dd ">
<img width="965" alt="Screenshot 2024-05-27 at 00 29 32"
src="https://github.com/go-gitea/gitea/assets/115237/e6ed71b1-11fb-4a74-9adb-af4524286cff ">
2. Remove extra padding on `fluid padded` container like for example PR
diff view. The page margin is already correctly sized via
`.ui.container`, so this was just extraneous padding that looked ugly.
Before:
<img width="1351" alt="Screenshot 2024-05-27 at 00 45 11"
src="https://github.com/go-gitea/gitea/assets/115237/4b45fd11-b1b2-4fbb-a618-26eb22be9472 ">
After:
<img width="1344" alt="Screenshot 2024-05-27 at 00 45 22"
src="https://github.com/go-gitea/gitea/assets/115237/d09593eb-6c7f-45e7-85b6-f0050047004b ">
3. Replace `gt-word-break` with `tw-break-anywhere` in issue-title,
fixing overflow.
Before:
<img width="1333" alt="Screenshot 2024-05-27 at 00 50 14"
src="https://github.com/go-gitea/gitea/assets/115237/64d15d04-b456-401e-a972-df636965f0eb ">
After:
<img width="1316" alt="Screenshot 2024-05-27 at 00 50 26"
src="https://github.com/go-gitea/gitea/assets/115237/ed1ce830-1408-414b-8263-eeaf773f52c8 ">
Co-authored-by: silverwind <me@silverwind.io >
2024-05-27 07:41:10 +00:00
0e70f73055
Fix border radius on hovered secondary menu ( #31089 ) ( #31097 )
...
Backport #31089 by @silverwind
Presumably a regression from
https://github.com/go-gitea/gitea/pull/30325 , these menus were showing a
border radius on hover, which is fixed with this change.
<img width="154" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/eafdc1c5-3cf5-48d1-86c4-21c58f92cfaf ">
Co-authored-by: silverwind <me@silverwind.io >
2024-05-27 07:07:16 +00:00
e0b7938d74
Fix possible ui 500 if workflow's job is nil ( #31092 ) ( #31098 )
...
Backport #31092 by @lunny
Fix #31087
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2024-05-27 14:13:15 +08:00
Giteabot and GitHub
02b947a15f
Fix View File button link if branch deleted on pull request files pages ( #31063 ) ( #31077 )
2024-05-26 14:07:17 +00:00
Giteabot and GitHub
7b7318255e
Change --border-radius-circle to --border-radius-full ( #30936 ) ( #31078 )
2024-05-26 13:16:13 +00:00
1171b24d52
Make gitea webhooks openproject compatible ( #28435 ) ( #31081 )
...
Backport #28435 by Chief-Detektor
Co-authored-by: André Rosenhammer <andre.rosenhammer@gmail.com >
2024-05-26 12:53:42 +08:00
7d56ee3c0f
Support setting the default attribute of the issue template dropdown field ( #31045 ) ( #31059 )
...
Backport #31045 by @Zettat123
Fix #31044
According to [GitHub issue template
documentation](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-for-dropdown ),
the `default` attribute can be used to specify the preselected option
for a dropdown field.
Co-authored-by: Zettat123 <zettat123@gmail.com >
2024-05-24 11:01:09 +08:00
2e90b80d64
Alpine 3.20 has been released ( #31047 ) ( #31057 )
...
Backport #31047 by @techknowlogick
Co-authored-by: techknowlogick <techknowlogick@gitea.com >
2024-05-23 08:36:34 -04:00
Giteabot and GitHub
14ed06d675
align s3 files with docker naming ( #31050 ) ( #31052 )
2024-05-22 20:06:52 -04:00
cc51f70d86
Update Actions documentation missing feature ( #31034 ) ( #31048 )
...
Backport #31034 by @lunny
Fix
https://github.com/go-gitea/gitea/issues/25897#issuecomment-2117145391
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: yp05327 <576951401@qq.com >
2024-05-22 15:04:40 +00:00
7d5ac68bc4
Sync up deleted branches & action assets related cleanup documentation ( #31022 ) ( #31049 )
...
Backport #31022 by @kemzeb
Syncs up docs associated to actions and deleted branch cleanup i.e. in
custom/app.example.ini and the config cheat sheet.
Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com >
2024-05-22 11:02:34 -04:00
2648962ae0
Fix automerge will not work because of some events haven't been triggered ( #30780 ) ( #31039 )
...
Backport #30780 by @lunny
Replace #25741
Close #24445
Close #30658
Close #20646
~Depends on #30805~
Since #25741 has been rewritten totally, to make the contribution
easier, I will continue the work in this PR. Thanks @6543
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: 6543 <6543@obermui.de >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-22 02:08:05 +00:00
e3390e2441
use existing oauth grant for public client ( #31015 ) ( #31042 )
...
Backport #31015 by @denyskon
Do not try to create a new authorization grant when one exists already,
thus preventing a DB-related authorization issue.
Fix https://github.com/go-gitea/gitea/pull/30790#issuecomment-2118812426
Co-authored-by: Denys Konovalov <kontakt@denyskon.de >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2024-05-21 17:32:31 +00:00
27a4c67992
Don't include link of deleted branch when listing branches ( #31028 ) ( #31032 )
...
Backport #31028 by @kemzeb
From
https://github.com/go-gitea/gitea/issues/31018#issuecomment-2119622680 .
This commit removes the link to a deleted branch name because it returns
a 404 while it is in this deleted state. GitHub also throws a 404 when
navigating to a branch link that was just deleted, but this deleted
branch is removed from the branch list after a page refresh. Since with
Gitea this deleted branch would be kept around for quite some time
(well, until the "cleanup deleted branches" cron job begins), it makes
sense to not have this as a link that users can navigate to.
Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com >
2024-05-21 15:51:36 +08:00
55cb356b84
Refactor sha1 and time-limited code ( #31023 ) ( #31030 )
...
Backport #31023 by wxiaoguang
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-21 00:58:21 +08:00
8a259e54c5
Return access_denied error when an OAuth2 request is denied ( #30974 ) ( #31029 )
...
Backport #30974 by Zettat123
Co-authored-by: Zettat123 <zettat123@gmail.com >
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2024-05-20 22:49:04 +08:00
8663a351d1
Fix incorrect "blob excerpt" link when comparing files ( #31013 ) ( #31026 )
...
Backport #31013 by wxiaoguang
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-20 07:40:14 +00:00
3d3123d553
Avoid 500 panic error when uploading invalid maven package file ( #31014 ) ( #31027 )
...
Backport #31014 by wxiaoguang
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-20 07:10:27 +00:00
a798a1eb17
Fix project column title overflow ( #31011 ) ( #31025 )
...
Backport #31011 by wxiaoguang
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-20 06:17:21 +00:00
d17bfad940
Fix data-race during testing ( #30999 ) ( #31024 )
...
Backport #30999 by wxiaoguang
Fix #30992
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-20 13:49:24 +08:00
8446caa813
Fix bug on avatar ( #31008 ) ( #31019 )
...
Backport #31008 by @lunny
Extract from #30995
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: silverwind <me@silverwind.io >
2024-05-20 02:54:53 +00:00
ab33b7849f
Fix "force private" logic ( #31012 ) ( #31021 )
...
Backport #31012 by wxiaoguang
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-20 10:27:52 +08:00
a58498cc43
Improve reverse proxy documents and clarify the AppURL guessing behavior ( #31003 ) ( #31020 )
...
Backport #31003 by wxiaoguang
Fix #31002
1. Mention Make sure `Host` and `X-Fowarded-Proto` headers are correctly passed to Gitea
2. Clarify the basic requirements and move the "general configuration" to the top
3. Add a comment for the "container registry"
4. Use 1.21 behavior if the reverse proxy is not correctly configured
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2024-05-19 15:22:54 +00:00
8eac16de21
Simplify mirror repository API logic ( #30963 ) ( #31009 )
...
Backport #30963 by wxiaoguang
Fix #30921
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-18 08:26:20 +00:00
bd3787c774
Fix JS error when editing a merged PR's title ( #30990 ) ( #31001 )
...
Backport #30990 by @wxiaoguang
Regression of Fix issue/PR title edit (#30858 )
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-17 01:07:09 +00:00
f0e74da719
Upgrade tqdm dependency ( #30996 ) ( #31000 )
...
Backport #30996 by @silverwind
Result of `make update-py`
Fixes: https://github.com/go-gitea/gitea/security/dependabot/65
Co-authored-by: silverwind <me@silverwind.io >
2024-05-17 02:39:39 +02:00
835411b978
template: label fix correct input id ( #30987 ) ( #30997 )
...
Just a small commit to fix a wrong label for id.
Thanks and cheers!
Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu >
Co-authored-by: Frank Villaro-Dixon <frank@vi-di.fr >
2024-05-16 08:45:52 -05:00
3cdf9ed202
Put web editor into a segment ( #30966 ) ( #30993 )
...
Backport #30966 by silverwind
Co-authored-by: silverwind <me@silverwind.io >
2024-05-16 07:03:45 +00:00
0c9dcda10d
Check if the release is converted from the tag when updating the release ( #30984 ) ( #30986 )
...
We should call `notify_service.NewRelease` when a release is created
from an existing tag.
Co-authored-by: Zettat123 <zettat123@gmail.com >
2024-05-15 16:34:38 -05:00
cb52eb639e
Remove unnecessary double quotes on language file ( #30977 ) ( #30979 )
...
Backport #30977 by @lunny
The double quotes and the prefix/suffix space are unnecessary.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2024-05-15 11:00:58 +02:00
5b7e54f72f
Always load or generate oauth2 jwt secret ( #30942 ) ( #30978 )
...
Backport #30942 by @wxiaoguang
Fix #30923
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-14 15:00:38 +00:00
042777abd7
Filter out duplicate action(activity) items for a repository ( #30957 ) ( #30976 )
...
Backport #30957
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-14 14:14:39 +00:00
8393ff78fc
Protected tag is no internal server error ( #30962 ) ( #30970 )
...
Backport #30962 by @KN4CK3R
Fixes #30959
Adds an API test for protected tags.
Fix existing tag in combination with fixtures.
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2024-05-14 07:15:36 +00:00
c1337e7316
Restyle release list, fix branch dropdown ( #30837 ) ( #30968 )
...
Backport #30837 by @silverwind
Fixes https://github.com/go-gitea/gitea/issues/30821 and restyles the
release list.
Desktop:
<img width="1199" alt="Screenshot 2024-05-02 at 20 46 10"
src="https://github.com/go-gitea/gitea/assets/115237/bee92423-d4a9-4b26-8301-3a1e09eef4cd ">
Mobile:
<img width="443" alt="Screenshot 2024-05-02 at 20 46 21"
src="https://github.com/go-gitea/gitea/assets/115237/42ecbae5-bdb6-4b16-a0ee-9c64daede68d ">
Co-authored-by: silverwind <me@silverwind.io >
2024-05-13 22:00:52 +00:00
70eaa99ac0
fix: change npm scope registry ( #30964 ) ( #30965 )
...
Backport #30964 by @llxlr
https://docs.npmjs.com/cli/v10/using-npm/scope#associating-a-scope-with-a-registry
Co-authored-by: james yang <yanghongday369@gmail.com >
2024-05-13 18:14:31 +02:00
f806bbb815
Support using label names when changing issue labels ( #30943 ) ( #30958 )
...
Backport #30943 by @Zettat123
Resolve #30917
Make the APIs for adding labels and replacing labels support both label
IDs and label names so the
[`actions/labeler`](https://github.com/actions/labeler ) action can work
in Gitea.
<img width="600px"
src="https://github.com/go-gitea/gitea/assets/15528715/7835c771-f637-4c57-9ce5-e4fbf56fa0d3 "
/>
Co-authored-by: Zettat123 <zettat123@gmail.com >
2024-05-13 14:28:11 +08:00
ebe8e63dfd
Fix file path width in repo non-homepage view ( #30951 ) ( #30952 )
...
Backport #30951 by @silverwind
Fixes: https://github.com/go-gitea/gitea/issues/30940
<img width="1310" alt="Screenshot 2024-05-11 at 20 48 41"
src="https://github.com/go-gitea/gitea/assets/115237/f163dfd4-1299-421f-a99e-cd0c793e0e3d ">
Co-authored-by: silverwind <me@silverwind.io >
2024-05-12 14:07:16 +02:00
bc455883fc
Remove If Exist check on migration for mssql because that syntax required SQL server 2016 ( #30894 ) ( #30946 )
...
Backport #30894 by @lunny
Fix #30872
We will assume the database is consistent before executing the
migration. So the indexes should exist. Removing `IF EXIST` then is safe
enough.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: silverwind <me@silverwind.io >
2024-05-12 03:15:01 +00:00
14dc00ae01
Move reverproxyauth before session so the header will not be ignored even if user has login ( #27821 ) ( #30948 )
...
Backport #27821 by @lunny
When a user logout and then login another user, the reverseproxy auth
should be checked before session otherwise the old user is still login.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2024-05-12 10:25:55 +08:00
94c5a30c8b
Fix some UI regressions for commit list ( #30920 ) ( #30937 )
...
Backport #30920 by wxiaoguang
Close #30919
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: silverwind <me@silverwind.io >
2024-05-10 22:36:06 +08:00
b99473f4ec
Check if reverse proxy is correctly configured ( #30890 ) ( #30935 )
...
Backport #30890 by wxiaoguang
Follow #27011
Follow #30885
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: silverwind <me@silverwind.io >
2024-05-10 12:34:04 +00:00
45475250bd
Remove deprecated stuff for runners ( #30930 ) ( #30931 )
...
Backport #30930 by @wolfogre
It's time (maybe somewhat late) to remove some deprecated stuff for the
runner.
- `x-runner-version`: runners needn't to report version in every
request, they will call `Declare`.
- `AgentLabels`: runners will report them as `Labels`.
Co-authored-by: Jason Song <i@wolfogre.com >
2024-05-10 16:57:30 +08:00
df5513978a
Update issue indexer after merging a PR ( #30715 ) ( #30903 )
...
Backport #30715 by @Zettat123
Fix #30684
Co-authored-by: Zettat123 <zettat123@gmail.com >
2024-05-09 13:51:57 +08:00
08d697ae70
Add missing menu active item background back ( #30897 ) ( #30907 )
...
Backport #30897 by wxiaoguang
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-08 23:53:02 +00:00
5f1af1f37d
Fix incorrect issue form ( #30881 ) ( #30904 )
...
Backport #30881 by wxiaoguang
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-08 23:26:53 +00:00
2f91a461f7
Fix misspelling of mergable ( #30896 ) ( #30905 )
...
Backport #30896 by @yp05327
https://github.com/go-gitea/gitea/pull/25812#issuecomment-2099833692
Follow #30573
Co-authored-by: yp05327 <576951401@qq.com >
2024-05-08 16:38:46 +00:00
084bec89ed
Fix various problems around projects board view ( #30696 ) ( #30902 )
...
Backport #30696 by @lunny
# The problem
The previous implementation will start multiple POST requests from the
frontend when moving a column and another bug is moving the default
column will never be remembered in fact.
# What's changed
- [x] This PR will allow the default column to move to a non-first
position
- [x] And it also uses one request instead of multiple requests when
moving the columns
- [x] Use a star instead of a pin as the icon for setting the default
column action
- [x] Inserted new column will be append to the end
- [x] Fix #30701 the newly added issue will be append to the end of the
default column
- [x] Fix when deleting a column, all issues in it will be displayed
from UI but database records exist.
- [x] Add a limitation for columns in a project to 20. So the sorting
will not be overflow because it's int8.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-08 15:46:21 +00:00
271e8748a2
Fix wrong transfer hint ( #30889 ) ( #30900 )
...
Backport #30889 by @lunny
Fix #30187
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2024-05-08 15:12:37 +00:00
ec3f5f9992
Move database operations of merging a pull request to post receive hook and add a transaction ( #30805 ) ( #30888 )
...
Backport #30805 by @lunny
Merging PR may fail because of various problems. The pull request may
have a dirty state because there is no transaction when merging a pull
request. ref
https://github.com/go-gitea/gitea/pull/25741#issuecomment-2074126393
This PR moves all database update operations to post-receive handler for
merging a pull request and having a database transaction. That means if
database operations fail, then the git merging will fail, the git client
will get a fail result.
There are already many tests for pull request merging, so we don't need
to add a new one.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-08 14:17:18 +00:00
216c8eada3
Fix missing migrate actions artifacts ( #30874 ) ( #30886 )
...
Backport #30874 by @lunny
The actions artifacts should be able to be migrate to the new storage
place.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2024-05-07 21:59:00 +08:00
ad5a8d043c
Make "sync branch" also sync object format and add tests ( #30878 ) ( #30880 )
...
Backport #30878 by wxiaoguang
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-07 08:33:28 +08:00
cfe6779d4e
Get repo list with OrderBy alpha should respect owner too ( #30784 ) ( #30875 )
...
Backport #30784 by @6543
instead of:
- zowner/gcode
- awesome/nul
- zowner/nul
- zowner/zzz
we will get:
- awesome/nul
- zowner/gcode
- zowner/nul
- zowner/zzz
Co-authored-by: 6543 <6543@obermui.de >
2024-05-06 15:06:45 +00:00
b22d7fd8cd
Fix some UI problems (dropdown/container) ( #30849 ) ( #30871 )
...
Backport #30849 by wxiaoguang
Follow #30345
Follow #30547
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-06 07:45:04 +00:00
e2e326f154
Fix some UI problems (install/checkbox) ( #30854 ) ( #30870 )
...
Backport #30854 by wxiaoguang
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-06 06:58:42 +00:00
2252a7bf84
Have time.js use UTC-related getters/setters ( #30857 ) ( #30869 )
...
Backport #30857 by kemzeb
Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com >
Co-authored-by: Sam Fisher <fisher@3echelon.local >
2024-05-06 10:01:22 +08:00
bb7150c30d
Do not show monaco JS errors ( #30862 ) ( #30866 )
...
Backport #30862 by wxiaoguang
Fix #30861
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-06 00:53:09 +08:00
60fa2a5960
Fix issue/PR title edit ( #30858 ) ( #30865 )
...
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 >
2024-05-05 13:53:12 +00:00
054602977a
Add result check in TestAPIEditUser ( #29674 ) ( #30860 )
...
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 >
2024-05-05 21:17:03 +08:00
471b411873
Fix markdown URL parsing for commit ID ( #30812 ) ( #30855 )
...
Backport #30812 by wxiaoguang
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-04 12:04:05 +08:00
a82e6301f7
Fix no edit history after editing issue's title and content ( #30814 ) ( #30845 )
...
Backport #30814 by @yp05327
Fix #30807
reuse functions in services
Co-authored-by: yp05327 <576951401@qq.com >
2024-05-03 14:43:16 +00:00
1f9a9fab5f
Improve grep search ( #30843 ) ( #30850 )
...
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 >
2024-05-03 17:59:33 +08:00
7ad2d039fd
Don't only list code-enabled repositories when using repository API ( #30817 ) ( #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 >
2024-05-03 16:52:38 +08:00
ab2ef1ae49
Ignore useless error message "broken pipe" ( #30801 ) ( #30842 )
...
Backport #30801 by wxiaoguang
Fix #30792
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-03 04:20:34 +00:00
7db434bfa9
Fix JS error on pull request page ( #30838 ) ( #30841 )
...
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 >
2024-05-03 02:17:11 +00:00
41f8ef8af5
Improve repo button row layout ( #30668 ) ( #30839 )
...
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 >
2024-05-02 19:38:37 +00:00
6d83f5eddc
Prevent automatic OAuth grants for public clients ( #30790 ) ( #30836 )
...
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 >
2024-05-02 19:06:32 +00:00
665a06c41f
Catch and handle unallowed file type errors in issue attachment API ( #30791 ) ( #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 >
2024-05-03 01:45:45 +08:00
f62f04c6bf
Fix incorrect message id for release email ( #30825 ) ( #30833 )
...
Backport #30825 by wxiaoguang
Make generateMessageIDForRelease outputs the same format as
generateMessageIDForIssue (old `createReference`)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-03 00:00:29 +08:00
253c97b922
Add hover outline to heatmap squares ( #30828 ) ( #30832 )
...
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 >
2024-05-02 15:01:07 +00:00
c34a03d504
Upgrade chi-binding ( #30826 ) ( #30830 )
...
Backport #30826 by @lunny
Front port #30742
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2024-05-02 16:50:10 +02:00
3f0dc69400
Improve context popup rendering ( #30824 ) ( #30829 )
...
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 >
2024-05-02 13:47:32 +00:00
606b12caf0
Fix activity heat map padding & locale ( #30823 ) ( #30827 )
...
Backport #30823 by wxiaoguang
Fix #30808
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: silverwind <me@silverwind.io >
2024-05-02 13:27:45 +00:00
41efddafde
Fix rounded border for segment followed by pagination ( #30809 ) ( #30818 )
...
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 >
2024-05-02 13:06:02 +00:00
ee17289eeb
Fix issue card layout ( #30800 ) ( #30820 )
...
Backport #30800 by wxiaoguang
Fix #30788
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-02 20:10:32 +08:00
d793f256c8
Fix branch selector UI ( #30803 ) ( #30819 )
...
Backport #30803 by wxiaoguang
Fix #30802
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-02 11:12:43 +00:00
e1a79ae0bf
Skip gzip for some well-known compressed file types ( #30796 ) ( #30813 )
...
Backport #30796 by wxiaoguang
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: silverwind <me@silverwind.io >
2024-05-02 14:50:24 +08:00
ac91bb27ff
Fix markdown rendering when mentioning users ( #30795 ) ( #30810 )
...
Backport #30795 by wxiaoguang
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-02 09:48:24 +08:00
97a7c04a8f
Fix bleve fuzziness ( #30799 ) ( #30804 )
...
Backport #30799 by wxiaoguang
Fix #30797
Fix #30317
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-01 12:59:59 +00:00
ab344a36e3
Rework and fix stopwatch ( #30732 ) ( #30787 )
...
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 >
2024-04-30 21:46:45 +00:00
2bedd16c14
Improve logout from worker ( #30775 ) ( #30789 )
...
Backport #30775 by wxiaoguang
A quick fix for #30756
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-05-01 05:19:13 +08:00
a75b0d2813
Fix dashboard commit status null access ( #30771 ) ( #30786 )
...
Backport #30771 by wxiaoguang
Fix #30768
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-04-30 20:53:20 +08:00
e8279fcefd
Fix cross-compilation errors when CGO_CFLAGS/CGO_LDFLAGS is set ( #30749 ) ( #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 >
2024-04-30 10:51:38 +00:00
dc9e795ce2
Fix issue label rendering in the issue popup ( #30763 ) ( #30773 )
...
Backport #30763 by wxiaoguang
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-04-30 09:40:47 +00:00
6ee3a8a039
Right align the "Settings" menu item in overflow-menu ( #30764 ) ( #30777 )
...
Backport #30764 by wxiaoguang
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-04-30 16:40:09 +08:00
6edee2eca4
Rename CodeIndexerEnabled to IsRepoIndexerEnabled ( #30762 ) ( #30767 )
...
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 >
2024-04-29 21:57:48 +00:00
6c86034e0f
Fix all rounded borders, change affected tab menus to pills ( #30707 ) ( #30769 )
...
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 >
2024-04-29 21:19:44 +00:00
bb7d36d751
Gitea with first upper case + typos ( #30739 ) ( #30747 )
...
Backport #30739 by @mainboarder
* Corrected gitea to Gitea
* fixed some typos
Co-authored-by: mainboarder <git@mainboarder.de >
2024-04-28 23:51:42 +00:00