Skip to content

fix(cli): correct GitLab patch publication - #817

Draft
kmbroai wants to merge 4 commits into
mainfrom
dev/kyleb/gitlab-patch-publication-fixes
Draft

fix(cli): correct GitLab patch publication#817
kmbroai wants to merge 4 commits into
mainfrom
dev/kyleb/gitlab-patch-publication-fixes

Conversation

@kmbroai

@kmbroai kmbroai commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Match GitLab patch merge requests by branch and project identity, normalize SSH repository selectors, and preserve generated descriptions as advisory text. This follows up on #814.

Changes

  • Reuse an existing merge request only when its source and target project IDs match. Request only those IDs and the URL from glab to avoid buffering full descriptions.
  • Normalize SCP-style origins to explicit SSH URLs for glab source and target project selection.
  • Escape quick-action text in GitLab descriptions while preserving the CLI report and GitHub body.
  • Check the default body in the routing matrix and remove duplicate GitLab retry rows; retain missing-client recovery and repeated reuse coverage.

Testing

  • Focused CLI patch and patch-browser tests: 55 passed, 0 failed, including fork-only and fork-before-same-project results, SSH selectors, and description handling.
  • pnpm run types and pnpm run format passed.
  • A subprocess probe reproduced the buffer failure with 1.23 MB of MR metadata; projecting the required fields returned 4.5 KB and preserved the selected MR.
  • GitLab API calls are mocked in regression tests; no live GitLab merge request was created during validation.

Risk and rollout

The existing command syntax, defaults, JSON result, and GitHub publication arguments are unchanged. These changes apply to GitLab selection and publication through the existing --create-pr and --resume-pr paths.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@github-actions github-actions Bot added the bug Something isn't working label Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant