Skip to content

Commit d220ae6

Browse files
Adding gitlab collapsible tasks support. (#2718)
* Adding gitlab collapsible tasks support. * remove patch. Co-authored-by: Dan Shumaker <[email protected]>
1 parent dc4a75c commit d220ae6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Executor/Messenger.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public function startTask(Task $task): void
4040
if (!$task->isShallow()) {
4141
if (getenv('GITHUB_WORKFLOW')) {
4242
$this->output->writeln("::group::task {$task->getName()}");
43+
} else if (getenv('GITLAB_CI')) {
44+
$this->output->writeln("\e[OKsection_start:task {$task->getName()}[collapsed=true]\r\e[OK{$task->getName()}");
4345
} else {
4446
$this->output->writeln("<fg=cyan;options=bold>task</> {$task->getName()}");
4547
}
@@ -67,6 +69,8 @@ public function endTask(Task $task): void
6769

6870
if (getenv('GITHUB_WORKFLOW')) {
6971
$this->output->writeln("::endgroup::");
72+
} if (getenv('GITLAB_CI')) {
73+
$this->output->writeln("\e[OKsection_end:{$taskTime}:{$task->getName()}");
7074
} else if ($this->output->isVeryVerbose()) {
7175
$this->output->writeln("<fg=yellow;options=bold>done</> {$task->getName()} $taskTime");
7276
}

0 commit comments

Comments
 (0)