Skip to content
Snippets Groups Projects
Commit bbfe190c authored by Luke Duncalfe's avatar Luke Duncalfe :red_circle:
Browse files

Expose diff_refs on MergeRequestType

parent 2693b02e
No related branches found
No related tags found
No related merge requests found
Pipeline #69130986 failed
# frozen_string_literal: true
module Types
class DiffRefsType < BaseObject
graphql_name 'DiffRefs'
field :base_sha, GraphQL::STRING_TYPE, null: false
field :head_sha, GraphQL::STRING_TYPE, null: false
field :start_sha, GraphQL::STRING_TYPE, null: false
end
end
......@@ -23,6 +23,7 @@ class MergeRequestType < BaseObject
field :updated_at, Types::TimeType, null: false
field :source_project, Types::ProjectType, null: true
field :target_project, Types::ProjectType, null: false
field :diff_refs, Types::DiffRefsType, null: true
# Alias for target_project
field :project, Types::ProjectType, null: false
field :project_id, GraphQL::INT_TYPE, null: false, method: :target_project_id
......
# frozen_string_literal: true
require 'spec_helper'
describe GitlabSchema.types['DiffRefs'] do
it { expect(described_class.graphql_name).to eq('DiffRefs') }
it { expect(described_class).to have_graphql_fields(:base_sha, :head_sha, :start_sha) }
end
......@@ -13,7 +13,7 @@
description_html state created_at updated_at source_project target_project
project project_id source_project_id target_project_id source_branch
target_branch work_in_progress merge_when_pipeline_succeeds diff_head_sha
merge_commit_sha user_notes_count should_remove_source_branch
merge_commit_sha user_notes_count should_remove_source_branch diff_refs
force_remove_source_branch merge_status in_progress_merge_commit_sha
merge_error allow_collaboration should_be_rebased rebase_commit_sha
rebase_in_progress merge_commit_message default_merge_commit_message
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment