GET IT DONE AND SHIP IT WITH NO BUGS

Skip to content

fix(create-mr): preserve MR description newlines via os.environ

Duong Dong Long requested to merge fix/create-mr-description-newline into main

Summary

Port the MR #283 fix from imoni-mobile to the template create-mr.md.

The Step 4 POST payload interpolated $MR_DESC straight into the python3 -c source, which swallowed newlines and broke on quotes/backslashes/# — collapsing the MR markdown into one block.

Fix

  • Pass all values (SRC_BRANCH, TGT_BRANCH, MR_TITLE_FULL, MR_DESC, REVIEWER_ID) via env vars, read with os.environ[...] inside a quoted heredoc <<'PYEOF'.
  • json.dumps then escapes the description byte-for-byte to valid JSON.

Test plan

  • Run /create-mr on a branch whose description has ## headings + list items → MR renders with proper line breaks (this very MR is the proof).

Merge request reports