[Bug]: GitLab PR review-guide generation fails because the provider omits the head SHA #18592
JulienZD(GitHub profile, opens in a new tab) added labelsbug
JulienZD(GitHub profile, opens in a new tab) added labelsneeds-triage
juliusmarminge added labelsaccepted
juliusmarminge added labelsvia-triage
juliusmarminge removed labelsneeds-triage
Yash-Singh1(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
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.