Backport #34094 by @lunny
When visit commit list, it would update the user avatar even if id = 0,
which was unnecessary operations. This PR returned default avatar for
the git only user avatar rendering who's user id is zero.
```log
database duration=0.0005s db.sql="UPDATE `user` SET `avatar` = ?, `updated_unix` = ? WHERE `id`=?"
database duration=0.0007s db.sql="UPDATE `user` SET `avatar` = ?, `updated_unix` = ? WHERE `id`=?"
...
```
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Backport #34053
When a team have no code unit permission of a repository, the member of
the team should not view activity contributors, recent commits and code
frequrency.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Backport #34061 by eeyrjmr
The doctor storage check reconstructs the lfs oid by producing a string
where the path separator is stripped
ab/dc/efg -> abdcefg. Windows however uses a backslash and thus the
ReplaceAll call doesn't produce the correct oid resulting in all lfs
objects being classed as orphaned.
This PR allows this to be more OS agnostic.
Closes#34039
Co-authored-by: JonRB <4564448+eeyrjmr@users.noreply.github.com>
Fix#33490
Backport #33744
It will only read the changed file on the pushed commits but not all the
files of this PR.
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Backport #34035 by charles7668
Close#34022 , #33550
This error message always appears when using the `check-attr` command,
even though it works correctly.
The issue occurs when the stdin writer is closed, so I added a special
case to handle and check the error message when the exit code is 1.
Co-authored-by: charles <30816317+charles7668@users.noreply.github.com>
Backport #33888 by @wxiaoguang
Fix#33886
Restore the old logic from #16510, which was incorrectly removed by
#33678
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Backport #33833 by Vinoth-kumar-Ganesan
when the passkey auth and register was disabled
the unwanted ui container was show
Co-authored-by: Vinoth Kumar <103478407+Vinoth-kumar-Ganesan@users.noreply.github.com>
Co-authored-by: Vinoth414 <103478407+Vinoth414@users.noreply.github.com>
Backport #33747 by @silverwind
It seems something broken `google/go-licenses` (maybe related to go
1.24), and my findings are in
https://github.com/google/go-licenses/issues/128#issuecomment-2689753365.
I think it's best we disable this generation for now until a better
solution is found.
Also, enable showing stderr output so we can actually debug this thing.
For reference, these are the errors that currently apparently break the
tool:
```
E0228 05:15:27.005759 13158 library.go:117] Package text/tabwriter does not have module info. Non go modules projects are no longer supported. For feedback, refer to https://github.com/google/go-licenses/issues/128.
E0228 05:15:27.005776 13158 library.go:117] Package net/http/fcgi does not have module info. Non go modules projects are no longer supported. For feedback, refer to https://github.com/google/go-licenses/issues/128.
F0228 05:15:27.028122 13158 main.go:77] some errors occurred when loading direct and transitive dependency packages
```
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Fix regression from #32210 which unintentionally changed the search mode
for bleve from MaatchPhraseQuery to MatchQuery.
On the main branch, meanwhile with #33590 a "literal code search" mode
(by using quotes) was implemented as workaround for this unexpected code
search behavior. Maybe that feature needs some redesign as it turns out
to have been caused by a regression.
But this PR at least already fixes the regression for 1.23.x
Backport #33686 by @lunny
Fix#33582Fix#31698
When a user login, the dashboard should load all feed belongs to him
with no any conditions. The complicated conditions should be applied
only for another user view this user's profile.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>