From 46ed1b99228c8e2d9c17b698b0f0c39f813fd0ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Berg=C3=A9?= Date: Fri, 14 Oct 2022 14:18:43 +0200 Subject: [PATCH] fix(ci): fix repository detection in GitHub Actions --- packages/core/src/ci-environment/services/github-actions.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/core/src/ci-environment/services/github-actions.ts b/packages/core/src/ci-environment/services/github-actions.ts index 3cdd4a4..838b9c9 100644 --- a/packages/core/src/ci-environment/services/github-actions.ts +++ b/packages/core/src/ci-environment/services/github-actions.ts @@ -60,9 +60,8 @@ function getBranch({ env }: Context) { } function getRepository({ env }: Context) { - if (!env.GITHUB_REPOSITORY_OWNER) return null; - const [, ...repositoryParts] = env.GITHUB_REPOSITORY_OWNER.split("/"); - return repositoryParts.join("/"); + if (!env.GITHUB_REPOSITORY) return null; + return env.GITHUB_REPOSITORY.split("/")[1]; } const service: Service = {