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