Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/mutations/notes/create/note.rb')
-rw-r--r--app/graphql/mutations/notes/create/note.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/graphql/mutations/notes/create/note.rb b/app/graphql/mutations/notes/create/note.rb
index 5a5d62a8c20..1cfc11c6b11 100644
--- a/app/graphql/mutations/notes/create/note.rb
+++ b/app/graphql/mutations/notes/create/note.rb
@@ -5,12 +5,18 @@ module Mutations
module Create
class Note < Base
graphql_name 'CreateNote'
+ description "Creates a Note.\n#{QUICK_ACTION_ONLY_WARNING}"
argument :discussion_id,
::Types::GlobalIDType[::Discussion],
required: false,
description: 'Global ID of the discussion this note is in reply to.'
+ argument :merge_request_diff_head_sha,
+ GraphQL::Types::String,
+ required: false,
+ description: 'SHA of the head commit which is used to ensure that the merge request has not been updated since the request was sent.'
+
private
def create_note_params(noteable, args)
@@ -28,7 +34,8 @@ module Mutations
end
super(noteable, args).merge({
- in_reply_to_discussion_id: discussion_id
+ in_reply_to_discussion_id: discussion_id,
+ merge_request_diff_head_sha: args[:merge_request_diff_head_sha]
})
end