Add optional Mermaid flow-graph visualization to the PR comment#81
Open
sfc-gh-pvillard wants to merge 1 commit into
Open
Add optional Mermaid flow-graph visualization to the PR comment#81sfc-gh-pvillard wants to merge 1 commit into
sfc-gh-pvillard wants to merge 1 commit into
Conversation
Add a `flow-graph` action input (default false) that renders a per process-group Mermaid flowchart of structural changes alongside the existing textual diff. Graph logic lives in a new com.snowflake.openflow.graph.FlowGraph class, mirroring the checkstyle package layout; FlowDiff only wires it in. Also make the diff bullet ordering deterministic (content-based instead of the JVM identity hashCode), so the comment no longer reorders on unrelated changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an optional per-process-group Mermaid flow-graph to the PR comment, giving reviewers a visual of the structural changes alongside the existing textual description.
flow-graphaction input (defaultfalse— no change to existing behaviour when unset).flowchartoverlaying the diff: 🟩 added / 🟥 removed / 🟧 modified / ⬜ unchanged. Node shapes distinguish processor (rectangle), port (rounded), funnel (circle); a processor's type shows as<Type>and a child-group port is tagged[group name].com.snowflake.openflow.graph.FlowGraphclass, mirroring thecheckstylepackage layout —FlowDiffonly wires it in.hashCode), so the comment no longer reorders on unrelated code changes.Example
Test plan
mvn clean package— build passes, 53 tests (addedFlowGraphTest+ 4 fixtures covering cross-group ports, funnel, reroute, oversize suppression, escaping, and config-only groups).