Commit ce88f33d authored by lauraMon's avatar lauraMon

Adds mergedYaml to configResolver

* updates specs
parent 14fed7a3
......@@ -29,6 +29,12 @@ module Resolvers
.new(project: project, current_user: context[:current_user])
.validate(content, dry_run: dry_run)
response(result).merge(merged_yaml: result.merged_yaml)
end
private
def response(result)
if result.errors.empty?
{
status: :valid,
......@@ -43,8 +49,6 @@ module Resolvers
end
end
private
def make_jobs(config_jobs)
config_jobs.map do |job|
{
......
---
title: 'GraphQL: Add mergedYaml to CiConfigResolver response'
merge_request: 53081
author:
type: changed
......@@ -36,7 +36,8 @@ RSpec.describe Resolvers::Ci::ConfigResolver do
File.read(Rails.root.join('spec/support/gitlab_stubs/gitlab_ci_includes.yml'))
end
it 'lints the ci config file' do
it 'lints the ci config file and returns the merged yaml file' do
expect(response[:merged_yaml]).to eq(content)
expect(response[:status]).to eq(:valid)
expect(response[:errors]).to be_empty
end
......
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