Skip to content

feat(checkout): Fixing bug with private forks

Description

This code diff updates the mr checkout command to fetch the merge request's source branch from either the source or target project, depending on the user's permissions. If the user doesn't have access to the source project, it fetches from the target project and uses a different reference format. This ensures that users can always check out a merge request's source branch, even if they don't have access to the source project.

Related Issues

Resolves #6400 (closed)

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)
  • Test gap

Closes #6400 (closed)

Edited by Gary Holtz

Merge request reports