gitlab-create-merge-request
Installation
SKILL.md
Create Merge Request
Create a GitLab merge request for the current branch targeting main.
Steps
-
Get the first commit message of the current branch (compared to main):
git log main..HEAD --reverse --format="%s" | head -n 1 -
Build the description in a file containing REAL line breaks. Never put
\nor\\ninside a quoted-dargument: the shell passes those characters literally, so GitLab renders them as\ninstead of Markdown line breaks.Use the file tool or a quoted heredoc to create the body, then pass its contents:
glab mr create -t "<TITLE>" -d "$(cat /tmp/mr_body.md)" -b main -y