Repository navigation
fix(gitlab): follow the repository default merge request template - #19813
Conversation
…mplate "Follow change request templates" only worked for GitHub, because only the GitHub provider implemented readChangeRequestTemplate. GitLab merge request content was always generated without the repository's template. The GitLab provider now reads .gitlab/merge_request_templates/Default.md (any letter case) from the committed base tree. Other files in that directory are templates a user picks by hand, so a lone non-default file is not treated as the default. Symlinks and submodules are skipped, reads are capped, and a blank template counts as none. Addresses pingdotgg#12330
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR not approvable — This PR changes the default-enabled GitLab merge-request generation path so repository You can add or adjust custom eligibility rules. Learn more. |
|
Warning Review limit reachedOnly developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing. Next included review available in 6 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
Taking over this one as maintainer for batch worktree-git-14. I’ll keep this focused on GitLab’s committed Default.md template, rebuild the reader against the current package, and reduce the tests to the necessary generation behaviors. Human approval remains required. No merge. |
# Conflicts: # packages/source-control-gitlab/src/server/GitLabSourceControlProvider.ts
…ngdotgg#19813) Co-authored-by: Julius Marminge <julius0216@outlook.com> (cherry picked from commit 30a7330)
GitLab merge request generation ignored
followChangeRequestTemplatesbecause its provider did not implement the existing template reader. It now reads.gitlab/merge_request_templates/Default.mdfrom the requested committed base, with a case-insensitive filename. Other templates are never used as a fallback.The reader accepts regular Git blobs, trims blank content, returns no template on read failure, and bounds content at 8,000 bytes with a truncation marker. Feature-branch changes, uncommitted files, symlinks, and submodules do not supply the template. The existing setting and generation service handle forwarding; no client or contract changes are needed.
Rebuilt from @fixfon's #19813, preserving their history. Removed the standalone test suite and redundant stub coverage: 12 feature tests → 4 in the existing GitManager suite, retaining all 182 existing main tests. Reduced the reader to 53 lines and kept the existing provider extension.
Verification at d9a24fb:
git diff --checkpassed.Current-head CI passed. A cancelled duplicate fingerprint run is superseded by the successful run on the same head. The existing human approval requirement remains outstanding.
No authenticated GitLab API/
glabMR creation or external model generation was run; those boundaries are stubbed in the generation integration tests. No new visual behavior requires screenshots. macOS, Windows, Electron desktop, iOS, Android, and remote/tunnel connections were not run. For an account-backed check, enable the setting and generate a GitLab MR from a feature branch with different template content; confirm the generated description follows the committed target template, then disable the setting and repeat.Human approval is required for the newly honored generation default. This takeover does not merge the PR.
Implementation: Codex gpt-6.1-sol (high), tests: Codex gpt-6-astra (high), reviews: Claude claude-opus-5-5 and Codex gpt-6-sol (high), orchestrated through T3 Code and the Codex harness.