From bc286bd30cf12b7fdbce046be6e53ce12ae1283d Mon Sep 17 00:00:00 2001 From: Maximo Guk <62088388+Maximo-Guk@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:56:57 -0600 Subject: [PATCH] Add additional fields to pages deploy detailed artifact --- packages/wrangler/src/output.ts | 10 ++++++++++ packages/wrangler/src/pages/deploy.ts | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/packages/wrangler/src/output.ts b/packages/wrangler/src/output.ts index 7a85768edabb..db17d11e90dc 100644 --- a/packages/wrangler/src/output.ts +++ b/packages/wrangler/src/output.ts @@ -118,6 +118,16 @@ interface OutputEntryPagesDeploymentDetailed alias: string | undefined; /** The environment being deployed to */ environment: "production" | "preview"; + /** The name of the pages project */ + project_name: string; + /** The production branch of the pages project */ + production_branch: string; + deployment_trigger: { + metadata: { + /** Commit hash of the deployment trigger metadata for the pages project */ + commit_hash: string; + }; + }; } interface OutputEntryVersionUpload extends OutputEntryBase<"version-upload"> { diff --git a/packages/wrangler/src/pages/deploy.ts b/packages/wrangler/src/pages/deploy.ts index e8a3e85298fc..6274f92f0101 100644 --- a/packages/wrangler/src/pages/deploy.ts +++ b/packages/wrangler/src/pages/deploy.ts @@ -454,6 +454,13 @@ ${failureMessage}`, url: deploymentResponse.url, alias, environment: deploymentResponse.environment, + project_name: deploymentResponse.project_name, + production_branch: deploymentResponse.production_branch, + deployment_trigger: { + metadata: { + commit_hash: deploymentResponse.deployment_trigger.metadata.commit_hash, + }, + }, }); await metrics.sendMetricsEvent("create pages deployment");