Skip to content

Conversation

@lavanyagarg112
Copy link

@lavanyagarg112 lavanyagarg112 commented Oct 29, 2025

Exercise Review

Exercise Discussion

#87

Checklist

  • If you require a new remote repository on the Git-Mastery organization, have you created a request for it?
  • Have you written unit tests using repo-smith to validate the exercise grading scheme?
  • Have you tested the download script using test-download.sh?
  • Have you verified that this exercise does not already exist or is not currently in review?
  • Did you introduce a new grading mechanism that should belong to git-autograder?
  • Did you introduce a new dependency that should belong to app?

Copy link
Member

@woojiahao woojiahao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lavanyagarg112 You might want to reference #99 too to compare and see if there's anything that could be the same since the setup is equivalent

from exercise_utils.git import clone

__requires_git__ = True
__requires_github__ = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
__requires_github__ = True
__requires_github__ = False

This can be set to False if you do not use gh as part of the script

os.makedirs("samplerepo-finances")
clone("https://github.com/git-mastery/samplerepo-finances.git", verbose)
os.chdir("samplerepo-finances")
run_command(["git", "remote", "set-url", "origin", "https://github.com/git-mastery/samplerepo-finances-2.git"], verbose) No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
run_command(["git", "remote", "set-url", "origin", "https://github.com/git-mastery/samplerepo-finances-2.git"], verbose)
run_command(["git", "remote", "set-url", "origin", "https://github.com/git-mastery/samplerepo-finances-2.git"], verbose)

os.makedirs("samplerepo-finances")
clone("https://github.com/git-mastery/samplerepo-finances.git", verbose)
os.chdir("samplerepo-finances")
run_command(["git", "remote", "set-url", "origin", "https://github.com/git-mastery/samplerepo-finances-2.git"], verbose) No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also curious what the rationale behind abstracting clone to a utility function but not set-url?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Hands-On Discussion] T3L3/hp-pull-remote (Pull from a remote)

2 participants