Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

ClosedJulienZD(GitHub profile, opens in a new tab) opened this issue 1 comment

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

  1. JulienZD(GitHub profile, opens in a new tab) added labelsneeds-triage

  2. 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. juliusmarminge added labelsaccepted

  4. juliusmarminge added labelsvia-triage

  5. juliusmarminge removed labelsneeds-triage

Sign in to join this conversation.