mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Mirror fix on transfer repo
This commit is contained in:
		@@ -350,10 +350,18 @@ func NewRepoAction(u *User, repo *Repository) (err error) {
 | 
			
		||||
 | 
			
		||||
// TransferRepoAction adds new action for transfering repository.
 | 
			
		||||
func TransferRepoAction(u, newUser *User, repo *Repository) (err error) {
 | 
			
		||||
	if err = NotifyWatchers(&Action{ActUserId: u.Id, ActUserName: u.Name, ActEmail: u.Email,
 | 
			
		||||
		OpType: TRANSFER_REPO, RepoId: repo.Id, RepoUserName: newUser.Name,
 | 
			
		||||
		RepoName:  repo.Name,
 | 
			
		||||
		IsPrivate: repo.IsPrivate}); err != nil {
 | 
			
		||||
	action := &Action{
 | 
			
		||||
		ActUserId:    u.Id,
 | 
			
		||||
		ActUserName:  u.Name,
 | 
			
		||||
		ActEmail:     u.Email,
 | 
			
		||||
		OpType:       TRANSFER_REPO,
 | 
			
		||||
		RepoId:       repo.Id,
 | 
			
		||||
		RepoUserName: newUser.Name,
 | 
			
		||||
		RepoName:     repo.Name,
 | 
			
		||||
		IsPrivate:    repo.IsPrivate,
 | 
			
		||||
		Content:      path.Join(repo.Owner.LowerName, repo.LowerName),
 | 
			
		||||
	}
 | 
			
		||||
	if err = NotifyWatchers(action); err != nil {
 | 
			
		||||
		log.Error(4, "NotifyWatchers: %d/%s", u.Id, repo.Name)
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user