Commit a06beceb authored by Robert Speicher's avatar Robert Speicher

Merge branch 'lm-add-merged-yaml' into 'master'

Add mergedYaml to CiConfigResolver

See merge request gitlab-org/gitlab!53081
parents 96e1ff10 ce88f33d
......@@ -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