mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	dont' send assign webhooks when creating issue (#5365)
This commit is contained in:
		
				
					committed by
					
						
						techknowlogick
					
				
			
			
				
	
			
			
			
						parent
						
							3a95e2d0ea
						
					
				
				
					commit
					499bff43d9
				
			@@ -159,12 +159,13 @@ func (issue *Issue) changeAssignee(sess *xorm.Session, doer *User, assigneeID in
 | 
			
		||||
		return fmt.Errorf("createAssigneeComment: %v", err)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// if issue/pull is in the middle of creation - don't call webhook
 | 
			
		||||
	if isCreate {
 | 
			
		||||
		return nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	mode, _ := accessLevel(sess, doer.ID, issue.Repo)
 | 
			
		||||
	if issue.IsPull {
 | 
			
		||||
		// if pull request is in the middle of creation - don't call webhook
 | 
			
		||||
		if isCreate {
 | 
			
		||||
			return nil
 | 
			
		||||
		}
 | 
			
		||||
		if err = issue.loadPullRequest(sess); err != nil {
 | 
			
		||||
			return fmt.Errorf("loadPullRequest: %v", err)
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user