Refs: https://codeberg.org/forgejo/forgejo/issues/8
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/153
Refs: https://codeberg.org/forgejo/forgejo/issues/123
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/299
(cherry picked from commit 08dcef0c8cc9cdf5d786a925f18c1ec0cf3364da)
[DOCS] CONTRIBUTING/RELEASE: https://forgejo.org/docs/admin
Because the version is not displayed on the landing page of Forgejo,
there cannot be a link to a versionned documentation. There must exist
a link that points to the latest version on the website for the
forgejo instance to display.
Better but more complicated approaches could be to:
* Embed the documentation in Forgejo
* Allow the admin to not display the help
* Allow the admin to display a versionned help or not
(cherry picked from commit 83cc38923935dcc7edca22756d6fc10988a58540)
(cherry picked from commit 5df52b8a4f6ebd184999a19dd10138a8e3980869)
(cherry picked from commit 9a66b3d70b6e7d2a3ee146d3708d48d8f9bfe305)
[DOCS] CONTRIBUTING/RELEASE: reminder to update FORGEJO_VERSION
(cherry picked from commit 2a4d0bd164e55fc981d9437d8220a9c1e00ca59b)
(cherry picked from commit 6577fad1c9)
(cherry picked from commit d5b78a53fe63a9dd556cd59fc9c9c2e7c9867016)
(cherry picked from commit ddc09375ca)
(cherry picked from commit 06015101a1)
(cherry picked from commit 9c7208b3f6)
Although it would be possible to modify these files, it would create
conflicts when rebasing. Instead, this commit removes them entirely
and another commit can start from scratch, borrowing content from the
original files.
The drawback of this approach is that some content updates from Gitea
that also need updating in Forgejo will have to be copy/pasted
instead of being merged.
(cherry picked from commit eb85782115)
(cherry picked from commit 34401f2004445f225a479b8258180f498ac87847)
(cherry picked from commit ef43b1c6910a01a5f9dbd054e23372f6f17f4d9e)
(cherry picked from commit d17fe25e2f915e778eb968c20939dc253f47bcd5)
(cherry picked from commit c4f688fe5426dad5c496fe2d3cdb095ae9794226)
(cherry picked from commit 4628d06534)
(cherry picked from commit 4a2a956138e9e1b15e366fe8d3a40806ae7984fe)
(cherry picked from commit b8f57065df)
(cherry picked from commit c4a1a695ff)
(cherry picked from commit a6a768de7d)
(cherry picked from commit 1d7ce2a39c841e77492ef08c0e86c3544ecca88d)
(cherry picked from commit 1abfc0c0a17a429102ba5f70b874263cc7b2ecf8)
(cherry picked from commit 823ab34c64b275bf57fa60fef25a67338d8cb26e)
(cherry picked from commit 095a5b0c88543e40853cc95dc21e7cc6614d20e8)
(cherry picked from commit b0e5c7504a)
(cherry picked from commit 107f64a02ec4f9a7e6174cdd13fd9f78faf81878)
(cherry picked from commit e76c50c95d)
(cherry picked from commit 6ebb567eb5)
(cherry picked from commit c99026eb35)
(cherry picked from commit c2a7aaeee82293793b2740251dc5fd27dfb32ddb)
(cherry picked from commit 4277bdb7414885ef87a4c72fa73c088caa7cc5f1)
(cherry picked from commit adebc446711af1342671a75570edc69c73a480e9)
(cherry picked from commit 9a7332c2be588884056e34aa301f37967f33c0f2)
(cherry picked from commit cf5e3b046c)
(cherry picked from commit eec15a625e621e2e884c8740815881a54fae20fb)
(cherry picked from commit 1d7d8f4565)
(cherry picked from commit a6e1410f26)
(cherry picked from commit 61bcece963)
(cherry picked from commit 6d910daafb)
(cherry picked from commit d447861cc911aa89539cbbcdbbf0e68d0bc23e53)
(cherry picked from commit 60071e20a9c1fcb61ac8029835768bd9b86d8f47)
(cherry picked from commit 0915c367ced393d203f86dbfb8c9a3e32252c28d)
(cherry picked from commit 9438f6e42267714753df76716e03098dbf88a13d)
(cherry picked from commit 90177a2b95)
(cherry picked from commit 9f776eae4878912a1c937f5172c27e6ccf5989b5)
(cherry picked from commit a3ec7ab137)
(cherry picked from commit 0623524e68)
(cherry picked from commit a4bb93239d)
Backport #24382 by @lunny
Fix https://github.com/go-gitea/gitea/pull/24362/files#r1179095324
`getAuthenticatedMeta` has checked them, these code are duplicated one.
And the first invokation has a wrong permission check. `DownloadHandle`
should require read permission but not write.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Backport #24362 by @jolheiser
> The scoped token PR just checked all API routes but in fact, some web
routes like `LFS`, git `HTTP`, container, and attachments supports basic
auth. This PR added scoped token check for them.
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Backport #24339 by @yardenshoham
I made it render the script even if the repo is archived
- Fixes#24324
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Yarden Shoham <git@yardenshoham.com>
Backport #24307Fix#24305
According to MDN, "bold" starts from 700, some fonts do not provide
"bolding" for weight 600
Manually backport, no CSS conflict.
Backport #24035 by @garymoon
This change prevents Gitea from bypassing the manual approval process
for newly registered users when OIDC is used.
- Resolves https://github.com/go-gitea/gitea/issues/23392
Signed-off-by: Gary Moon <gary@garymoon.net>
Co-authored-by: Gary Moon <garymoon@users.noreply.github.com>
Backport #24116 by @techknowlogick
Proposal found here: https://github.com/go-gitea/gitea/issues/23654
TODO: make non-breaking (can we publish docker image using dev and
nightly prefix? at same time). if anyone has advice please comment :)
If this PR is merged, then I can add redirects to the downloads site.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Backport #24148
`repoCtx.CommitsCount` is not reliably the commit count of the default
branch (Repository.GetCommitsCount depends on what is currently
displayed).
_contributed in the context of @forgejo_
---------
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Backport #24194 by @harryzcy
- [x] Identify endpoints that should be public
- [x] Update integration tests
Fix#24159
Co-authored-by: harryzcy <harry@harryzheng.com>
Backport #24202Close#24195
Fix the bug:
1. The old code doesn't handle `removedfile` event correctly
2. The old code doesn't provide attachments for type=CommentTypeReview
---------
Co-authored-by: silverwind <me@silverwind.io>
Backport #24184 by @krzysztofjeziorny
A vertical overflow appears in Firefox 112/MacOS 12.6 when the system
setting for scrollbars is to "Always" show them.
Here, the fixed 100vw container widths are removed, which removes the
overflow. It is, however, only simulated in Developer Tools in latest
Firefox and Chromium, so please test on a Gitea installation.
Co-authored-by: Krzysztof Jeziorny <872730+krzysztofjeziorny@users.noreply.github.com>
Backport #24192 by @brechtvl
Rendering of Allow Edits from Maintainers did not check if the head repo
exists, while other parts of the page handle it gracefully.
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Backport #24161 by @wxiaoguang
## Before
* The renaming detection is wrong (eg: pasting a new name into the input
doesn't trigger the detection)
* The renaming prompt layout is not good
* Some MaxSize/maxlength rules is missing
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Backport #24105 by @lunny
In #12269, all string fields of struct will generate a NVARCHAR column
in database, but for those Gitea instances installed before that PR,
users have to convert columns themselves.
In this PR, we update the `./gitea admin convert` commands to support
both MySQL and MSSQL database converting. Previously, it only supported
converting `utf8 -> utf8mb4` for MySQL.
Now, it will check the database types.
If it's MSSQL, it will convert `VARCHAR -> NVARCHAR` as well.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>