From 15dd1964b429e671bd30f7c1b5e3b5a8def76ce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iiro=20J=C3=A4ppinen?= Date: Tue, 16 May 2023 18:00:59 +0300 Subject: [PATCH] Use branch input when determining GitHub deployment production status --- index.js | 2 +- src/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 4d25674..93cfa1b 100644 --- a/index.js +++ b/index.js @@ -22157,7 +22157,7 @@ try { const project = await getProject(); if (!project) throw new Error("Unable to find pages project"); - const productionEnvironment = githubBranch === project.production_branch; + const productionEnvironment = githubBranch === project.production_branch || branch === project.production_branch; const environmentName = `${projectName} (${productionEnvironment ? "Production" : "Preview"})`; let gitHubDeployment; if (gitHubToken && gitHubToken.length) { diff --git a/src/index.ts b/src/index.ts index a6fed3f..aea5add 100644 --- a/src/index.ts +++ b/src/index.ts @@ -93,7 +93,7 @@ try { log_url: `https://dash.cloudflare.com/${accountId}/pages/view/${projectName}/${deploymentId}`, description: "Cloudflare Pages", state: "success", - auto_inactive: false + auto_inactive: false, }); }; @@ -127,7 +127,7 @@ try { const project = await getProject(); if (!project) throw new Error("Unable to find pages project"); - const productionEnvironment = githubBranch === project.production_branch; + const productionEnvironment = githubBranch === project.production_branch || branch === project.production_branch; const environmentName = `${projectName} (${productionEnvironment ? "Production" : "Preview"})`; let gitHubDeployment: Awaited>;