silverwind
b8e9d3c553
Backport https://github.com/go-gitea/gitea/pull/30237 to 1.22. Also includes https://github.com/go-gitea/gitea/pull/30183. Both were clean cherry-picks. Co-authored-by: Giteabot <teabot@gitea.io>