Backport #25214 by @KN4CK3R
The ghost user leads to inclusion of limited users/orgs in
`BuildCanSeeUserCondition`.
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
(cherry picked from commit a9ebf911fa)
Backport https://github.com/go-gitea/gitea/pull/25143
If redirect_to parameter has set value starting with \\example.com
redirect will be created with header Location: /\\example.com that will
redirect to example.com domain.
(cherry picked from commit a9030052a7)
Backport #24567 by @lunny
- Fix possible parallel creating commit status index problem and
creating issues/pull request index problem work with Mysql5/Mysql8
- Add parallel tests
- Reenable TestRepoCommitsStatusParallel on CI
Fix#22109
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit 3ef97932d5)
Backport #25019 by @lunny
Caused by #24362
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
(cherry picked from commit 73ae6b21d1)
Backport #24925, partially backport #24934
(`docs/content/doc/help/faq.zh-cn.md` file)
Part of backport has already done by #24942
Also backport #24881 to avoid "deadlock"
---------
Co-authored-by: Zettat123 <zettat123@gmail.com>
(cherry picked from commit 37b73b3337)
Backport #24979
Changes:
1. Use uniform links types relative to doc folder (start with `doc/`)
2. According to [docusaurus
links](https://docusaurus.io/docs/markdown-features/links), if `<a>` is
used, the `href` is resolved as URL location, but not file location. So
need to use `[text]({{< relref "path" >}})` instead.
(cherry picked from commit d2c9fb02dd)
replace #24868
just a patch to fix#24824 in v1.19.4
The reference name of commits when synchronizing should also has prefix
like refs/heads/<branch-name>.
(cherry picked from commit 826b7b979c)
It seems that `opts.RefFullName` may occassionally be set
to just the branch name, without the `refs/heads/` prefixing.
(cherry picked from commit 7dc46ffbaa)
Backport #24962 by @techknowlogick
caddy v1 is loong eol. v2 should be used.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
(cherry picked from commit 8a6a1143a4)
Backport #23939 by @lunny
This PR also adjusts the weights.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
(cherry picked from commit d1af0a3e4c)
Backport #24900Fix#24896
If users set different languages by `linguist-language`, the `stats` map
could be: `java: 100, Java: 200`.
Language stats are stored as case-insensitive in database and there is a
unique key.
So, the different language names should be merged to one unique name:
`Java: 300`
(cherry picked from commit a83d597989)
`Secrets` options should be hidden if `Actions` feature is disabled.
This fixes in release/v1.19. In main probably fixed in
63a401ac40 (didn't check).
Fixes: 659055138b
Author-Change-Id: IB#1134011
Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
(cherry picked from commit c5dee8823c)
Backport #24825 by @yardenshoham
The topics are saved in the repo_topic table with a repoID key. They are
also saved directly in the repository table.
Before this PR, only `AddTopic` and `SaveTopics` made sure the `topics`
field in the repository field was synced with the repo_topic table.
This PR makes sure `GenerateTopics` and `DeleteTopic` also sync the
`topics` in the repository table.
`RemoveTopicsFromRepo` doesn't need to sync the data as it is only used
to delete a repository.
- Fixes#24820
(cherry picked from commit 04f9ab1aa9)
Backport #24802 by @wolfogre
Regression of #24536. If the user doesn't explicitly disable Actions, it
will be enabled.
1. Gitea will call `loadRepositoryFrom` before `loadActionsFrom`.
25d4f95df2/modules/setting/setting.go (L234-L237)
2. In `loadRepositoryFrom`,
`rootCfg.Section("actions").Key("ENABLED").MustBool(true)` will set
`actions.ENABLED` with `true`.
25d4f95df2/modules/setting/repository.go (L313-L315)
3. In `loadActionsFrom`, `rootCfg.Section("actions")` will get a section
with Actions enabled.
25d4f95df2/modules/setting/actions.go (L23-L26)
Although the cause of the problem was using `true` by copy-paste
mistake, it also surprised me that
**`rootCfg.Section("actions").Key("ENABLED").MustBool(true)` doesn't
only read, but also write.**
Co-authored-by: Jason Song <i@wolfogre.com>
(cherry picked from commit b369ed579d)
Backport #24751 by @wxiaoguang
Make mailer SMTP check have timed context
Otherwise Gitea may block for long time if the DNS request blocks.
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 57f520e7e5)