From 21d7dc19a3e92bb7521053554369a6fd3a4bcfd7 Mon Sep 17 00:00:00 2001 From: Claas Augner <495429+caugner@users.noreply.github.com> Date: Fri, 12 Jul 2024 15:26:19 +0200 Subject: [PATCH] fix(build): ignore GITHUB_REF in mdn/yari (#11398) --- build/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/index.ts b/build/index.ts index 61e3632089c4..4942aae71dfb 100644 --- a/build/index.ts +++ b/build/index.ts @@ -67,7 +67,10 @@ function getCurrentGitBranch(root: string) { // Only bother getting fancy if the root is CONTENT_ROOT. // For other possible roots, just leave it to the default. if (root === CONTENT_ROOT) { - if (process.env.GITHUB_REF) { + if ( + process.env.GITHUB_REF && + process.env.GITHUB_REPOSITORY !== "mdn/yari" + ) { name = process.env.GITHUB_REF.split("/").slice(2).join("/"); } else { // Most probably, you're hacking on the content, using Yari to preview,