Skip to content

Commit 32fe808

Browse files
committed
fix(git): correct has_changes detection and dependency handling
- git-analyze-changes: check actual diff content instead of command success - git-commit: make stage_files dependency optional to allow analyzing pre-staged files
1 parent 8da6d5e commit 32fe808

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/workflows_mcp/templates/git/git-analyze-changes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ blocks:
110110

111111
outputs:
112112
has_changes:
113-
value: "{{blocks.get_staged_diff.succeeded or blocks.get_all_diff.succeeded}}"
113+
value: "{{blocks.processing.outputs.diff | trim | length > 0}}"
114114
type: bool
115115
summary:
116116
value: "{{blocks.processing.outputs.summary}}"

src/workflows_mcp/templates/git/git-commit.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ blocks:
5656
- id: analyze_changes
5757
type: Workflow
5858
description: "Analyze staged changes in git repository"
59-
depends_on: [stage_files]
59+
depends_on:
60+
- block: stage_files
61+
required: false
6062
inputs:
6163
workflow: "git-analyze-changes"
6264
inputs:

0 commit comments

Comments
 (0)