e15fe85335
Read previous info from git blame ( #28306 ) ( #28310 )
...
Backport #28306 by @KN4CK3R
Fixes #28280
Reads the `previous` info from the `git blame` output instead of
calculating it afterwards.
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2023-12-01 08:27:35 +01:00
wxiaoguang and GitHub
4f5122a7fe
Ignore "non-existing" errors when getDirectorySize calculates the size ( #28276 ) ( #28285 )
...
Backport #28276
The git command may operate the git directory (add/remove) files in any
time.
So when the code iterates the directory, some files may disappear during
the "walk". All "IsNotExist" errors should be ignored.
2023-11-30 16:39:16 +00:00
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
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
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
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
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
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
yp05327 and GitHub
96141e4e55
Revert move installation/upgrade-from-gogs.md in 1.21 ( #28235 )
...
https://github.com/go-gitea/gitea/pull/28233#discussion_r1405539630
2023-11-27 15:28:48 +01:00
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
196100a07a
Change log for 1.21.1 ( #28222 )
...
As title.
---------
Co-authored-by: delvh <dev.lh@web.de >
v1.21.1
2023-11-26 18:33:07 +08:00
Lunny Xiao and GitHub
bc3d8bff73
Fix comment permissions ( #28213 ) ( #28216 )
...
backport #28213
This PR will fix some missed checks for private repositories' data on
web routes and API routes.
2023-11-25 23:43:23 +00: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
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
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
pitpalme and GitHub
7cae4dfc00
Fix delete-orphaned-repos ( #28200 ) ( #28202 )
...
Backport #28200
gitea doctor failed at checking and fixing 'delete-orphaned-repos',
because table name 'user' needs quoting to be correctly recognized by at
least PostgreSQL.
fixes #28199
2023-11-24 14:54:14 -05:00
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
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
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
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
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
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
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
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
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
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
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
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
John Olheiser and GitHub
7213506680
Update docs for docusaurus v3 ( #28126 )
...
Signed-off-by: jolheiser <john.olheiser@gmail.com >
2023-11-20 00:24:50 -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
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
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
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
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
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
bc6477b36b
Add v1.21.0 changelog ( #28005 ) ( #28048 )
...
Backport changelog for v1.21.0 as Giteabot doesn't seem to be in the
mood for it
---------
Co-authored-by: 6543 <6543@obermui.de >
Co-authored-by: silverwind <me@silverwind.io >
v1.21.0
2023-11-14 15:02:59 +01:00
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
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
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
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 and GitHub
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
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
Nanguan Lin and GitHub
97f4239a94
Fix wrong xorm Delete usage(backport for 1.21) ( #28002 )
...
manually backport for https://github.com/go-gitea/gitea/pull/27995
The conflict is `ctx` and `db.Defaultctx`.
2023-11-12 12:58:22 +00:00
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
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
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
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