Skip to content

[Bug]: GitLab PR review-guide generation fails because the provider omits the head SHA #18592

Closed

Description

@JulienZD

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

  1. Open a GitLab MR in T3 Code
  2. Request generation of a review guide
  3. 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

Image

Workaround

No response

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Oct 12, 2026
  2. juliusmarminge commented on Oct 12, 2026

    @juliusmarminge
    Member

    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/toListItem in packages/source-control-gitlab/src/server/gitLabMergeRequestJson.ts drop the MR's sha/diff_refs.head_sha, and GitLabPullRequestProvider.getChangeRequest doesn't add it either. diff_refs is read only on the separate review-comment path. #18463 says GitLab already maps headSha, 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.

  3. added
    acceptedfeature request accepted
    via-triageFiled through npx t3 triage
    and removed
    needs-triageIssue needs maintainer review and initial categorization.
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedfeature request acceptedbugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions