-
Notifications
You must be signed in to change notification settings - Fork 13
📝 Add docstrings to feature/setup-worktree
#23
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
Conversation
Docstrings generation was requested by @felipeS. * #22 (comment) The following files were modified: * `src/commands/setup.ts` * `src/utils/git.ts`
|
Important Review skippedCodeRabbit bot authored PR detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
- Add detailed docstring to setupWorktreeHandler explaining parameters and behavior - Add docstring to isMainRepoBare function - Add docstring to getRepoRoot function Integrates documentation improvements from PR #23 by @coderabbitai
|
Superseded by PR #30 which integrates the docstrings along with other fixes. Thank you @coderabbitai! |
|
Tip For best results, initiate chat on the files or code changes. @johnlindquist: You're very welcome! I'm glad the docstrings work has been integrated into PR #30 along with the other improvements. Thank you for keeping me in the loop, and best of luck with the consolidated changes! 🚀 🧠 Learnings used |
* fix: Address issues #27, #28, #29 - #27: Editor 'none' now skips opening editor instead of failing Added shouldSkipEditor() to config.ts and updated all command handlers to check for 'none' value before attempting to open editor - #28: wt new without branch name now shows clear error Added validation at start of newWorktreeHandler to require branch name - #29: build/index.js now has execute permissions after build Added postbuild script to package.json that runs chmod +x Also updated .gitignore to exclude .beads/ and .vscode/ directories * feat: Add GitLab support for pr command (PR #26) - Auto-detect git provider from remote URL (github.com or gitlab.com) - Add config option: wt config set provider gh|glab - Adapt pr command to work with both GitHub PRs and GitLab MRs - Update error messages to be provider-specific (PR vs MR, GitHub vs GitLab) - Add detectGitProvider function to git.ts - Add getGitProvider/setGitProvider to config.ts The tool automatically detects the provider from the remote URL. Manual configuration is available as fallback via config command. Backward compatible: defaults to gh (GitHub CLI) maintaining existing behavior. Integrates PR #26 by @Cl3MM * feat: Add configurable default worktree directory (PR #24) - Add defaultWorktreePath config option - Add wt config set worktreepath <path> command - Add wt config get worktreepath command - Add wt config clear worktreepath command (reverts to sibling behavior) - Update new, setup, pr, and extract commands to use configured path - Support ~ expansion in path (expands to home directory) Path resolution priority: 1. --path flag (highest priority) 2. defaultWorktreePath config setting 3. Sibling directory behavior (default fallback) Example: wt config set worktreepath ~/worktrees wt new feature/login -> creates ~/worktrees/login Integrates PR #24 by @trevortrinh * docs: Add JSDoc comments to key functions (PR #23) - Add detailed docstring to setupWorktreeHandler explaining parameters and behavior - Add docstring to isMainRepoBare function - Add docstring to getRepoRoot function Integrates documentation improvements from PR #23 by @coderabbitai * docs: Update README with new features - Document GitLab support for wt pr command - Document editor 'none' option to skip opening - Document git provider configuration - Document configurable default worktree directory - Update requirements section * feat: Add --setup flag to wt pr command (closes #25) - Create shared runSetupScripts utility in src/utils/setup.ts - Add -s, --setup option to pr command - Execute setup scripts from worktrees.json or .cursor/worktrees.json - Update README with --setup documentation This allows users to run setup scripts when creating a worktree from a PR/MR: wt pr 123 --setup * fix: Address CodeRabbit PR feedback - Fix GitLab MR branch lookup: use -o json instead of -F json - Add JSON parse error handling for clearer error messages - Improve GitLab detection: parse hostname properly instead of includes() - Fix magic string check: use hasWarnedAboutCheckout flag instead - Remove redundant default: undefined from config schema - Add HOME/USERPROFILE validation for tilde expansion - Make postbuild script cross-platform (works on Windows) - Add JSDoc documentation for detectGitProvider and getRemoteHostname
Docstrings generation was requested by @felipeS.
The following files were modified:
src/commands/setup.tssrc/utils/git.tsThese file types are not supported
README.mdℹ️ Note