Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Use branch input when determining GitHub deployment production status #80

Merged
merged 1 commit into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
};

Expand Down Expand Up @@ -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<ReturnType<typeof createGitHubDeployment>>;
Expand Down