Skip to content

Commit

Permalink
Add additional fields to pages deploy detailed artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximo-Guk committed Nov 13, 2024
1 parent c12c0fe commit bc286bd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/wrangler/src/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"> {
Expand Down
7 changes: 7 additions & 0 deletions packages/wrangler/src/pages/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit bc286bd

Please sign in to comment.