Skip to content

Expose project visibleForks in GraphQL

What does this MR do and why?

Related #390441

When a user doesn't have write access to a project and they launch the WebIDE we currently check if they have a personal fork (if not, we give the option to create one).

We have been using a community fork inside a gitlab group for some time (see https://gitlab.com/gitlab-community/meta) and will be encouraging this more and more moving forward.

To make this play more nicely with the WebIDE, we need a way to identify any/all forks a users has write access to.

This MR exposes that via GraphQL.

Screenshots or screen recordings

image

image

How to set up and validate locally

  • Create a few forks of a project (at least one in a group and one in a personal namespace)
  • Impersonate a user and use GraphiQL to query visibleForks (with and without the minimumAccessLevel argument)
  • Change the visibility of forks and ensure they appear/don't as expected
  • Add the user as a direct project member and/or group member and ensure they appear/don't as expected

🚀

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports