github / gh-classroom

GitHub Classroom CLI Extension is a powerful and easy-to-use command line tool that enhances the functionality of the GitHub CLI, specifically tailored for educators using GitHub Classroom.
MIT License
75 stars 12 forks source link

Add ability to pull student repos issue #8 #39

Closed shanep closed 9 months ago

shanep commented 10 months ago

What are you trying to accomplish?

Change the default behavior when cloning student repos to skip any repos that have already been cloned. Add in a command line flag to allow existing repos to be sync'd instead of a full clone.

Fix issue #14 Implements Feature #8

What approach did you choose and why?

Instead of doing a fresh clone every single time, skip any repos that have already been cloned and give the user a new command line flag to sync. If the user wants a fresh clone then they can already use the --directory flag to do so.

UPDATE: This change should take some pressure off your endpoint :)

What should reviewers focus on?

I couldn't see anywhere in the documentation where the gh cli allows you to pass a path when performing a sync so I had to change the working directory. If there is a better way to do a sync with the gh client please let me know :)

shanep commented 10 months ago

@zrdaley no problem! I like that approach its keeps the semantics all lined up and doesn't overload the clone command :) I will get it all updated as soon as I can :)

shanep commented 10 months ago

Updated to align with the clone command for both student repos and starter code :)

shanep commented 9 months ago

Small nit, but otherwise LGTM! Thank you for this contribution.

No worries :) Truly appreciate the feedback! Excited to see this get merged.

zrdaley commented 9 months ago

Once https://github.com/github/gh-classroom/actions/runs/6395315615 is green you should be able to upgrade the CLI and use this command.