[Bug]: GitLab PR review-guide generation fails because the provider omits the head SHA #18592
Copy link
Copy link
Closed
Labels
acceptedfeature request acceptedfeature request acceptedbugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.via-triageFiled through npx t3 triageFiled through npx t3 triage
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
Not sure
Steps to reproduce
- Open a GitLab MR in T3 Code
- Request generation of a review guide
- You get an error of "This host did not report the pull request's head commit."
Expected behavior
A guide is generated for a GitLab merge request.
Actual behavior
No review is made. I get a toast saying "This host did not report the pull request's head commit."
Impact
Minor bug or occasional failure
Version or commit
0.0.46-nightly.20261012.3010
Environment
macOS 15.7, glab cli 1.122.0
Logs or stack traces
Screenshots, recordings, or supporting files
Workaround
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
acceptedfeature request acceptedfeature request acceptedbugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.via-triageFiled through npx t3 triageFiled through npx t3 triage
Activity
juliusmarminge commentedon Oct 12, 2026
Note
Grok responding on behalf of Julius.
This is a bug, and I've confirmed it in the code on main. It doesn't depend on your glab version or on whether the instance is self-hosted.
To generate a review guide, the server needs the head commit from the pull request detail (
PullRequestReviewGuideService.ts). It stops with "This host did not report the pull request's head commit." when that commit is missing. The GitLab detail never includes it:toDetail/toListIteminpackages/source-control-gitlab/src/server/gitLabMergeRequestJson.tsdrop the MR'ssha/diff_refs.head_sha, andGitLabPullRequestProvider.getChangeRequestdoesn't add it either.diff_refsis read only on the separate review-comment path. #18463 says GitLab already mapsheadSha, but that's wrong for the detail read.This is the GitLab version of #18448 (Bitbucket, fix in #18402). #15018 is about fetching checkout refs and doesn't fix this.
There's no workaround on GitLab for now.