mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 15:05:50 +01:00
(refs #324)Update commitIdFrom when pullrequest branch is updated
This commit is contained in:
@@ -617,5 +617,16 @@ object JGitUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the identifier of the root commit (or latest merge commit) of the specified branch.
|
||||
*/
|
||||
def getForkedCommitId(oldGit: Git, newGit: Git,
|
||||
userName: String, repositoryName: String, branch: String,
|
||||
requestUserName: String, requestRepositoryName: String, requestBranch: String): String =
|
||||
defining(getAllCommitIds(oldGit)){ existIds =>
|
||||
getCommitLogs(newGit, requestBranch, true) { commit =>
|
||||
existIds.contains(commit.name) && getBranchesOfCommit(oldGit, commit.getName).contains(branch)
|
||||
}.head.id
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user