Skip to content

Commit

Permalink
Adding gitlab collapsible tasks support. (#2718)
Browse files Browse the repository at this point in the history
* Adding gitlab collapsible tasks support.

* remove patch.

Co-authored-by: Dan Shumaker <[email protected]>
  • Loading branch information
danshumaker and dshumakerUT authored Oct 26, 2021
1 parent dc4a75c commit d220ae6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Executor/Messenger.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public function startTask(Task $task): void
if (!$task->isShallow()) {
if (getenv('GITHUB_WORKFLOW')) {
$this->output->writeln("::group::task {$task->getName()}");
} else if (getenv('GITLAB_CI')) {
$this->output->writeln("\e[OKsection_start:task {$task->getName()}[collapsed=true]\r\e[OK{$task->getName()}");
} else {
$this->output->writeln("<fg=cyan;options=bold>task</> {$task->getName()}");
}
Expand Down Expand Up @@ -67,6 +69,8 @@ public function endTask(Task $task): void

if (getenv('GITHUB_WORKFLOW')) {
$this->output->writeln("::endgroup::");
} if (getenv('GITLAB_CI')) {
$this->output->writeln("\e[OKsection_end:{$taskTime}:{$task->getName()}");
} else if ($this->output->isVeryVerbose()) {
$this->output->writeln("<fg=yellow;options=bold>done</> {$task->getName()} $taskTime");
}
Expand Down

0 comments on commit d220ae6

Please sign in to comment.