-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix/merge commit verification #801
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: develop
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -391,69 +391,97 @@ def remove_worktree(self, spec_name: str, delete_branch: bool = False) -> None: | |||||
|
|
||||||
| self._run_git(["worktree", "prune"]) | ||||||
|
|
||||||
| def merge_worktree( | ||||||
| self, spec_name: str, delete_after: bool = False, no_commit: bool = False | ||||||
| ) -> bool: | ||||||
| """ | ||||||
| Merge a spec's worktree branch back to base branch. | ||||||
| def merge_worktree( | ||||||
| self, spec_name: str, delete_after: bool = False, no_commit: bool = False | ||||||
| ) -> bool: | ||||||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| """ | ||||||
| Merge a spec's worktree branch back to base branch. | ||||||
|
|
||||||
| Args: | ||||||
| spec_name: The spec folder name | ||||||
| delete_after: Whether to remove worktree and branch after merge | ||||||
| no_commit: If True, merge changes but don't commit (stage only for review) | ||||||
| Args: | ||||||
| spec_name: The spec folder name | ||||||
| delete_after: Whether to remove worktree and branch after merge | ||||||
| no_commit: If True, merge changes but don't commit (stage only for review) | ||||||
|
|
||||||
| Returns: | ||||||
| True if merge succeeded | ||||||
| """ | ||||||
| info = self.get_worktree_info(spec_name) | ||||||
| if not info: | ||||||
| print(f"No worktree found for spec: {spec_name}") | ||||||
| return False | ||||||
| Returns: | ||||||
| True if merge succeeded | ||||||
| """ | ||||||
| info = self.get_worktree_info(spec_name) | ||||||
| if not info: | ||||||
| print(f"No worktree found for spec: {spec_name}") | ||||||
| return False | ||||||
|
|
||||||
| if no_commit: | ||||||
| print( | ||||||
| f"Merging {info.branch} into {self.base_branch} (staged, not committed)..." | ||||||
| ) | ||||||
| else: | ||||||
| print(f"Merging {info.branch} into {self.base_branch}...") | ||||||
| if no_commit: | ||||||
| print( | ||||||
| f"Merging {info.branch} into {self.base_branch} (staged, not committed)..." | ||||||
| ) | ||||||
| else: | ||||||
| print(f"Merging {info.branch} into {self.base_branch}...") | ||||||
|
|
||||||
| # Switch to base branch in main project | ||||||
| result = self._run_git(["checkout", self.base_branch]) | ||||||
| if result.returncode != 0: | ||||||
| print(f"Error: Could not checkout base branch: {result.stderr}") | ||||||
| return False | ||||||
| # Switch to base branch in main project | ||||||
| result = self._run_git(["checkout", self.base_branch]) | ||||||
| if result.returncode != 0: | ||||||
| print(f"Error: Could not checkout base branch: {result.stderr}") | ||||||
|
||||||
| print(f"Error: Could not checkout base branch: {result.stderr}") | |
| print(f"Error: Could not checkout base branch: {result.stderr}") |
sakshyasinha marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sakshyasinha marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh oh!
There was an error while loading. Please reload this page.