You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I pass in a position object into MergeRequestDiscussions.create, I expected my MR comment to appear on a given line.
However it appears directly in the Overview tab.
Steps to reproduce
Invoke the api with appropriate arguments.
Expected behaviour
Comment created on a diff line.
Actual behaviour
Comment created as a standalone note.
Possible fixes
Looking at the request and response that was sent, it seems that the type of the created note is "DiscussionNote" when it should be "DiffNote".
I went and tried the same request and body in postman and was able to get it to work (it returned "DiffNote" and the comment appeared on the line). This was when the data was sent as form-data.
However when I changed the body to JSON (with Content-Type = application/json), it generated a "DiscussionNote" instead.
If I forcefully add "isForm" to the options passed to MergeRequestDiscussions.create, it works as expected.
Should isForm be defaulted to true for this? Otherwise position options don't work as expected.
Checklist
I have checked that this is not a duplicate issue.
I have read the documentation.
The text was updated successfully, but these errors were encountered:
Description
When I pass in a position object into
MergeRequestDiscussions.create
, I expected my MR comment to appear on a given line.However it appears directly in the Overview tab.
Steps to reproduce
Invoke the api with appropriate arguments.
Expected behaviour
Comment created on a diff line.
Actual behaviour
Comment created as a standalone note.
Possible fixes
Looking at the request and response that was sent, it seems that the type of the created note is "DiscussionNote" when it should be "DiffNote".
I went and tried the same request and body in postman and was able to get it to work (it returned "DiffNote" and the comment appeared on the line). This was when the data was sent as form-data.
However when I changed the body to JSON (with Content-Type = application/json), it generated a "DiscussionNote" instead.
If I forcefully add "isForm" to the options passed to
MergeRequestDiscussions.create
, it works as expected.Should
isForm
be defaulted to true for this? Otherwise position options don't work as expected.Checklist
The text was updated successfully, but these errors were encountered: