Skip to content

fix(glab repo fork): clone if --clone flag set

Description

Previously glab would ask the user if they would like to clone even when --clone was explicitly set

e.g glab repo fork user/test --name testname --path testpath --clone would ask you if you would like to clone.

Previously there were no tests for this command so I added a test for --clone and no --clone

Closes #7489 (closed)

How has this been tested?

Unit test added for passing in --clone and not passing in --clone

Manualy tests

  • glab repo fork user/test --name testname --path testpath --clone
  • glab repo fork user/test --name testname --path testpath
  • glab repo fork user/test --name testname --path testpath --clone=false
  • glab repo fork user/test --name testname --path testpath --clone=true

Screenshots (if appropriate):

Scenario Before After
explicit clone Screenshot_2024-05-08_at_10.14.30 Screenshot_2024-05-08_at_10.17.25
no --clone Screenshot_2024-05-08_at_10.15.04 Screenshot_2024-05-08_at_10.16.53
explicit clone=false Screenshot_2024-05-09_at_08.19.14 Screenshot_2024-05-09_at_08.17.20

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
Edited by Jay McCure

Merge request reports