fix: dependency-guard duplicate env + broken if condition#104
Conversation
Two bugs: 1. Duplicate `env:` key on the same step (BASE_REF and EXTRA_PATHS in separate env blocks) — invalid YAML, GitHub Actions rejects at parse time with 0 jobs 2. `if: github.event_name == 'pull_request'` on the job — when called via workflow_call, event_name is 'workflow_call' not 'pull_request', so the job always skips Fix: merge both env vars into one block, remove the job-level if condition (the calling workflow controls when it runs). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
This PR fixes the The fix merges the environment variables into a single Files Changed Analysis
Architecture & Impact Assessment
Workflow Execution Flow (Before vs. After)graph TD
subgraph before ["Before: Broken Execution"]
A[Calling Workflow] -- workflow_call --> B(dependency-guard.yml);
B --|"if: github.event_name == 'pull_request'<br/>(Evaluates to false)"|--> C{Job Skipped / Failed};
end
subgraph after ["After: Correct Execution"]
D[Calling Workflow] -- workflow_call --> E(dependency-guard.yml);
E --|"(No job-level 'if' condition)"|--> F{Job Runs Correctly};
end
Scope Discovery & Context ExpansionThis workflow is designed as a reusable component ( Metadata
Powered by Visor from Probelabs Last updated: 2026-03-31T17:44:03.080Z | Triggered by: pr_opened | Commit: c7438af 💡 TIP: You can chat with Visor using |
✅ Architecture Check PassedNo architecture issues found – changes LGTM. ✅ Performance Check PassedNo performance issues found – changes LGTM. \n\n✅ Architecture Check PassedNo architecture issues found – changes LGTM. \n\n✅ Performance Check PassedNo performance issues found – changes LGTM. \n\n✅ Quality Check PassedNo quality issues found – changes LGTM. Powered by Visor from Probelabs Last updated: 2026-03-31T17:43:28.829Z | Triggered by: pr_opened | Commit: c7438af 💡 TIP: You can chat with Visor using |
Bug Fix
Two issues causing ALL workflows that use dependency-guard.yml to fail with 0 jobs:
Fix
🤖 Generated with Claude Code