feat(git-workflow): Simplify git integration with --from-branch option
- Remove automatic git workflow and branch-tag switching - we are not ready for it yet - Add --from-branch option to add-tag command for manual tag creation from git branch - Remove git workflow configuration from config.json and assets - Disable automatic tag switching functions in git-utils.js - Add createTagFromBranch function for branch-based tag creation - Support both CLI and MCP interfaces for --from-branch functionality - Fix ES module imports in git-utils.js and utils.js - Maintain user control over tag contexts without forced automation The simplified approach allows users to create tags from their current git branch when desired, without the complexity and rigidity of automatic branch-tag synchronization. Users maintain full control over their tag contexts while having convenient tools for git-based workflows when needed.
This commit is contained in:
@@ -1235,7 +1235,7 @@ async function createTagFromBranch(
|
||||
|
||||
// Import git utilities
|
||||
const { sanitizeBranchNameForTag, isValidBranchForTag } = await import(
|
||||
'../../utils/git-utils.js'
|
||||
'../utils/git-utils.js'
|
||||
);
|
||||
|
||||
// Create a consistent logFn object regardless of context
|
||||
@@ -1341,7 +1341,7 @@ async function autoSwitchTagForBranch(
|
||||
isGitRepository,
|
||||
sanitizeBranchNameForTag,
|
||||
isValidBranchForTag
|
||||
} = await import('../../utils/git-utils.js');
|
||||
} = await import('../utils/git-utils.js');
|
||||
|
||||
// Create a consistent logFn object regardless of context
|
||||
const logFn = mcpLog || {
|
||||
@@ -1475,13 +1475,8 @@ async function checkAndAutoSwitchTag(projectRoot, tasksPath, context = {}) {
|
||||
const rawConfig = fs.readFileSync(configPath, 'utf8');
|
||||
const config = JSON.parse(rawConfig);
|
||||
|
||||
// Check if git workflow is enabled
|
||||
const gitWorkflowEnabled = config.tags?.enabledGitworkflow || false;
|
||||
const autoSwitchEnabled = config.tags?.autoSwitchTagWithBranch || false;
|
||||
|
||||
if (!gitWorkflowEnabled || !autoSwitchEnabled) {
|
||||
return null;
|
||||
}
|
||||
// Git workflow has been removed - return null to disable auto-switching
|
||||
return null;
|
||||
|
||||
// Perform auto-switch
|
||||
return await autoSwitchTagForBranch(
|
||||
|
||||
Reference in New Issue
Block a user