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

Adds graceful continue #73

Closed jalafel closed 2 weeks ago

jalafel commented 4 weeks ago

What are you trying to accomplish?

Fixes a bug where the gh classroom clone student-repos command would fail if any repositories could not be cloned and was due to an unhandled error. This PR adds a --verbose flag to the command to enable verbose error output and gracefully continue cloning the remaining repositories if any fail.

Closes: #69

What should reviewers focus on?

In addition, this PR abstracts the cloning of repositories to a separate function utils.CloneRepository to improve testability and maintainability.

This PR also removes the Name() function from acceptAssignment.Repository.Name() and replaces it with acceptAssignment.Repository.Name. On GitHub Classroom, I've opened a PR to update the Repo serializer to include the name attribute.