-
Notifications
You must be signed in to change notification settings - Fork 25
Implement hands on hp-sync-upstream #97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
woojiahao
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vanphuc1201 Thank you for working on this. Left some comments on the logic. Could we also remove the comments, they don't really add much to the understanding of the code since it's pretty straightforward imo
hands_on/sync_upstream.py
Outdated
| # Mark this as the starting state | ||
| create_start_tag("hp-sync-upstream", verbose) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use this for hands-ons. This is safe to remove
| if os.path.exists("samplerepo-finances"): | ||
| shutil.rmtree("samplerepo-finances") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might also want to check that the fork does not exist yet. If it does, we want to delete it. This is being discussed in #78. I would like if we are aligned on the approach of displaying a message to tell the user to delete the fork themselves, then re-running the fork command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much, i have add the command to check it.
| run_command([ | ||
| "gh", "repo", "fork", | ||
| "https://github.com/git-mastery/samplerepo-finances", | ||
| "--clone", | ||
| "--remote" | ||
| ], verbose) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like we ultimately want these to be util functions. I'm good keeping things this way for now since it's more effort to try to coordinate the changes. We'll need to track this as future work to de-duplicate common behavior @damithc
Exercise Review
Exercise Discussion
#88
Checklist
Git-Masteryorganization, have you created a request for it?repo-smithto validate the exercise grading scheme?test-download.sh?git-autograder?app?