84e65afffd
Use appSubUrl for OAuth2 callback URL tip ( #28266 ) ( #28275 )
...
Backport #28266 by @earl-warren
- When crafting the OAuth2 callbackURL take into account `appSubUrl`,
which is quite safe given that its strictly formatted.
- No integration testing as this is all done in Javascript.
- Resolves https://codeberg.org/forgejo/forgejo/issues/1795
(cherry picked from commit 27cb6b7956136f87aa78067d9adb5a4c4ce28a24)
Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com >
Co-authored-by: Gusted <postmaster@gusted.xyz >
2023-11-30 00:26:47 +00:00
Giteabot and Brecht Van Lommel
d2908b2794
Meilisearch: require all query terms to be matched ( #28293 ) ( #28296 )
...
Co-authored-by: Brecht Van Lommel <brecht@blender.org >
2023-11-29 09:38:04 -06:00
24e03a125d
Fix required error for token name ( #28267 ) ( #28284 )
...
Backport #28267 by @earl-warren
- Say to the binding middleware which locale should be used for the
required error.
- Resolves https://codeberg.org/forgejo/forgejo/issues/1683
(cherry picked from commit 5a2d7966127b5639332038e9925d858ab54fc360)
Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com >
Co-authored-by: Gusted <postmaster@gusted.xyz >
2023-11-29 23:00:32 +08:00
Giteabot and yp05327
76e892317b
Fix issue will be detected as pull request when checking First-time contributor ( #28237 ) ( #28271 )
...
Backport #28237 by @yp05327
Fix #28224
Co-authored-by: yp05327 <576951401@qq.com >
2023-11-29 02:49:33 +00:00
Giteabot and John Olheiser
5001f63c07
Check for v prefix on tags for release clean name ( #28257 ) ( #28270 )
...
Co-authored-by: John Olheiser <john.olheiser@gmail.com >
2023-11-28 16:02:26 -06:00
Giteabot and Denys Konovalov
6d22ca15ab
Use full width for project boards ( #28225 ) ( #28245 )
...
Backport #28225 by @denyskon
Inspired by #28182
Co-authored-by: Denys Konovalov <kontakt@denyskon.de >
2023-11-27 18:20:53 +00:00
Giteabot and wxiaoguang
ea9f5a57e4
Increase "version" when update the setting value to a same value as before ( #28243 ) ( #28244 )
...
Backport #28243
Setting the same value should not trigger DuplicateKey error, and the
"version" should be increased
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2023-11-28 01:58:39 +08:00
Giteabot and yp05327
ca5f0c93c6
Fix links in docs ( #28234 ) ( #28238 )
...
Backport #28234 by @yp05327
Follow #28191
Changes:
- `(doc/administration/config-cheat-sheet.md` is incorrect:

- remove `../../`
Co-authored-by: yp05327 <576951401@qq.com >
2023-11-27 15:36:15 +08:00
7f81110461
Fix actions when tagging ( #28061 ) ( #28218 )
...
Backport #28061 by @lunny
close https://github.com/go-gitea/gitea/issues/28053
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
2023-11-25 13:46:08 -05:00
Giteabot and CodeShakingSheep
5ed0eefc9a
Docs: Replace deprecated IS_TLS_ENABLED mailer setting in email setup ( #28205 ) ( #28208 )
...
Backport #28205 by @CodeShakingSheep
In the [docs for email
setup](https://docs.gitea.com/administration/email-setup )
`mailer.IS_TLS_ENABLED` is mentioned which was replaced by
`mailer.PROTOCOL` in release 1.18.0 according to
https://blog.gitea.com/release-of-1.18.0/ . This change wasn't reflected
in the docs for email setup. I just replaced the deprecated mailer
setting.
Co-authored-by: CodeShakingSheep <19874562+CodeShakingSheep@users.noreply.github.com >
2023-11-25 15:41:01 +08:00
Giteabot and yp05327
4b89c0f996
Fix some incorrect links in docs ( #28191 ) ( #28201 )
...
Backport #28191 by @yp05327
https://gitea.com/gitea/gitea-docusaurus/actions/runs/661/jobs/0#jobstep-9-39
I noticed that there are many warning logs in building docs.
It is causing 404 in docs.gitea.com now, so we need to fix it.
And there are also some other problems in v1.19 which can not be done in
this PR.
Co-authored-by: yp05327 <576951401@qq.com >
2023-11-24 19:55:08 +00:00
Giteabot and Nanguan Lin
28b8e0b43e
Use full width for PR comparison ( #28182 ) ( #28186 )
...
Backport #28182 by @lng2020
Follow-up #22844
close #28142
Before

After

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com >
2023-11-23 16:14:20 +00:00
Giteabot and wxiaoguang
23838c2c2e
Make CORS work for oauth2 handlers ( #28184 ) ( #28185 )
...
Backport #28184
Fix #25473
Although there was `m.Post("/login/oauth/access_token", CorsHandler()...`,
it never really worked, because it still lacks the "OPTIONS" handler.
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2023-11-23 22:27:00 +08:00
f9763f1366
Fix missing buttons ( #28179 ) ( #28181 )
...
Backport #28179 by @lng2020
fix #28173
regression #25948
That PR is supposed to only change the style but somehow delete a code
snippet. See the
diff(https://github.com/go-gitea/gitea/pull/25948/files#diff-7c36d66fe058f4ff9f2beaac73cf710dca45b350d0dd98daf806828a4745fe62L125-L129 )
for details.
Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2023-11-23 12:24:34 +01:00
Giteabot and Nanguan Lin
a2314ca9c5
Revert "Fix EOL handling in web editor" ( #28101 ) ( #28172 )
...
Backport #28101 by @lng2020
Reverts go-gitea/gitea#27141
close #28097
Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com >
2023-11-22 18:06:13 +08:00
Giteabot and yp05327
994ba35f11
Fix swagger title ( #28164 ) ( #28167 )
...
Backport #28164 by @yp05327

Don't know why there's a `.` behind. 🤔
Co-authored-by: yp05327 <576951401@qq.com >
2023-11-22 09:06:38 +00:00
Giteabot and yp05327
447422fe27
Fix the description about the default setting for action in quick start document ( #28160 ) ( #28168 )
...
Backport #28160 by @yp05327
Since #27054 , Actions are enabled by default. so we should also edit the
document. 😃
ps: I think this should be backport to 1.21.0.
Co-authored-by: yp05327 <576951401@qq.com >
2023-11-22 16:46:11 +08:00
Giteabot and yp05327
9bfee5014b
Add guide page to actions when there's no workflows ( #28145 ) ( #28153 )
...
Backport #28145 by @yp05327
Before:

After:

Co-authored-by: yp05327 <576951401@qq.com >
2023-11-22 02:29:54 +00:00
Giteabot and yp05327
7128929a0d
Do not display search box when there's no packages yet ( #28146 ) ( #28159 )
...
Backport #28146 by @yp05327
Before:

After:



Co-authored-by: yp05327 <576951401@qq.com >
2023-11-22 10:07:13 +08:00
Giteabot and yp05327
efcbaf8fa8
Fix no ActionTaskOutput table waring ( #28149 ) ( #28152 )
...
Backport #28149 by @yp05327
Reproduce:
- Create a new Gitea instance
- Register a runner
- Create a repo and add a workflow
- Check the log, you will see warnings:

It comes from:

The reason is that we forgot registering `ActionTaskOutput` model.
So `action_table_output` table will be missing in your db.
Co-authored-by: yp05327 <576951401@qq.com >
2023-11-21 22:23:57 +08:00
Giteabot and Lunny Xiao
c997e90738
Fix empty action run title ( #28113 ) ( #28148 )
...
Backport #28113 by @lunny
Fix #27901
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-11-21 04:28:14 +00:00
Giteabot and wxiaoguang
ffab076b72
Use "is-loading" to avoid duplicate form submit for code comment ( #28143 ) ( #28147 )
...
Backport #28143 by @wxiaoguang
Compare by ignoring spaces:
https://github.com/go-gitea/gitea/pull/28143/files?diff=split&w=1
When the form is going to be submitted, add the "is-loading" class to
show an indicator and avoid user UI events.
When the request finishes (success / error), remove the "is-loading"
class to make user can interact the UI.
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2023-11-21 12:02:58 +08:00
Giteabot and Jason Song
117d9a117f
Fix typo in packages.cleanup.success ( #28133 ) ( #28136 )
...
Backport #28133 by @wolfogre
Follow
https://github.com/go-gitea/gitea/pull/28129#discussion_r1398971596
Co-authored-by: Jason Song <i@wolfogre.com >
2023-11-20 13:43:40 +00:00
Giteabot and Jason Song
f8c5f202b7
Add missing packages.cleanup.success ( #28129 ) ( #28132 )
...
Backport #28129 by @wolfogre
Co-authored-by: Jason Song <i@wolfogre.com >
2023-11-20 04:39:54 -05:00
1f82be6604
Fix Matrix and MSTeams nil dereference ( #28089 ) ( #28105 )
...
Backport #28089 by @KN4CK3R
Fixes #28088
Fixes #28094
Added missing tests.
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-11-17 13:50:45 +00:00
Giteabot and Nanguan Lin
56bedf2bcc
Change default size of attachments and repo files ( #28100 ) ( #28106 )
...
Backport #28100 by @lng2020
https://github.com/go-gitea/gitea/pull/27946 forgets to change them in
code. Sorry about that.
Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com >
2023-11-17 13:30:42 +01:00
Giteabot and wxiaoguang
f7567f798d
Fix incorrect pgsql conn builder behavior ( #28085 ) ( #28098 )
...
Backport #28085 by @wxiaoguang
Fix #28083 and fix the tests
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2023-11-17 10:45:04 +00:00
Giteabot and Evan Tobin
93ede4bc83
Fix permissions for Token DELETE endpoint to match GET and POST ( #27610 ) ( #28099 )
...
Backport #27610 by @evantobin
Fixes #27598
In #27080 , the logic for the tokens endpoints were updated to allow
admins to create and view tokens in other accounts. However, the same
functionality was not added to the DELETE endpoint. This PR makes the
DELETE endpoint function the same as the other token endpoints and adds
unit tests
Co-authored-by: Evan Tobin <me@evantob.in >
2023-11-17 12:24:16 +08:00
Giteabot and wxiaoguang
9f63d27ec4
Fix system config cache expiration timing ( #28072 ) ( #28090 )
...
Backport #28072
To avoid unnecessary database access, the `cacheTime` should always be
set if the revision has been checked.
Fix #28057
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2023-11-16 21:37:57 +08:00
Giteabot and 6543
073d8c50dd
Restricted users only see repos in orgs which their team was assigned to ( #28025 ) ( #28051 )
...
Backport #28025 by @6543
---
*Sponsored by Kithara Software GmbH*
Co-authored-by: 6543 <m.huber@kithara.com >
2023-11-14 16:44:46 +01:00
Giteabot and Earl Warren
09efce9da2
enable system users for comment.LoadPoster ( #28014 ) ( #28032 )
...
Backport #28014 by @earl-warren
System users (Ghost, ActionsUser, etc) have a negative id and may be the
author of a comment, either because it was created by a now deleted user
or via an action using a transient token.
The GetPossibleUserByID function has special cases related to system
users and will not fail if given a negative id.
Refs: https://codeberg.org/forgejo/forgejo/issues/1425
(cherry picked from commit 6a2d2fa24390116d31ae2507c0a93d423f690b7b)
Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com >
2023-11-14 14:50:05 +01:00
Giteabot and JakobDev
124a9957d0
Fix viewing wiki commit on empty repo ( #28040 ) ( #28044 )
...
Backport #28040 by @JakobDev
Fixes https://codeberg.org/forgejo/forgejo/issues/1758
For some weird reason we need to cast this nil.
Co-authored-by: JakobDev <jakobdev@gmx.de >
2023-11-14 14:49:12 +01:00
Giteabot and yp05327
d72e20627d
Add word break to the repo list in admin settings page ( #28034 ) ( #28035 )
...
Backport #28034 by @yp05327
Before:

After:

Co-authored-by: yp05327 <576951401@qq.com >
2023-11-14 14:31:43 +08:00
Giteabot and Anudeep Reddy
00cd5ba6f4
fixed duplicate attachments on dump on windows ( #28019 ) ( #28031 )
...
Backport #28019 by @anudeepreddy
Hi,
This PR fixes #27988 . The use of `path.join`(which uses `/` as the file
separator) to construct paths and comparing them with paths constructed
using `filepath.join`(which uses platform specific file separator) is
the root cause of this issue.
The desired behavior is to ignore attachments when dumping data
directory. Due to the what's mentioned above, the function
`addRecursiveExclude` is not actually ignoring the attachments directory
and is being written to the archive. The attachment directory is again
added to the archive (with different file separator as mentioned in the
issue) causing a duplicate entry on windows.
The solution is to use `filepath.join` in `addResursiveExclude` to
construct `currentAbsPath`.
Co-authored-by: Anudeep Reddy <anudeepc85@gmail.com >
2023-11-14 09:56:21 +08:00
Giteabot
eef4148935
Dont leak private users via extensions ( #28023 ) ( #28029 )
...
Backport #28023 by @6543
there was no check in place if a user could see a other user, if you
append e.g. `.rss`
2023-11-14 00:03:42 +01:00
Giteabot and Nanguan Lin
d4122712f7
Change default size of issue/pr attachments and repo file ( #27946 ) ( #28017 )
...
Backport #27946 by @lng2020
As title. Some attachments and file sizes can easily be larger than
these limits
Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com >
2023-11-13 15:27:39 +01:00
Giteabot and wxiaoguang
58d71cdd6f
Move some JS code from fomantic.js to standalone files ( #27994 ) ( #28001 )
...
Backport #27994 by @wxiaoguang
To improve maintainability, this PR:
1. Rename `web_src/js/modules/aria` to `web_src/js/modules/fomantic`
(the code there are all for aria of fomantic)
2. Move api/transition related code to
`web_src/js/modules/fomantic/api.js` and
`web_src/js/modules/fomantic/transition.js`
No logic is changed.
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2023-11-12 11:29:56 +01:00
Giteabot and Yarden Shoham
2691b345e6
Render email addresses as such if followed by punctuation ( #27987 ) ( #27992 )
...
Backport #27987 by @yardenshoham
Added the following characters to the regular expression for the email:
- ,
- ;
- ?
- !
Also added a test case.
- Fixes #27616
# Before

# After

Signed-off-by: Yarden Shoham <git@yardenshoham.com >
Co-authored-by: Yarden Shoham <git@yardenshoham.com >
2023-11-11 13:26:18 +08:00
Giteabot and Nanguan Lin
60b51d0648
Show error toast when file size exceeds the limits ( #27985 ) ( #27986 )
...
Backport #27985 by @lng2020
As title.
Before that, there was no alert at all.
After:

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com >
2023-11-10 11:52:04 +00:00
Giteabot and yp05327
824d40edc6
Fix citation error when the file size is larger than 1024 bytes ( #27958 ) ( #27965 )
...
Backport #27958 by @yp05327
Mentioned in:
https://github.com/go-gitea/gitea/pull/27931#issuecomment-1798016960
Same to #25131 , so use the same method to fix this problem.
Co-authored-by: yp05327 <576951401@qq.com >
2023-11-08 22:45:57 +08:00
46ac04ce9d
Add word-break to repo description in home page ( #27924 ) ( #27957 )
...
Backport #27924 by @yp05327
In #25315 , @denyskon fixed UI on mobile view.
But for the repo description, on desktop view there's no word-break.
So maybe we can just add `gt-word-break` to fix it on both mobile view
and desktop view.
Before:
desktop view:

mobile view:

After:
desktop view:

mobile view(almost same?)

Co-authored-by: yp05327 <576951401@qq.com >
Co-authored-by: silverwind <me@silverwind.io >
2023-11-08 01:29:33 +00:00
Giteabot and 6543
cc7b9eb085
Document REACTION_MAX_USER_NUM setting option ( #27954 ) ( #27959 )
...
Backport #27954 by @6543
as title
---
*Sponsored by Kithara Software GmbH*
Co-authored-by: 6543 <m.huber@kithara.com >
2023-11-08 08:54:48 +08:00
Giteabot and Sebastian Brückner
7aafe5e0b4
Fix rendering assignee changed comments without assignee ( #27927 ) ( #27952 )
...
Backport #27927 by @invliD
When an assignee changed event comment is rendered, most of it is
guarded behind the assignee ID not being 0. However, if it is 0, that
results in quite broken rendering for that comment and the next one.
This can happen, for example, when repository data imported from outside
of Gitea is incomplete.
This PR makes sure comments with an assignee ID of 0 are not rendered at
all.
---
Screenshot before:
<img width="272" alt="Bildschirmfoto 2023-11-05 um 20 12 18"
src="https://github.com/go-gitea/gitea/assets/42910/7d629d76-fee4-4fe5-9e3a-bf524050cead ">
The comments in this screenshot are:
1. A regular text comment
2. A user being unassigned
3. A user being assigned
4. The title of the PR being changed
Comments 2 and 3 are rendered without any text, which indents the next
comment and does not leave enough vertical space.
Co-authored-by: Sebastian Brückner <code@nik.dev >
2023-11-07 22:02:36 +01:00
Giteabot and yp05327
9e15955c68
Add word break to release title ( #27942 ) ( #27947 )
...
Backport #27942 by @yp05327
Before:

After:

Co-authored-by: yp05327 <576951401@qq.com >
2023-11-07 20:30:51 +08:00
Giteabot and Folke
6eadad8222
Update environment-to-ini flag parsing ( #27914 ) ( #27940 )
...
Backport #27914 by @fashberg
This Fixes #27913
This commit updates `environment-to-ini` to be compatible with update
urfave/cli/v2
Doc: <https://cli.urfave.org/v2/examples/combining-short-options/ >
Co-authored-by: Folke <folke@ashberg.de >
2023-11-06 21:10:10 +00:00
Giteabot and KN4CK3R
a8e505a44b
Unify two factor check ( #27915 ) ( #27929 )
...
Backport #27915 by @KN4CK3R
Fixes #27819
We have support for two factor logins with the normal web login and with
basic auth. For basic auth the two factor check was implemented at three
different places and you need to know that this check is necessary. This
PR moves the check into the basic auth itself.
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2023-11-06 18:07:22 +00:00
Giteabot and Nanguan Lin
e47b31c691
Remove known issue section in Gitea Actions Doc ( #27930 ) ( #27938 )
...
Backport #27930 by @lng2020
The bug has been fixed for several months in the
`docker/build-push-action`
The fix commit is
[d8823bfaed](https://github.com/docker/build-push-action/commit/d8823bfaed2a82c6f5d4799a2f8e86173c461aba )
as the Gitea Actions Doc mentioned too.
Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com >
2023-11-06 17:03:06 +01:00
Giteabot and delvh
49f82ac4e3
Fix JS NPE when viewing specific range of PR commits ( #27912 ) ( #27923 )
...
Backport #27912 by @delvh
This should be the easiest fix.
While other solutions might be possible that exterminate the root cause,
they will not be as trivial.
Co-authored-by: delvh <dev.lh@web.de >
2023-11-06 09:22:44 +00:00
Giteabot and silverwind
81d233d987
Install poetry dependencies with --no-root ( #27919 ) ( #27920 )
...
Backport #27919 by @silverwind
Poetry 1.7.0 or higher will print a warning otherwise, see discussions:
https://github.com/python-poetry/poetry/pull/8369
https://github.com/python-poetry/poetry/issues/1132
> --no-root Do not install the root package (the current project).
Co-authored-by: silverwind <me@silverwind.io >
2023-11-06 02:14:46 +00:00
Giteabot and sebastian-sauer
2f56ab7999
Show correct commit sha when viewing single commit diff ( #27916 ) ( #27921 )
...
Backport #27916 by @sebastian-sauer
Show the correct sha when viewing a single commit.

Co-authored-by: sebastian-sauer <sauer.sebastian@gmail.com >
2023-11-06 09:09:35 +08:00
Giteabot and Nanguan Lin
61d3d9205b
Fix 500 when deleting a dismissed review ( #27903 ) ( #27910 )
...
Backport #27903 by @lng2020
Fix #27767
Add a test to ensure its behavior
Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com >
2023-11-05 13:59:11 +00:00
28e3d0b0d3
Remove action runners on user deletion ( #27902 ) ( #27908 )
...
Backport #27902 by @earl-warren
- On user deletion, delete action runners that the user has created.
- Add a database consistency check to remove action runners that have
nonexistent belonging owner.
- Resolves https://codeberg.org/forgejo/forgejo/issues/1720
(cherry picked from commit 009ca7223dab054f7f760b7ccae69e745eebfabb)
Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com >
Co-authored-by: Gusted <postmaster@gusted.xyz >
2023-11-05 13:20:00 +00:00
cf7374c079
Remove set tabindex on view issue ( #27892 ) ( #27896 )
...
Backport #27892 by @earl-warren
- Remove the set tabindex and instead let the browser figure out the
correct tab order.
- Resolves https://codeberg.org/forgejo/forgejo/issues/1626
Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com >
Co-authored-by: Gusted <postmaster@gusted.xyz >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2023-11-03 23:25:11 +08:00
Giteabot and Zettat123
8d0a4d7e9d
Fix DownloadFunc when migrating releases ( #27887 ) ( #27890 )
...
Backport #27887 by @Zettat123
We should not use `asset.ID` in DownloadFunc because DownloadFunc is a
closure.
https://github.com/go-gitea/gitea/blob/1bf5527eac6b947010c8faf408f6747de2a2384f/services/migrations/gitea_downloader.go#L284-L295
A similar bug when migrating from GitHub has been fixed in #14703 . This
PR fixes the bug when migrating from Gitea and GitLab.
Co-authored-by: Zettat123 <zettat123@gmail.com >
2023-11-03 08:29:30 +00:00
Giteabot and Lunny Xiao
9ca1853495
Fix http protocol auth ( #27875 ) ( #27876 )
...
Backport #27875 by @lunny
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-11-02 16:34:55 +01:00
Giteabot
d6f7c49b8b
Reduce margin/padding on flex-list items and divider ( #27872 ) ( #27874 )
...
Backport #27872 by @silverwind
Small CSS tweak, reduces margin/padding from 14px to 10px, which I think
looks better
2023-11-02 13:24:03 +08:00
Giteabot and Moritz Poldrack
c074af6a6d
refactor postgres connection string building ( #27723 ) ( #27869 )
...
Backport #27723 by @mpldr
This patchset changes the connection string builder to use net.URL and
the host/port parser to use the stdlib function for splitting host from
port. It also adds a footnote about a potentially required portnumber
for postgres UNIX sockets.
Fixes : #24552
Co-authored-by: Moritz Poldrack <33086936+mpldr@users.noreply.github.com >
2023-11-01 23:19:02 +00:00
Giteabot and KN4CK3R
39596115da
Change katex limits ( #27823 ) ( #27868 )
...
Backport #27823 by @KN4CK3R
Fixes #27812
Use higher defaults again but limit the input size.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2023-11-01 22:26:45 +01:00
Giteabot and nodiscc
352906b448
doc: actions/act-runner: document running as a systemd service ( #27844 ) ( #27866 )
...
Backport #27844 by @nodiscc
This documents running `act-runner` as a systemd service under a
dedicated user account.
Co-authored-by: nodiscc <nodiscc@gmail.com >
2023-11-01 18:18:01 +01:00
18a782f73d
Fix package webhook ( #27839 ) ( #27855 )
...
Backport #27839 by @lunny
Fix #23742
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2023-10-31 11:26:28 +01:00
Giteabot and Jean-Baptiste Gomond
6af6f81780
Add user secrets API integration tests ( #27832 ) ( #27852 )
...
Backport #27832 by @jbgomond
Adds the missing user secrets API integration tests so #27829 does not
happen again
Co-authored-by: Jean-Baptiste Gomond <dev@jbgomond.com >
2023-10-31 04:14:04 +00:00
Giteabot and Lunny Xiao
d282f5dab8
Fix wrong relative path on obtain token from command line ( #27850 ) ( #27851 )
...
Backport #27850 by @lunny
Caused by #27845
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-10-31 11:36:22 +08:00
Giteabot
f3f56d570b
doc: actions/act-runner: document obtaining a runner registration token from gitea CLI ( #27845 ) ( #27848 )
2023-10-30 20:16:05 -04:00
Giteabot
3c03b7db50
Fix/upload artifact error windows ( #27802 ) ( #27840 )
2023-10-30 11:57:48 +00:00
Giteabot and Denys Konovalov
ac22116211
Always use whole user name as link ( #27815 ) ( #27838 )
...
Backport #27815 by @denyskon
Starting from #25790 this shared template only linked the username of
the user if both display name and username were shown. I experienced
myself always trying to click on the display name - I think it is
annoying for others too.
After:


Co-authored-by: Denys Konovalov <kontakt@denyskon.de >
2023-10-30 12:25:40 +01:00
Giteabot and Jean-Baptiste Gomond
25bc3d562a
Fix bad method call when deleting user secrets via API ( #27829 ) ( #27831 )
...
Backport #27829 by @jbgomond
Fixed a little mistake when you deleting user secrets via the API. Found
it when working on #27725 .
It should be backported to 1.21 I think.
Co-authored-by: Jean-Baptiste Gomond <dev@jbgomond.com >
2023-10-29 22:08:01 +08:00
Giteabot and Patryk Krawaczyński
991c959110
Dockerfile small refactor ( #27757 ) ( #27826 )
...
Backport #27757 by @nfsec
- Size and layer optimization,
- Maintaining consistency in definitions (comments, apk etc.),
Co-authored-by: Patryk Krawaczyński <nfsec@users.noreply.github.com >
2023-10-29 13:20:54 +01:00
Giteabot and Nanguan Lin
2d2a5657ef
Upgrade xorm to 1.3.4 ( #27807 ) ( #27813 )
...
Backport #27807 by @lng2020
Noticeable change:
Remove the `OrderBy("1") `
[patch](https://github.com/go-gitea/gitea/pull/27673#issuecomment-1768570142 )
for mssql since xorm has [fixed
it](https://gitea.com/xorm/xorm/commit/0f085408afd85707635eadb2294ab52be04f3c0f ).
Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com >
2023-10-27 14:17:27 +02:00
Giteabot and bt90
977f5db28e
Chroma v2.10.0 ( #27803 ) ( #27805 )
...
Backport #27803 by @bt90
Bump the chroma version to v2.10.0:
https://github.com/alecthomas/chroma/releases/tag/v2.10.0
This release includes a better Java lexer
https://github.com/alecthomas/chroma/pull/873
Co-authored-by: bt90 <btom1990@googlemail.com >
2023-10-27 13:25:25 +02:00
487c573c28
Add dedicated class for empty placeholders ( #27788 ) ( #27792 )
...
Backport #27788 by @silverwind
Fixes: https://github.com/go-gitea/gitea/issues/27784
<img width="1033" alt="Screenshot 2023-10-25 at 19 07 15"
src="https://github.com/go-gitea/gitea/assets/115237/1a363851-1a86-48cb-99ec-0a573371bb6e ">
<img width="1051" alt="Screenshot 2023-10-25 at 19 07 41"
src="https://github.com/go-gitea/gitea/assets/115237/add4b606-2264-430a-af35-249ef005817f ">
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2023-10-26 09:26:05 +02:00
Giteabot and KN4CK3R
25acbfed36
Close all hashed buffers ( #27787 ) ( #27790 )
...
Backport #27787 by @KN4CK3R
Add missing `.Close()` calls. The current code does not delete the
temporary files if the data grows over 32mb.
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2023-10-25 22:24:25 +02:00
Giteabot and silverwind
9dd8f34707
Add gap between diff boxes ( #27776 ) ( #27781 )
...
Backport #27776 by @silverwind
Before (almost no gap between files):
<img width="1240" alt="Screenshot 2023-10-24 at 19 43 32"
src="https://github.com/go-gitea/gitea/assets/115237/30cdbdbc-d102-479c-89ce-3f68837ae0cd ">
After (with 8px gap):
<img width="1241" alt="Screenshot 2023-10-24 at 19 43 22"
src="https://github.com/go-gitea/gitea/assets/115237/72b26a30-8730-4a36-8de9-be143b684b98 ">
Co-authored-by: silverwind <me@silverwind.io >
2023-10-25 09:09:08 +08:00
77bd3acb65
Do not force creation of _cargo-index repo on publish ( #27266 ) ( #27765 )
...
Backport #27266 by @merlleu
Hello there,
Cargo Index over HTTP is now prefered over git for package updates: we
should not force users who do not need the GIT repo to have the repo
created/updated on each publish (it can still be created in the packages
settings).
The current behavior when publishing is to check if the repo exist and
create it on the fly if not, then update it's content.
Cargo HTTP Index does not rely on the repo itself so this will be
useless for everyone not using the git protocol for cargo registry.
This PR only disable the creation on the fly of the repo when publishing
a crate.
This is linked to #26844 (error 500 when trying to publish a crate if
user is missing write access to the repo) because it's now optional.
Co-authored-by: merlleu <r.langdorph@gmail.com >
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2023-10-24 15:40:02 +08:00
Giteabot and wxiaoguang
95db95ef91
Fix incorrect "tab" parameter for repo search sub-template ( #27755 ) ( #27764 )
...
Backport #27755 by wxiaoguang
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2023-10-24 11:01:26 +08:00
cb9e10f971
Fix label render containing invalid HTML ( #27752 ) ( #27762 )
...
Backport #27752 by @earl-warren
- The label HTML contained a quote that wasn't being closed.
Refs: https://codeberg.org/forgejo/forgejo/pulls/1651
(cherry picked from commit e2bc2c9a1fff482c49dbeb3a51e4e1c698bf506c)
Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com >
Co-authored-by: Gusted <postmaster@gusted.xyz >
2023-10-24 09:39:13 +08:00
5087de1a5c
Fix link-action redirect network error ( #27734 ) ( #27749 )
...
Backport #27734 by @lng2020
<img width="823" alt="image"
src="https://github.com/go-gitea/gitea/assets/70063547/99da3d5a-c28a-4fd0-8ae0-88461a9142e2 ">
Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com >
Co-authored-by: 6543 <6543@obermui.de >
2023-10-23 13:52:30 +00:00
Giteabot and Nanguan Lin
f2bac791db
Fix duplicate project board when hitting enter key ( #27746 ) ( #27751 )
...
Backport #27746 by @lng2020
When hitting the `enter` key to create a new project column, the request
is sent twice because the `submit` event and `key up` event are both
triggered.
Probably a better solution is to rewrite these parts of the code to
avoid using native jQuery but reuse the `form-fetch-action` class. But
it's beyond my ability.
Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com >
2023-10-23 13:04:53 +00:00
Giteabot and silverwind
48e3aec862
Enable followCursor for language stats bar ( #27713 ) ( #27739 )
...
Backport #27713 by @silverwind
Fixes: https://github.com/go-gitea/gitea/issues/27600

Also tested together with https://github.com/go-gitea/gitea/pull/27704 ,
works well.
Co-authored-by: silverwind <me@silverwind.io >
2023-10-22 15:35:58 +02:00
Giteabot and Nanguan Lin
6919a02ab7
Fix org team endpoint ( #27721 ) ( #27727 )
...
Backport #27721 by @lng2020
Fix #27711
Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com >
2023-10-22 00:07:28 +00:00
Giteabot and silverwind
1848858a1e
Feed UI Improvements ( #27356 ) ( #27717 )
...
Backport #27356 by @silverwind
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 ">
Co-authored-by: silverwind <me@silverwind.io >
2023-10-21 11:13:15 +00:00
a398089301
Improve diff tree spacing ( #27714 ) ( #27719 )
...
Backport #27714 by @silverwind
1. Un-indent top-level items, matching GitHub rendering
2. Increase item padding and add 1px gap between items
Before and After:
<img width="247" alt="Screenshot 2023-10-20 at 18 37 32"
src="https://github.com/go-gitea/gitea/assets/115237/43c1ce86-1814-4a8a-9dd2-0c4a82a2be7c ">
<img width="241" alt="Screenshot 2023-10-20 at 18 40 46"
src="https://github.com/go-gitea/gitea/assets/115237/b541b85b-c428-4903-becd-773ae5807495 ">
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: 6543 <m.huber@kithara.com >
2023-10-21 10:44:58 +00:00
Giteabot and silverwind
8885108c42
Improve feed icons and feed merge text color ( #27498 ) ( #27716 )
...
Backport #27498 by @silverwind
1. Improve various feed icons
2. Fix merge message color
<img width="763" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/3f5bcb23-6d90-4c63-85f2-46bd7e1c96d6 ">
<img width="769" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/466c37b4-e2f4-42bb-922d-b86596cdc6d0 ">
Fixes: https://github.com/go-gitea/gitea/issues/27495
Continues: https://github.com/go-gitea/gitea/pull/27356
Co-authored-by: silverwind <me@silverwind.io >
2023-10-21 12:29:06 +02:00
Giteabot and MrDevil
993178b45f
[FIX] resolve confusing colors in languages stats by insert a gap ( #27704 ) ( #27715 )
...
Backport #27704 by @RightFS
The current language stats are too obsessed with color matching. Similar
colors are always next to each other. It is a bit troublesome to find
the place where the color matching is generated, so just follow the
example of github and add a gap.
## before
<img width="883" alt="image"
src="https://github.com/go-gitea/gitea/assets/12915306/cf54430c-616c-4b37-b561-5a37c20b2d94 ">
## after
<img width="877" alt="image"
src="https://github.com/go-gitea/gitea/assets/12915306/e518ea36-2b8f-4f11-a867-a58dc393db85 ">
Co-authored-by: MrDevil <Right.Sun@outlook.com >
2023-10-21 02:04:44 +08:00
Giteabot and silverwind
345d70f7e4
Fix sticky diff header background ( #27697 ) ( #27712 )
...
Backport #27697 by @silverwind
Fixes: https://github.com/go-gitea/gitea/issues/27604
Add negative margins so the header covers any shadow of active elements.
No rendering change of the content of the header because the padding
counteracts the effect.
<img width="128" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/3d0f55b6-9351-4985-a290-da9a92d15b4e ">
Co-authored-by: silverwind <me@silverwind.io >
2023-10-20 17:44:46 +02:00
Giteabot and delvh
6dce671d02
Adapt .changelog.yml to new labeling system ( #27701 ) ( #27702 )
...
Backport #27701 by @delvh
Otherwise, it is not possible anymore to generate changelogs.
Co-authored-by: delvh <dev.lh@web.de >
2023-10-20 00:29:50 +02:00
Giteabot and Denys Konovalov
6cef7a767b
cleanup repo details icons/labels ( #27644 ) ( #27654 )
...
Backport #27644 by @denyskon
Fix #27596
Change confusing behavior when showing information about a repo via labels and icons.
Implement changes proposed by @lng2020 in
https://github.com/go-gitea/gitea/pull/27627#pullrequestreview-1678787673 .
Co-authored-by: Denys Konovalov <kontakt@denyskon.de >
2023-10-19 22:04:24 +02:00
Giteabot and JakobDev
6befca1695
Fix required checkboxes in issue forms ( #27592 ) ( #27692 )
...
Backport #27592 by @JakobDev
If you set a checkbox as required in a issue form at the moment, the
checkbox is checked and read only, what does not make much sense. With
this PR, the Checkbox actually needs to be checked. The label supports
now also Markdown. This matches GitHub's behaviour.
And yes, I know the CSS is a ugly workaround. It looks like the given
CSS code is part Fomantic and I don't know how to change that. The
Maintainers are free to change that.

Co-authored-by: JakobDev <jakobdev@gmx.de >
2023-10-19 15:35:29 +02:00
Giteabot and Nanguan Lin
89d3766d22
Upgrade xorm ( #27673 ) ( #27691 )
...
Backport #27673 by @lng2020
Related to https://gitea.com/xorm/xorm/pulls/2341
Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com >
2023-10-19 10:56:39 +00:00
Giteabot and KN4CK3R
9b14f1a8ed
Always delete existing scheduled action tasks ( #27662 ) ( #27688 )
...
Backport #27662 by @KN4CK3R
Fixes #27650
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2023-10-19 09:37:20 +02:00
Giteabot and silverwind
0b8b0072a2
Clipboard copy enhancements ( #27669 ) ( #27681 )
...
Backport #27669 by @silverwind
1. Do not show temporary tooltips that are triggered from within
dropdowns. Previously this resulted in the tooltip being stuck to
top-left of the page like seen on issue comment URL copy. I could not
figure out any tippy options that prevent this, so I think it's better
to just not show it.
1. Refactor `initGlobalCopyToClipboardListener` so that it does not run
a often useless `document.querySelector` on every click, make
`data-clipboard-text-type` work with `data-clipboard-target`. No use in
current code base but still good to have. Finally some minor code
cleanup in the function.
Point 1 is for this copy button:
<img width="229" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/81f34746-8ea5-43d9-8c6f-f6f417a9e4ad ">
Co-authored-by: silverwind <me@silverwind.io >
2023-10-19 00:23:28 +08:00
Giteabot and Jason Song
dab40cd5f4
Support allowed hosts for webhook to work with proxy ( #27655 ) ( #27675 )
...
Backport #27655 by @wolfogre
When `webhook.PROXY_URL` has been set, the old code will check if the
proxy host is in `ALLOWED_HOST_LIST` or reject requests through the
proxy. It requires users to add the proxy host to `ALLOWED_HOST_LIST`.
However, it actually allows all requests to any port on the host, when
the proxy host is probably an internal address.
But things may be even worse. `ALLOWED_HOST_LIST` doesn't really work
when requests are sent to the allowed proxy, and the proxy could forward
them to any hosts.
This PR fixes it by:
- If the proxy has been set, always allow connectioins to the host and
port.
- Check `ALLOWED_HOST_LIST` before forwarding.
Co-authored-by: Jason Song <i@wolfogre.com >
2023-10-18 15:07:52 +02:00
Giteabot and Lunny Xiao
5b80157aad
Fix poster is not loaded in get default merge message ( #27657 ) ( #27666 )
...
Backport #27657 by @lunny
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-10-17 18:20:35 +02:00
bf76216de1
Hide archived labels by default from the suggestions when assigning labels for an issue ( #27451 ) ( #27661 )
...
Backport #27451 by @puni9869
Followup of #27115
Finally closes #25237
## Screenshots
### Issue Sidebar
<img width="513" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/9f7fda2f-5a03-4684-8619-fd3498a95b41 ">
### PR sidebar
<img width="367" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/53db9b64-faec-4a67-91d6-76945596a469 ">
### PR sidebar with archived labels shown
<img width="352" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/9dc5050f-4e69-4f76-bb83-582480a2281e ">
Signed-off-by: puni9869 <punitinani1@hotmail.com >
Co-authored-by: puni9869 <80308335+puni9869@users.noreply.github.com >
Co-authored-by: silverwind <me@silverwind.io >
2023-10-17 14:46:35 +00:00
Giteabot and wxiaoguang
21c3513d49
Improve dropdown button alignment and fix hover bug ( #27632 ) ( #27637 )
...
Backport #27632 by @wxiaoguang
1. fix #27631 , and add samples to devtest page
2. fix incorrect color for "ui dropdown button" when hover
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2023-10-16 16:15:15 +08:00
Giteabot and Jason Song
8cf7548a18
Improve retrying index issues ( #27554 ) ( #27634 )
...
Backport #27554 by @wolfogre
Fix #27540
Co-authored-by: Jason Song <i@wolfogre.com >
2023-10-16 09:55:53 +08:00
Giteabot and Nanguan Lin
066aee28a5
Fix 404 when deleting Docker package with an internal version ( #27615 ) ( #27630 )
...
Backport #27615 by @lng2020
close #27601
The Docker registry has an internal version, which leads to 404
Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com >
2023-10-15 12:08:04 +02:00
Giteabot and Nanguan Lin
148f6e3776
Change the default branch in the agit docs ( #27621 ) ( #27623 )
...
Backport #27621 by @lng2020
It's main now.
relevant #27579
Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com >
2023-10-15 09:16:15 +08:00
Giteabot and Sergey Zolotarev
54dccbeb2e
Fix build errors on BSD (in BSDMakefile) ( #27594 ) ( #27608 )
...
Backport #27594 by @sryze
1. `make build` fails because `||` and `&&` have the same precedence in
sh/bash, so the `false` command always evaluated (leading to an error).
```
+ which gmake /usr/local/bin/gmake
+ false
*** Failed target: .BEGIN
*** Failed command: which "gmake" || printf "Error: GNU Make is
required!\n\n" 1>&2 && false
*** Error code 1
```
2. When `GPREFIX` is set to an empty string with quotation marks,
`gmake` mistakenly thinks that it's a file name:
``` gmake: *** empty string invalid as file name. Stop. ```
Co-authored-by: Sergey Zolotarev <sryze@protonmail.com >
2023-10-14 07:29:55 +00:00
21f1e223d8
Keep filter when showing unfiltered results on explore page ( #27192 ) ( #27589 )
...
Backport #27192 by @JakobDev
Fixes https://codeberg.org/Codeberg/Community/issues/1302
Co-authored-by: JakobDev <jakobdev@gmx.de >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2023-10-12 08:56:21 +08:00
Giteabot and JakobDev
63a321b83a
Don't show Link to TOTP if not set up ( #27585 ) ( #27588 )
...
Backport #27585 by @JakobDev
Fixes https://codeberg.org/forgejo/forgejo/issues/1592
When login in with WebAuth, the page has a link to use TOTP instead.
This link is always displayed, no matter if the User has set up TOTP or
not, which do of cause not work for those who have not.
Co-authored-by: JakobDev <jakobdev@gmx.de >
2023-10-11 22:59:21 +02:00