Skip to content

Commit

Permalink
better label for suspend.
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed Feb 2, 2024
1 parent dce4396 commit 38501e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions lib/trailblazer/workflow/state/discovery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@ def self.readable_name_for_catch_event(position)
"#{position[:tuple][0]}: (✉)➔[#{position[:comment][1]}]"
end

def self.readable_name_for_resume_event(position)
resume_labels = position[:comment][1]

catch_events = resume_labels.collect { |catch_label| "(✉)#{catch_label}" }
.join(" ")

"#{position[:tuple][0]}: ➔[#{catch_events}]"
end

def self.render_cli_event_table(discovery_state_table, render_ids: false, hide_lanes: [])
rows = discovery_state_table.flat_map do |row|
start_lane_id, start_lane_task_id = row[:start_position][:tuple]
Expand Down
2 changes: 1 addition & 1 deletion lib/trailblazer/workflow/state/discovery/testing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def self.render_comment_header(structure)
triggered_catch_event_label = Discovery.readable_name_for_catch_event(testing_row[:start_position])

start_configuration_cols = testing_row[:start_configuration].collect do |lane_position|
content = "#{Discovery.readable_name_for_catch_event(lane_position)}"
content = "#{Discovery.readable_name_for_resume_event(lane_position)}"
end.join(", ")

Hash[
Expand Down

0 comments on commit 38501e2

Please # to comment.