Bring back the commit title and author for Guest users
What does this MR do and why?
Fixes Pipelines list: Guest role sees "Can't find HEA... (#627161 - closed) .
Guests on private projects are seeing "Can't find HEAD commit for this branch" on every row of Build > Pipelines, and no commit title in the pipeline details header. Both read Pipeline.commit, and the Commit type needs read_code, which Guests don't have there. The backend half, Add commit summary fields to the Pipeline Graph... (!255649 - merged), adds commitTitle, commitAuthorName, and commitAuthorGravatar on Pipeline, gated by read_pipeline only. This MR reads them and falls back to them when commit is null.
The list fragment and the header query request the new fields with @gl_introduced(version: "19.5.0"), so a backend that doesn't have them yet strips the fields and returns null instead of an undefinedField error.
commitAuthor in pipeline_url.vue now uses the commit's author name and Gravatar when there is no GitLab user, which covers the unreadable-commit case, and only sets a mailto: link when the REST payload has an email.
Reporters and above see no change. The commit link still 404s for Guests because the commit page needs read_code; that's parity with the REST-era list, not a regression. The short SHA chip for Guests is the separate Draft: Fall back to the pipeline SHA when the c... (!255630 - closed).
Query complexity
The overrides for the three list queries in all_queries_spec.rb move to the measured values: get_pipelines 315 to 317, get_commit_pipelines 271 to 285, get_merge_request_pipelines 628 to 670. The numbers come from the static analyzer, not from an extra Gitaly round trip. The actual Gitaly cost is unchanged: the three fields resolve through the same batched Commit.lazy lookup as commit, one call per page.
Screenshots or screen recordings
| Before | After | |
|---|---|---|
| Guest, Build > Pipelines | ![]() |
![]() |
| Guest, pipeline header | ![]() |
![]() |
How to set up and validate locally
- Create a private project with a repository and at least one pipeline. Keep Settings > CI/CD > General pipelines > Project-based pipeline visibility enabled.
- Add a user as Guest and sign in as that user.
- Open Build > Pipelines. On the target branch every row says "Can't find HEAD commit for this branch". On this branch each row shows the commit title link and the author's Gravatar.
- Open any pipeline. The header's "For commit" line shows the commit title.
- Repeat as a Reporter: unchanged, the commit popover and GitLab-user avatar still render.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.



