def call(params)
results = []
client = params.gdc_gd_client
development_client = params.development_client
params.synchronize.peach do |info|
from_project = info.from
to_projects = info.to
from = development_client.projects(from_project) || fail("Invalid 'from' project specified - '#{from_project}'")
to_projects.peach do |entry|
pid = entry[:pid]
to_project = client.projects(pid) || fail("Invalid 'to' project specified - '#{pid}'")
params.gdc_logger.info(
"Transferring Custom Color Palette, from project: " \
"'#{from.title}', PID: '#{from.pid}', to project: " \
"'#{to_project.title}', PID: '#{to_project.pid}'"
)
GoodData::Project.transfer_color_palette(from, to_project)
results << {
from: from_project,
to: pid,
status: 'ok'
}
end
end
results
end