(cherry picked from commit 481d813539)
address oliverpool comments
(cherry picked from commit d8f313f9e2)
s/Printf/Print/
(cherry picked from commit 6621b04458)
do not run initDB within integration tests
(cherry picked from commit 5a0428ede3)
(cherry picked from commit e8287b753d)
(cherry picked from commit e84e43887b)
[DOCS] RELEASE-NOTES: add scoped access tokens
(cherry picked from commit 688f831853)
[DOCS] RELEASE-NOTES: Scoped labels
(cherry picked from commit 747479a07b)
[DOCS] RELEASE-NOTES: OIDC groups
(cherry picked from commit 10c505fe89)
[DOCS] RELEASE-NOTES: Copy Link is broken
On firefox it fails with Uncaught TypeError: navigator.clipboard is
undefined
On chromium it fails with Uncaught TypeError: Cannot read properties of undefined (reading 'writeText')
(cherry picked from commit 148b2ff093)
[DOCS] RELEASE-NOTES: Copy citation
(cherry picked from commit d0f217735f)
[DOCS] RELEASE-NOTES: Support org/user level projects
(cherry picked from commit de845c7bcf)
[DOCS] RELEASE-NOTES: v1.19 has a documentation
(cherry picked from commit 9a5b46da32)
[DOCS] RELEASE-NOTES: do not split webhook section
(cherry picked from commit 00ed020321)
[DOCS] RELEASE-NOTES: Incoming emails
(cherry picked from commit 06c455b33b)
[DOCS] RELEASE-NOTES: secrets are an implementation detail
(cherry picked from commit 8236dc3a57)
[DOCS] RELEASE-NOTES: Prohibit fork if user reached maximum
(cherry picked from commit 0f80b8c696)
[DOCS] RELEASE-NOTES: scoped tokens: do not duplicate the docs
(cherry picked from commit 9bc4793c07)
[DOCS] RELEASE-NOTES: rss feed for tags and releases
(cherry picked from commit 599b36fada)
[DOCS] RELEASE-NOTES: protected branches wildcard
(cherry picked from commit 2b316c4950)
[DOCS] RELEASE-NOTES: disable releases
(cherry picked from commit 9a60773f1d)
[DOCS] RELEASE-NOTES: review box
(cherry picked from commit 09867dd122)
[DOCS] RELEASE-NOTES: asciicast support
(cherry picked from commit ea9658379b)
[DOCS] RELEASE-NOTES: attention blocks
(cherry picked from commit 70b387750b)
[DOCS] RELEASE-NOTES: commit cross reference
(cherry picked from commit fe706dad13)
[DOCS] RELEASE-NOTES: strip user completion border case
(cherry picked from commit 33ca51b4b6)
[DOCS] RELEASE-NOTES: card preview
(cherry picked from commit 626cd78ca6)
[DOCS] RELEASE-NOTES: raw copy button
(cherry picked from commit edfb467d64)
[DOCS] RELEASE-NOTES: allow edits by maintainers by default
(cherry picked from commit 7006405bc6)
[DOCS] RELEASE-NOTES: database auto migration is a little arcane
(cherry picked from commit 78030fa9af)
[DOCS] RELEASE-NOTES: fix typos & minor rewording
(cherry picked from commit ae1d47f656)
(cherry picked from commit ad08ca9955)
[DOCS] RELEASE-NOTES: webhook authorization header
(cherry picked from commit c35e2c4f6f)
[DOCS] RELEASE-NOTES: video element in markdown
(cherry picked from commit bcb0bd51d2)
[DOCS] RELEASE-NOTES: move scoped labels to the documentation
(cherry picked from commit c5eedaf4f3)
[DOCS] RELEASE-NOTES: cosmetic improvements
(cherry picked from commit b93df350d9)
[DOCS] RELEASE-NOTES: 1.19.0-0 is really : 1.19.0-2
(cherry picked from commit 60d770c2c9)
[DOCS] RELEASE-NOTES: relevant repositories
(cherry picked from commit de6ed5b87f)
(cherry picked from commit 71d91fdf22)
[DOCS] RELEASE-NOTES: semantic version
(cherry picked from commit af062d77f0)
[DOCS] RELEASE-NOTES: reflogs
(cherry picked from commit 084713d8aa)
(cherry picked from commit 20b5669269)
(cherry picked from commit 1574643a6a)
Update semantic version according to specification
(cherry picked from commit 22510f4130)
Mise à jour de 'Makefile'
(cherry picked from commit c3d85d8409)
(cherry picked from commit 5ea2309851)
(cherry picked from commit 4f3970e6c4)
[API] [SEMVER] replace number with version
[API] [SEMVER] [v1.20] less is replaced by css
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 34401f2004)
(cherry picked from commit ef43b1c691)
(cherry picked from commit d17fe25e2f)
(cherry picked from commit c4f688fe54)
Backport #23523, Close#23517
There is no "dropdown menu" for image/csv view, so we could only add the
"overflow-x: scroll" to the image/csv view.
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Backport #23125 by @delvh
Furthermore improved/deleted some comments in the template.
The appearance did not change.
Co-authored-by: delvh <leon@kske.dev>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Backport #23387Close#22934
In `/user/repos` API (and other APIs related to creating repos), user
can specify a readme template for auto init. At present, if the
specified template does not exist, a `500` will be returned . This PR
improved the logic and will return a `400` instead of `500`.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Backport #23512.
Update replace:
```diff
- replace github.com/nektos/act => gitea.com/gitea/act v0.234.2-0.20230131074955-e46ede1b1744
+ replace github.com/nektos/act => gitea.com/gitea/act v0.243.1
```
Update require:
```diff
- github.com/nektos/act v0.0.0
+ github.com/nektos/act v0.2.43
```
Actually, `v0.2.43` doesn't work, it will be replaced by `gitea/act`, so
it's OK to put any version here. But `gitea/act` is based on
`nektos/act`, so keeping the right upstream version will make security
dependabot help.
BTW, the [security
report](https://github.com/go-gitea/gitea/security/dependabot/20) is
false positive, we don't use the artifact server in act, see #22738.
Backport #23462 by @sillyguodong
Close#23440
Cause by #23189
In #23189, we should insert a comment record into db when pushing a
commit to the PR, even if the PR is closed.
But should skip sending any notification in this case.
Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Backport #23475 by @yardenshoham
Exactly like #22302 but in the issue list page
Co-authored-by: Yarden Shoham <hrsi88@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Backport #23430 by @brechtvl
* Fix scoped label left and right part breaking across lines.
* Remove slanted divider in scoped label display, make it straight.
After using this for a while, this feels more visually noisy than
helpful.
* Reduce contrast between scope and item to reduce probability of
unreadable text on background.
* Change documentation to remove mention of non-exclusive scoped labels.
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Backport #23420 by @wxiaoguang
Close#23411
Always pass "page" query parameter to backend, and make backend respect
it.
The `ctx.FormInt("limit")` is never used, so removed.
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Backport #23451 by @jolheiser
This PR just adds the `purge` query parameter to the swagger docs for
admin user delete.
I considered using the same verbiage we have in the UI, but that seemed
more verbose than descriptions we use elsewhere in swagger. I'm fine if
that's preferred, though, just let me know. 🙂
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Backport #22451 by @philip-peterson
This PR adds support for reflogs on all repositories. It does this by
adding a global configuration entry.
Implements #14865
Signed-off-by: Philip Peterson <philip.c.peterson@gmail.com>
Co-authored-by: Philip Peterson <philip-peterson@users.noreply.github.com>
Backport #23406 by @baez90
When creating attachments (issue, release, repo) the file size (being
part of the multipart file header) is passed through the chain of
creating an attachment to ensure the MinIO client can stream the file
directly instead of having to read it to memory completely at first.
Fixes#23393
Co-authored-by: Peter <peter.kurfer@googlemail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Backport #22705 by @yp05327
Fixes https://github.com/go-gitea/gitea/issues/22676
Context Data `IsOrganizationMember` and `IsOrganizationOwner` is used to
control the visibility of `people` and `team` tab.
2871ea0809/templates/org/menu.tmpl (L19-L40)
And because of the reuse of user projects page, User Context is changed
to Organization Context. But the value of `IsOrganizationMember` and
`IsOrganizationOwner` are not being given.
I reused func `HandleOrgAssignment` to add them to the ctx, but may have
some unnecessary variables, idk whether it is ok.
I found there is a missing `PageIsViewProjects` at create project page.
Co-authored-by: yp05327 <576951401@qq.com>
Backport #23397
When there is an error creating a new openIDConnect authentication
source try to handle the error a little better.
Close#23283
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
Backport #23174
The CSS styles in Gitea themes are out-of-sync of Chroma's styles.
This PR introduces a `chroma-style-diff.go` tool to compare the diff.
The missing CSS styles have been added manually. They are left as empty
to reduce arguments because there was no color for them before.
And this PR fixes#22348, with just 2 lines changed: `.chroma .kt & .n`,
these colors are taken from GitHub.
It's good enough for #22348
![image](https://user-images.githubusercontent.com/2114189/221551941-0d27d11d-e71e-498f-8e88-92b558fe4a18.png)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Backport #22568
The merge and update branch code was previously a little tangled and had
some very long functions. The functions were not very clear in their
reasoning and there were deficiencies in their logging and at least one
bug in the handling of LFS for update by rebase.
This PR substantially refactors this code and splits things out to into
separate functions. It also attempts to tidy up the calls by wrapping
things in "context"s. There are also attempts to improve logging when
there are errors.
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: delvh <dev.lh@web.de>