-
Notifications
You must be signed in to change notification settings - Fork 46
feat: add gtr.nextStep for custom next steps #51
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
Display project-specific guidance after worktree creation alongside
built-in next steps. Supports variable substitution ($BRANCH,
$WORKTREE_PATH, $REPO_ROOT) with both $VAR and ${VAR} syntax.
Add [nextSteps] section to .gtrconfig.example and gtr.nextStep examples to gtr.config.example.
Add gtr.nextStep to tab completion for bash, zsh, and fish.
Add Custom Next Steps section with usage examples and variable substitution documentation.
Add gtr.nextStep to configuration reference, key mapping table, and multi-value configuration pattern.
WalkthroughThis change introduces support for custom next steps after worktree creation via a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Pull Request
Description
Add
gtr.nextStepconfiguration for displaying custom project-specific next steps after worktree creation. Steps appear alongside built-in next steps and support variable substitution ($BRANCH,$WORKTREE_PATH,$REPO_ROOT) with both$VARand${VAR}syntax.Motivation
While
postCreatehooks can run commands, their output appears before the "Next steps" section. Users need a way to display project-specific guidance (likenpm installorcp .env.example .env) in the logical place alongside other next steps.Fixes #49
Type of Change
Testing
Manual Testing Checklist
Tested on:
Core functionality tested:
git gtr new <branch>- Create worktreegit gtr go <branch>- Navigate to worktreegit gtr editor <branch>- Open in editor (if applicable)git gtr ai <branch>- Start AI tool (if applicable)git gtr rm <branch>- Remove worktreegit gtr list- List worktreesgit gtr config- Configuration commands (if applicable)Test Steps
Add multiple custom next steps:
Create a worktree:
Verify output shows all custom steps with variable substitution:
Expected behavior: Custom next steps appear after built-in steps with variables substituted.
Actual behavior: Custom next steps appear after built-in steps with variables substituted.
Breaking Changes
Checklist
Before submitting this PR, please check:
git gtr(production) and./bin/gtr(development)Additional Context
Example output after worktree creation:
License Acknowledgment
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache License 2.0.
Summary by CodeRabbit
Release Notes
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.