mirror of
				https://github.com/gitbucket/gitbucket.git
				synced 2025-10-31 18:46:28 +01:00 
			
		
		
		
	(refs #2)Fix pull request and marge behavior.
This commit is contained in:
		| @@ -123,6 +123,20 @@ trait CreateRepositoryControllerBase extends ControllerBase { | ||||
|         getWikiRepositoryDir(repository.owner, repository.name), | ||||
|         getWikiRepositoryDir(loginUserName, repository.name)) | ||||
|  | ||||
|       // insert commit id | ||||
|       JGitUtil.withGit(getRepositoryDir(loginUserName, repository.name)){ git => | ||||
|         JGitUtil.getRepositoryInfo(loginUserName, repository.name, baseUrl).branchList.foreach { branch => | ||||
|           JGitUtil.getCommitLog(git, branch) match { | ||||
|             case Right((commits, _)) => commits.foreach { commit => | ||||
|               if(!existsCommitId(loginUserName, repository.name, commit.id)){ | ||||
|                 insertCommitId(loginUserName, repository.name, commit.id) | ||||
|               } | ||||
|             } | ||||
|             case Left(_) => ??? | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       // Record activity | ||||
|       recordForkActivity(repository.owner, repository.name, loginUserName) | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user