Skip to content

Commit

Permalink
feat(gitlab): console logger sections
Browse files Browse the repository at this point in the history
  • Loading branch information
fargito committed Nov 6, 2024
1 parent 5a68d27 commit 55e1e55
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/run/ci_provider/gitlab_ci/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,20 @@ impl Log for GitLabCILogger {

// https://docs.gitlab.com/ee/ci/yaml/script.html#custom-collapsible-sections
println!(
"{}",
style(format!("section_start:{timestamp}:{new_section_id}")).hidden()
"{}\x0D{}",
style(format!("section_start:{timestamp}:{new_section_id}")).hidden(),
style(name).cyan().bold().hidden()
);
println!("{}", style(name).cyan().bold());
}
GroupEvent::End => {
// do not fail if there is no current section
let current_section_id = section_id.clone().unwrap_or("".to_string());

// https://docs.gitlab.com/ee/ci/yaml/script.html#custom-collapsible-sections
println!(
"{}",
style(format!("section_end:{timestamp}:{current_section_id}")).hidden()
"{}\x0D{}",
style(format!("section_end:{timestamp}:{current_section_id}")).hidden(),
style("").hidden()
);

*section_id = None;
Expand Down

0 comments on commit 55e1e55

Please sign in to comment.