Skip to content

Comments

[remote-branch-rename] Improve verify logic and update tests#260

Merged
jovnc merged 4 commits intogit-mastery:mainfrom
jovnc:fix/remote-branch-rename
Feb 7, 2026
Merged

[remote-branch-rename] Improve verify logic and update tests#260
jovnc merged 4 commits intogit-mastery:mainfrom
jovnc:fix/remote-branch-rename

Conversation

@jovnc
Copy link
Collaborator

@jovnc jovnc commented Feb 7, 2026

Exercise Review

Exercise Discussion

Fixes #27

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 your changes using the instructions posted?
  • 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?

@jovnc jovnc requested a review from Copilot February 7, 2026 03:05
@github-actions
Copy link

github-actions bot commented Feb 7, 2026

Hi @jovnc, thank you for your contribution! 🎉

This PR comes from your fork jovnc/exercises on branch fix/remote-branch-rename.

Before you request for a review, please ensure that you have tested your changes locally!

Important

The previously recommended way of using ./test-download.py is no longer the best way to test your changes locally.

Please read the following instructions for the latest instructions.

Prerequisites

Ensure that you have the gitmastery app installed locally (instructions)

Testing steps

If you already have a local Git-Mastery root to test, you can skip the following step.

Create a Git-Mastery root locally:

gitmastery setup

Navigate into the Git-Mastery root (defaults to gitmastery-exercises/):

cd gitmastery-exercises/

Edit the .gitmastery.json configuration file. You need to set the following values under the exercises_source key.

{
    # other fields...
    "exercises_source": {
        "username": "jovnc",
        "repository": "exercises",
        "branch": "fix/remote-branch-rename"
    }
}

Then, you can use the gitmastery app to download and verify your changes locally.

gitmastery download <your new change>
gitmastery verify

Checklist

  • (For exercises and hands-ons) I have verified that the downloading behavior works
  • (For exercises only) I have verified that the verification behavior is accurate

Important

To any reviewers of this pull request, please use the same instructions above to test the changes.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the remote_branch_rename exercise grader and its unit tests to focus on verifying a local+remote branch rename workflow (renaming improve-loadding to improve-loading) and to use an actual temporary remote repo in tests instead of mocking.

Changes:

  • Removed the previous try-quick-fix -> fix-scrolling-bug setup and verification logic.
  • Updated verify.py to check for the renamed local branch and validate remote branch presence/absence via fetch + remote refs.
  • Refactored tests to use include_remote_repo=True and perform real push/delete operations against the temp remote.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
remote_branch_rename/verify.py Removes the old branch-rename checks and verifies local+remote rename for improve-loadding.
remote_branch_rename/test_verify.py Replaces mocking with a real temporary remote repo and updates scenarios accordingly.
remote_branch_rename/download.py Updates exercise repo setup to only create/push improve-loadding (removes try-quick-fix).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jovnc
Copy link
Collaborator Author

jovnc commented Feb 7, 2026

@VikramGoyal23 @jiaxinnns @desmondwong1215 @SAN-MUYUN Ready for review, thanks!

@desmondwong1215
Copy link
Contributor

LGTM! Tested and it works as expected.

@jovnc jovnc merged commit 046e0f5 into git-mastery:main Feb 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Exercise Discussion] T8L4 Renaming branches with remote

2 participants