fix(wizard): detect and update git remote from template to user repository#20
Closed
alirezarezvani wants to merge 1 commit intomainfrom
Closed
fix(wizard): detect and update git remote from template to user repository#20alirezarezvani wants to merge 1 commit intomainfrom
alirezarezvani wants to merge 1 commit intomainfrom
Conversation
…itory ## Problem When users clone the blueprint template and run the wizard, git remote still points to the template repository (alirezarezvani/claude-code-github-workflow). This causes: - Permission denied when pushing (can't push to template) - Secrets set on wrong repository - Workflows run on template instead of user's project - Users unable to actually use the blueprint ## Solution Added automatic git remote detection and update in setup wizard: **1. Setup Wizard Enhancement** (setup/wizard.sh) - New function: update_git_remote() (Step 1.5) - Detects if git remote points to template repository - Prompts user for their repository owner/name - Updates git remote to user's repository - Validates the change was successful - Updates REPO_OWNER and REPO_NAME variables - Exits if user declines update (must fix manually) **2. Validation Script Enhancement** (setup/validate.sh) - New validation: validate_git_remote() (Section 0) - Checks git remote configuration before other checks - Fails validation if still pointing to template - Provides clear error message and fix instructions - Shows current vs expected remote URL **3. Documentation Updates** - QUICK_START.md: Added note about cloning to own repository - COMPLETE_SETUP.md: Added Step 1.5 "Configure Git Remote" - Both docs explain why this matters and how to fix ## Impact - ✅ Users guided to set up correctly from the start - ✅ Clear error messages if remote not updated - ✅ Validation catches this issue before other failures - ✅ Automatic fix via wizard (asks user for repo details) - ✅ Manual fix instructions provided if user declines ## Testing - Wizard prompts for repository when template remote detected - Wizard skips update when remote already correct - Validation script catches template remote - Documentation provides clear instructions Fixes critical setup issue where users couldn't actually use the blueprint. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix critical setup issue where users clone the blueprint template but git remote still points to the template repository instead of the user's own repository.
Problem
When users clone the blueprint and run the wizard:
alirezarezvani/claude-code-github-workflow(template)Solution
1. Setup Wizard Enhancement (
setup/wizard.sh)Added Step 1.5: Repository Remote Setup:
Flow:
2. Validation Script Enhancement (
setup/validate.sh)Added Section 0: Git Remote Validation (runs first):
git remote set-url origin <your-repo-url>3. Documentation Updates
QUICK_START.md:
gh repo createCOMPLETE_SETUP.md:
Changes
Files Modified:
setup/wizard.sh(+93 lines) - New function + call in main flowsetup/validate.sh(+44 lines) - New validation checkdocs/QUICK_START.md(+11 lines) - Updated cloning instructionsdocs/COMPLETE_SETUP.md(+28 lines) - New step for git remoteTotal: +176 insertions, -2 deletions
Testing
✅ Scenario 1: Fresh clone from template
✅ Scenario 2: Already updated remote
✅ Scenario 3: User declines update
✅ Scenario 4: Validation catches issue
Impact
Before this fix:
After this fix:
Breaking Changes
None - this is additive functionality only.
Related
Closes #[issue-number-if-exists]
This is a critical fix for the blueprint's usability.
Test Plan:
./setup/wizard.sh./setup/validate.sh🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com