I’m trying to create a MR with a multiline description through the API.
I tried submitting it with:
- \n: \n displayed
- \n\n: \n\n displayed
- \r\n: \r\n displayed
- \r\n\r\n: \r\n\r\n displayed
: works but then formatting is wrong. E.g if we start the description with “# Title”, the whole description will follow the formatting.
Is there an easy way to pass it?
Here is my command:
curl \
-XPOST \
-s \
--header "PRIVATE-TOKEN: TOKEN" \
"https://gitlab.com/api/v4/projects/XXX/merge_requests" \
--data "id=XXX" \
--data "source_branch=test-mr-port" \
--data "target_branch=master" \
--data "remove_source_branch=true" \
--data "title=WIP: [XXX] TEST-DO-NOT-MERGE" \
--data "description=# Title\n\nThis MR has been automatically generated\n\nHello" \
--data "assignees_ids=XXX" \
--data "reviewer_ids[]=XXX" \
--data "reviewer_ids[]=XXX" \
--data "draft=false" \
Thanks