Skip to content

Commit 65e67ae

Browse files
committed
Updated the build name
1 parent 1cc1ce8 commit 65e67ae

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/RunsOnBrowserStack.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,13 +278,13 @@ protected function getBrowserSlug(): ?string
278278
*/
279279
protected function getBuildName(): string
280280
{
281-
$sha = env('GITHUB_SHA') ?? exec('git rev-parse HEAD');
282-
283281
return sprintf(
284282
'%s — %s — %s',
285283
gethostname(),
286-
str_replace('refs', '', $sha),
287-
env('GITHUB_REF', config('app.env'))
284+
Str::of(env('GITHUB_SHA') ?? exec('git rev-parse HEAD'))
285+
->substr(0, 7),
286+
Str::of(env('GITHUB_REF', config('app.env')))
287+
->replace('refs/heads/', '')
288288
);
289289
}
290290

0 commit comments

Comments
 (0)