Skip to content

forked_from_project is missing from the API when logged out

Summary

According to https://docs.gitlab.com/ee/api/projects.html#get-single-project :

If the project is a fork, the forked_from_project field appears in the response. For this field, if the upstream project is private, a valid token for authentication must be provided. The field mr_default_target_self appears as well. If this value is false, then all merge requests will target the upstream project by default.

However, when logged out, neither field appears at all, even if the upstream project is public

Steps to reproduce

  1. Log out
  2. Query https://gitlab.com/api/v4/projects/n1861%2Fgitlab-foss or https://gitlab.com/api/v4/projects/stingrayza%2Fgitlab

What is the current bug behavior?

forked_from_project is missing from the response, even though they are forks of public repositories

What is the expected correct behavior?

forked_from_project should be present and populated, even when logged out

Relevant logs and/or screenshots

Output of checks

This bug happens on GitLab.com

Possible fixes

Make it visible to logged-out clients, if possible. Otherwise, update the documentation to explain it is not available to logged-out clients.

Edited by Val Lorentz