Skip to content

Conversation

@vanphuc1201
Copy link

@vanphuc1201 vanphuc1201 commented Oct 29, 2025

Exercise Review

Exercise Discussion

#88

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?

@vanphuc1201 vanphuc1201 changed the title Add hans on hp-sync-upstream Add hands on hp-sync-upstream Oct 29, 2025
@vanphuc1201 vanphuc1201 changed the title Add hands on hp-sync-upstream Implements hands on hp-sync-upstream Oct 29, 2025
@vanphuc1201 vanphuc1201 changed the title Implements hands on hp-sync-upstream Implement hands on hp-sync-upstream Oct 29, 2025
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.

@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

Comment on lines 31 to 32
# Mark this as the starting state
create_start_tag("hp-sync-upstream", verbose)
Copy link
Member

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

Comment on lines +11 to +12
if os.path.exists("samplerepo-finances"):
shutil.rmtree("samplerepo-finances")
Copy link
Member

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.

Copy link
Author

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.

Comment on lines +15 to +20
run_command([
"gh", "repo", "fork",
"https://github.com/git-mastery/samplerepo-finances",
"--clone",
"--remote"
], verbose)
Copy link
Member

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

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-sync-upstream (Sync your repos with the upstream repo)

2 participants