Push branch commits and update the existing MR body safely (prefer REST API)
.gitlab/merge_request_templates/MERGE_REQUEST_TEMPLATE.md using the current main...HEAD diff.glab mr update (fallback to glab api).Use this when you already have an MR open and need to refresh its description to match the latest branch changes.
task validategit diff main...HEAD --statgit diff main...HEADgit log main...HEAD --onelinegit push -u origin HEADgit pushglab mr view "$(git rev-parse --abbrev-ref HEAD)" --output json | jq '{iid: .iid, url: .web_url}'glab mr list --source-branch "$(git rev-parse --abbrev-ref HEAD)" --output json | jq '.[0] | {iid: .iid, url: .web_url}'.gitlab/merge_request_templates/MERGE_REQUEST_TEMPLATE.md) and fill:
main...HEAD diff (group by area; reference key paths)task validateglab mr update <MR_IID> --description "$(cat <<'EOF'
<filled template body>
EOF
)"
project="$(glab repo view --output json | jq -r '.path_with_namespace')"
glab api "projects/$(python3 -c 'import sys, urllib.parse; print(urllib.parse.quote(sys.argv[1], safe=""))' "${project}")/merge_requests/<MR_IID>" \
--method PUT \
--raw-field description="$(cat <<'EOF'
<filled template body>
EOF
)"