Virtual user gitea-bots

This commit is contained in:
Lunny Xiao authored and Jason Song committed 2022-11-25 17:48:46 +08:00
1 parent 1e209973ee
commit 339ddf4c5f
3 files changed
+26 -17

No files matched your search

+7
View File
@@ -577,6 +577,13 @@ func (u *User) IsGhost() bool {
return u.ID == -1 && u.Name == "Ghost"
}
func (u *User) IsBots() bool {
if u == nil {
return false
}
return u.ID == -2 && u.Name == "gitea-bots"
}
var (
reservedUsernames = []string{
".",