commitMessage is provided in the job from the EXTRA_VARIABLES_YAML
Change-Id: Ib254ee5031ff88d8049f30aff2450f11ec1ef99f
diff --git a/src/com/mirantis/mk/Gerrit.groovy b/src/com/mirantis/mk/Gerrit.groovy
index 4d04906..794af52 100644
--- a/src/com/mirantis/mk/Gerrit.groovy
+++ b/src/com/mirantis/mk/Gerrit.groovy
@@ -295,8 +295,7 @@
*/
LinkedHashMap getDependentPatches(LinkedHashMap changeInfo) {
def dependentPatches = [:]
- def currentChange = getGerritChange(changeInfo.gerritName, changeInfo.gerritHost, changeInfo.gerritChangeNumber, changeInfo.credentialsId, true)
- def dependentCommits = currentChange.commitMessage.tokenize('\n').findAll { it ==~ /Depends-On: \b[^ ]+\b(\/)?/ }
+ def dependentCommits = changeInfo.gerritCommitMessage.tokenize('\n').findAll { it ==~ /Depends-On: \b[^ ]+\b(\/)?/ }
if (dependentCommits) {
dependentCommits.each { commit ->
def patchLink = commit.tokenize(' ')[1]