Skip to content

Commit

Permalink
fix(ci): fix empty branch name on browserstack
Browse files Browse the repository at this point in the history
Signed-off-by: Fery Wardiyanto <[email protected]>
  • Loading branch information
feryardiant committed Mar 19, 2024
1 parent 3ba4aaa commit 465e32b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/BrowserStack.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ public static function getBuildName(): string
$branch = env('GITHUB_HEAD_REF', \exec('git branch --show-current'));
$message = self::getRunsMessage().' '.self::getCommitSha();

if (empty($branch)) {
$branch = env('GITHUB_REF_NAME');
}

if ($buildMatrix = env('BUILD_MATRIX')) {
$numbers .= \sprintf(', Matrix: %s', $buildMatrix);
}
Expand Down

0 comments on commit 465e32b

Please sign in to comment.