Skip to content

Commit 112bb47

Browse files
committed
Update PipelineNodeUtil#isStep to further filter step like StepStartNodes
1 parent 887f125 commit 112bb47

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/io/jenkins/plugins/pipelinegraphview/utils/PipelineNodeUtil.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,14 @@ public static boolean isStep(FlowNode node) {
5353
if (node instanceof AtomNode) {
5454
return true;
5555
}
56-
if (node instanceof StepStartNode && !isStage(node) && !isParallelBranch(node)) {
56+
if (node instanceof StepStartNode) {
5757
StepStartNode stepStartNode = (StepStartNode) node;
58-
return stepStartNode.isBody();
58+
boolean takesImplicitBlockArgument = false;
59+
StepDescriptor sd = stepStartNode.getDescriptor();
60+
if (sd != null) {
61+
takesImplicitBlockArgument = sd.takesImplicitBlockArgument();
62+
}
63+
return !isStage(node) && !isParallelBranch(node) && stepStartNode.isBody() && !takesImplicitBlockArgument;
5964
}
6065
}
6166
return false;

0 commit comments

Comments
 (0)