GeezerVison is showing github.com — fix(gitlab): follow the repository default merge request template by fixfon · Pull Request #19813 · pingdotgg/t3code
Conversation
fixfon
commented
Oct 15, 2026
•
edited by juliusmarminge
Loading
Uh oh!
There was an error while loading. Please reload this page.
GitLab merge request generation ignored followChangeRequestTemplates because its provider did not implement the existing template reader. It now reads .gitlab/merge_request_templates/Default.md from 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:
- Focused GitManager/provider suites: 186 passed; all GitLab package suites: 159 passed (the provider suite overlaps).
- The four feature tests use real committed repositories. Against base production, the three enabled/reader cases fail and the disabled-setting case passes.
- Scoped server/GitLab typechecks, lint, formatting, and
git diff --check passed.
- Headless proof: actual GitLab provider and GitVcsDriver spawning Git on Linux, verifying base-vs-feature/dirty content, sibling-only/blank/missing-base results, symlink rejection, and truncation.
- One independent whole-PR review round with Claude Opus and Codex Sol: both found no code blockers; both independently reran relevant tests.
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/glab MR 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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…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
Approvability
Verdict: Needs Human Approval
Macroscope's review found this PR not approvable — This PR changes the default-enabled GitLab merge-request generation path so repository Default.md content is now read and supplied to description generation, affecting existing user-visible output. The implementation is focused and tested, but the behavioral/default change warrants human review.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 15, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Warning
Review limit reached
Only 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.
Check out review usage here.
View limit details
-
Limit details: You’ve used all 10 included reviews currently available.
Learn how review limits work.
Review configuration:
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
6fa9b0e4-4b23-4a6d-b672-bd9aa6d6bb6f
📥 Commits
-
Reviewing files that changed from the base of the PR and between 265ec9e and 2b58564.
📒 Files selected for processing: 4
-
apps/server/src/git/GitManager.test.ts
packages/source-control-gitlab/src/server/GitLabSourceControlProvider.test.ts
packages/source-control-gitlab/src/server/GitLabSourceControlProvider.ts
packages/source-control-gitlab/src/server/gitLabChangeRequestTemplate.ts
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
0c8e838c-a017-4fbe-8e11-0783b938fe13
📥 Commits
-
Reviewing files that changed from the base of the PR and between 339179f and 265ec9e.
📒 Files selected for processing: 5
-
apps/server/src/git/GitManager.test.ts
apps/server/src/sourceControl/gitLabChangeRequestTemplate.test.ts
packages/source-control-gitlab/src/server/GitLabSourceControlProvider.test.ts
packages/source-control-gitlab/src/server/GitLabSourceControlProvider.ts
packages/source-control-gitlab/src/server/gitLabChangeRequestTemplate.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
-
The GitLab source-control provider now detects and reads default merge-request templates from committed Git trees. Tests cover template selection and bounds, provider access through the host Git client, and passing template content to pull-request content generation.
Changes: GitLab merge-request templates
| Layer / File(s) |
Summary |
Detect templates from Git trees packages/source-control-gitlab/src/server/gitLabChangeRequestTemplate.ts, apps/server/src/sourceControl/gitLabChangeRequestTemplate.test.ts |
Adds detection for case-insensitive Default.md files in the GitLab template directory. The detector handles requested treeishes, empty content, symlinks, listing limits, and oversized blobs. Tests exercise these cases. |
Expose template reading through the GitLab provider packages/source-control-gitlab/src/server/GitLabSourceControlProvider.ts, packages/source-control-gitlab/src/server/GitLabSourceControlProvider.test.ts |
The provider uses the host Git client to detect templates for a working directory and treeish. Tests verify the Git commands and returned content. |
Pass templates to pull-request content generation apps/server/src/git/GitManager.test.ts |
Tests verify that commit_push_pr supplies the GitLab default template to content generation. The fork-matching test reuses its process-host test layer. |
Priority: ⬇️ Low
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Sequence Diagram(s)
sequenceDiagram
participant GitManager
participant GitLabSourceControlProvider
participant Git
GitManager->>GitLabSourceControlProvider: Read template for working directory and treeish
GitLabSourceControlProvider->>Git: List tree and read template blob
Git-->>GitLabSourceControlProvider: Tree entry and blob content
GitLabSourceControlProvider-->>GitManager: Detected template
Loading
Suggested reviewers: juliusmarminge
Merge Risk: ⚪ Minimal · up to 265ec
-
GitLab default-template support is ready to merge after normal checks; no actionable risk remains identified.
Security architecture risk: 🔵 Low · up to 265ec
-
The template lookup uses committed repository data, rejects symlinks, limits output, and preserves the existing user switch. No introduced security defect was established. Some uncertainty remains around how supported generation providers enforce isolation.
Retained concerns
No architecture-level concerns identified.
Security review details
-
Security Blast Radius
- inferred — The newly selected input is controlled by whoever can place template content in the requested repository base tree. Its direct new influence is on generated merge-request text for that repository. The inspected lookup adds no credential input or permission-changing operation; any broader host exposure depends on existing generation-provider behavior and remains incompletely established.
Security Findings and Attack Paths
- inferred — Repository-authored instructions can influence generated text because the template is embedded in the prompt. That influence is intended functionality, not by itself a verified privilege escalation. The same generator already receives repository commit and diff content, so the inspected evidence does not establish that this additional input materially expands an attacker's executable authority.
Trust Boundaries and Controls
- observed — The detector lists the committed tree with fixed Git arguments, accepts only regular-file blob records at the expected default path, and reads the selected object ID. It does not open the repository-controlled template path on the host filesystem. Symlink and submodule modes are excluded; listing output is capped at 100,000 bytes and blob output at 8,000 bytes.
Resilience and Maintainability Implications
- observed — The new Git reads inherit the existing process pool of eight permits and a default 30-second subprocess timeout. Ordinary execution failures become no-template results. The detector creates no reservation or persistent state requiring rollback between listing and blob reading.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
| Title check |
 |
The title clearly and concisely describes the main change: GitLab now follows the repository default merge request template. |
| Description check |
 |
The description clearly explains the problem, implementation, scope, verification results, limitations, and approval status. It does not provide explicit maintainer approval or a linked approval discu… |
Full details: Description check
-
Explanation
The description clearly explains the problem, implementation, scope, verification results, limitations, and approval status. It does not provide explicit maintainer approval or a linked approval discussion as requested by the Scope and approval template section, but the overall description is substantially complete.
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
juliusmarminge
changed the title
fix(server): GitLab merge requests follow the repository's default template
fix(gitlab): follow the repository default merge request template
Oct 19, 2026
# Conflicts:
# packages/source-control-gitlab/src/server/GitLabSourceControlProvider.ts
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Labels
size:M
30-99 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|