mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Fix virutal user
This commit is contained in:
		@@ -4,7 +4,10 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
package bots
 | 
					package bots
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import user_model "code.gitea.io/gitea/models/user"
 | 
					import (
 | 
				
			||||||
 | 
						user_model "code.gitea.io/gitea/models/user"
 | 
				
			||||||
 | 
						"code.gitea.io/gitea/modules/structs"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// NewBotUser creates and returns a fake user for running the build.
 | 
					// NewBotUser creates and returns a fake user for running the build.
 | 
				
			||||||
func NewBotUser() *user_model.User {
 | 
					func NewBotUser() *user_model.User {
 | 
				
			||||||
@@ -12,5 +15,13 @@ func NewBotUser() *user_model.User {
 | 
				
			|||||||
		ID:                      -2,
 | 
							ID:                      -2,
 | 
				
			||||||
		Name:                    "gitea-bots",
 | 
							Name:                    "gitea-bots",
 | 
				
			||||||
		LowerName:               "gitea-bots",
 | 
							LowerName:               "gitea-bots",
 | 
				
			||||||
 | 
							IsActive:                true,
 | 
				
			||||||
 | 
							FullName:                "Gitea Bots",
 | 
				
			||||||
 | 
							Email:                   "teabot@gitea.io",
 | 
				
			||||||
 | 
							KeepEmailPrivate:        true,
 | 
				
			||||||
 | 
							LoginName:               "gitea-bots",
 | 
				
			||||||
 | 
							Type:                    user_model.UserTypeIndividual,
 | 
				
			||||||
 | 
							AllowCreateOrganization: true,
 | 
				
			||||||
 | 
							Visibility:              structs.VisibleTypePublic,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user