createDiffNote GraphQL mutation should use the CreateDiffNoteInput.position.headSha for /merge quick action
In the epic &7648 we explain how /merge
quick action wasn't supported for createNote
mutation.
The reason was that the merge logic expects us to submit merge_request_head_diff_sha
. This attribute serves optimistic locking. If we try to merge, but we don't have the latest HEAD_SHA, the quick action will fail.
The related createDiffNote
now fails with this error:
{
"createDiffNote": {
"errors":["Commands only The `/merge` quick action requires the SHA of the head of the branch."],
"note":null
}
}
The createDiffNote
mutation takes CreateDiffNoteInput
. This input contains DiffPositionInput
which contains the headSha
parameter.
The quick action logic should be able to use this headSha
and not require any changes to the createDiffNote
mutation interface.
Edited by Tomas Vik