mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 13:28:25 +00:00 
			
		
		
		
	* Fix #6946 by checking PullRequest ID on pushing * Ensure we have the owner name, the pr attributes and the the issue * Fix TestSearchRepo by waiting till indexing is done * Update integrations/repo_search_test.go * changes as per @mrsdizzie * missing comma * Spelling mistake * Fix full pushing environment
This commit is contained in:
		@@ -231,7 +231,17 @@ func Merge(pr *models.PullRequest, doer *models.User, baseGitRepo *git.Repositor
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	env := models.PushingEnvironment(doer, pr.BaseRepo)
 | 
			
		||||
	headUser, err := models.GetUserByName(pr.HeadUserName)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		if !models.IsErrUserNotExist(err) {
 | 
			
		||||
			log.Error("Can't find user: %s for head repository - %v", pr.HeadUserName, err)
 | 
			
		||||
			return err
 | 
			
		||||
		}
 | 
			
		||||
		log.Error("Can't find user: %s for head repository - defaulting to doer: %s - %v", pr.HeadUserName, doer.Name, err)
 | 
			
		||||
		headUser = doer
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	env := models.FullPushingEnvironment(headUser, doer, pr.BaseRepo, pr.ID)
 | 
			
		||||
 | 
			
		||||
	// Push back to upstream.
 | 
			
		||||
	if err := git.NewCommand("push", "origin", pr.BaseBranch).RunInDirTimeoutEnvPipeline(env, -1, tmpBasePath, nil, &errbuf); err != nil {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user