Skip to content

Add embedded action step expansion to --dag-mermaid output#156

Merged
linyows merged 1 commit intomainfrom
add-embedded-steps-to-dag-mermaid
Jan 22, 2026
Merged

Add embedded action step expansion to --dag-mermaid output#156
linyows merged 1 commit intomainfrom
add-embedded-steps-to-dag-mermaid

Conversation

@linyows
Copy link
Owner

@linyows linyows commented Jan 22, 2026

Summary

  • Add embedded job step expansion to --dag-mermaid output, matching the existing behavior in --dag-ascii
  • Introduce DagRenderer interface and DagRendererBase struct in dag.go to share common functionality between ASCII and Mermaid renderers
  • Refactor dag_ascii.go and dag_mermaid.go to eliminate duplicate code

Changes

  • dag.go (new): Define common interface and base struct
    • DagRenderer interface
    • DagRendererBase struct with GetEvaluatedVars, ExpandPath, ResolvePath methods
    • LoadEmbeddedJob function
  • dag_ascii.go: Embed DagRendererBase, remove duplicate methods
  • dag_mermaid.go: Embed DagRendererBase, add embedded step expansion
  • dag_mermaid_test.go: Add test cases for embedded action rendering

Test plan

  • go test -run "DagMermaid" - All Mermaid renderer tests pass
  • go test -run "DagAscii" - All ASCII renderer tests pass
  • go test ./... - All tests pass

🤖 Generated with Claude Code

- Add DagRenderer interface and DagRendererBase struct in dag.go
  to share common functionality between ASCII and Mermaid renderers
- Refactor dag_ascii.go and dag_mermaid.go to use embedded
  DagRendererBase, eliminating duplicate code
- Add embedded job step expansion to Mermaid output, matching
  the existing behavior in ASCII output
- Add tests for embedded action rendering in dag_mermaid_test.go
- Add golden test files for embedded_action and embedded_expanded

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions

This comment has been minimized.

@github-actions
Copy link

Code Metrics Report

main (e50a772) #156 (847d5b5) +/-
Coverage 55.0% 55.1% +0.1%
Code to Test Ratio 1:1.0 1:1.0 -0.1
Test Execution Time 6s 12s +6s
Details
  |                     | main (e50a772) | #156 (847d5b5) |  +/-  |
  |---------------------|----------------|----------------|-------|
+ | Coverage            |          55.0% |          55.1% | +0.1% |
  |   Files             |             64 |             65 |    +1 |
  |   Lines             |           6518 |           6536 |   +18 |
+ |   Covered           |           3590 |           3607 |   +17 |
- | Code to Test Ratio  |          1:1.0 |          1:1.0 |  -0.1 |
  |   Code              |          12808 |          12846 |   +38 |
  |   Test              |          13180 |          13180 |     0 |
- | Test Execution Time |             6s |            12s |   +6s |

Code coverage of files in pull request scope (89.7% → 89.9%)

Files Coverage +/- Status
dag.go 63.4% +63.4% added
dag_ascii.go 93.0% +3.5% modified
dag_mermaid.go 92.5% +0.5% modified

Reported by octocov

@linyows linyows merged commit b2c67ea into main Jan 22, 2026
7 checks passed
@linyows linyows deleted the add-embedded-steps-to-dag-mermaid branch January 22, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant