Commit 7bbc2341 authored by Grant Young's avatar Grant Young

Hotfix for git_push guards

Was using wrong type and causing a false postive in some cases
parent 7d93fa1a
......@@ -104,7 +104,7 @@ export function prepareGitPushData(projects) {
branch_set_new_head: open(`./push_data/data/set_new_head-${project['name']}-${project['git_push_data']['branch_new_head_sha']}.bundle`, "b")
}
} catch (error) {
console.error(`⚠️ ERROR: Git push data files not found: '${error}'`);
console.error(`⚠️ ERROR: Git push data files not found. This is likely due to a data generation issue. Contact GitLab quality team for further support.`);
project.data = false
}
});
......
......@@ -12,7 +12,7 @@ module GitTest
def prepare_git_push_data(env_vars:)
projects = JSON.parse(env_vars["ENVIRONMENT_PROJECTS"])
projects.each do |project|
return false if project.dig(:git_push_data).nil? || %w[branch_current_head_sha","branch_new_head_sha","branch_name"].all? { |subkey| project["git_push_data"].key?(subkey) }
return false if project.dig('git_push_data').nil? || %w[branch_current_head_sha","branch_new_head_sha","branch_name"].all? { |subkey| project["git_push_data"].key?(subkey) }
branch_current_head = project["git_push_data"]["branch_current_head_sha"]
branch_new_head = project["git_push_data"]["branch_new_head_sha"]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment