Skip to content

Commit

Permalink
Adds more org names to the alert emails (#1561)
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Aitken <[email protected]>
  • Loading branch information
samejr and matt-aitken authored Dec 30, 2024
1 parent 330f6c5 commit e71df64
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion internal-packages/emails/emails/deployment-failure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ export default function Email(props: z.infer<typeof AlertDeploymentFailureEmailS
<Preview>{`[${organization}] Deployment ${version} [${environment}] failed: ${error.name}`}</Preview>
<Body style={main}>
<Container style={container}>
<Text style={h1}>{`An error occurred deploying ${version} in ${environment}`}</Text>
<Text
style={h1}
>{`An error occurred deploying ${version} in ${environment} in your ${organization} organization`}</Text>
<Text style={paragraphLight}>
{error.name} {error.message}
</Text>
Expand Down
2 changes: 1 addition & 1 deletion internal-packages/emails/emails/deployment-success.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function Email(props: z.infer<typeof AlertDeploymentSuccessEmailS
<Container style={container}>
<Text
style={h1}
>{`Version ${version} successfully deployed ${taskCount} tasks in ${environment}`}</Text>
>{`Version ${version} successfully deployed ${taskCount} tasks in ${environment} in your ${organization} organization`}</Text>

<Link
href={deploymentLink}
Expand Down
8 changes: 4 additions & 4 deletions internal-packages/emails/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,25 +103,25 @@ export class EmailClient {
};
case "alert-attempt": {
return {
subject: `Error on ${data.taskIdentifier} [${data.version}.${data.environment}] ${data.error.message}`,
subject: `[${data.organization}] Error on ${data.taskIdentifier} [${data.version}.${data.environment}] ${data.error.message}`,
component: <AlertAttemptFailureEmail {...data} />,
};
}
case "alert-run": {
return {
subject: `Run ${data.runId} failed for ${data.taskIdentifier} [${data.version}.${data.environment}] ${data.error.message}`,
subject: `[${data.organization}] Run ${data.runId} failed for ${data.taskIdentifier} [${data.version}.${data.environment}] ${data.error.message}`,
component: <AlertRunFailureEmail {...data} />,
};
}
case "alert-deployment-failure": {
return {
subject: `Deployment ${data.version} [${data.environment}] failed: ${data.error.name}`,
subject: `[${data.organization}] Deployment ${data.version} [${data.environment}] failed: ${data.error.name}`,
component: <AlertDeploymentFailureEmail {...data} />,
};
}
case "alert-deployment-success": {
return {
subject: `Deployment ${data.version} [${data.environment}] succeeded`,
subject: `[${data.organization}] Deployment ${data.version} [${data.environment}] succeeded`,
component: <AlertDeploymentSuccessEmail {...data} />,
};
}
Expand Down

0 comments on commit e71df64

Please sign in to comment.