Skip to content

Commit 0f16fb4

Browse files
committed
Adds more org names to the alert emails
1 parent f0182ab commit 0f16fb4

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

internal-packages/emails/emails/deployment-failure.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ export default function Email(props: z.infer<typeof AlertDeploymentFailureEmailS
5454
<Preview>{`[${organization}] Deployment ${version} [${environment}] failed: ${error.name}`}</Preview>
5555
<Body style={main}>
5656
<Container style={container}>
57-
<Text style={h1}>{`An error occurred deploying ${version} in ${environment}`}</Text>
57+
<Text
58+
style={h1}
59+
>{`An error occurred deploying ${version} in ${environment} in your ${organization} organization`}</Text>
5860
<Text style={paragraphLight}>
5961
{error.name} {error.message}
6062
</Text>

internal-packages/emails/emails/deployment-success.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default function Email(props: z.infer<typeof AlertDeploymentSuccessEmailS
3939
<Container style={container}>
4040
<Text
4141
style={h1}
42-
>{`Version ${version} successfully deployed ${taskCount} tasks in ${environment}`}</Text>
42+
>{`Version ${version} successfully deployed ${taskCount} tasks in ${environment} in your ${organization} organization`}</Text>
4343

4444
<Link
4545
href={deploymentLink}

internal-packages/emails/src/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,25 +100,25 @@ export class EmailClient {
100100
};
101101
case "alert-attempt": {
102102
return {
103-
subject: `Error on ${data.taskIdentifier} [${data.version}.${data.environment}] ${data.error.message}`,
103+
subject: `[${data.organization}] Error on ${data.taskIdentifier} [${data.version}.${data.environment}] ${data.error.message}`,
104104
component: <AlertAttemptFailureEmail {...data} />,
105105
};
106106
}
107107
case "alert-run": {
108108
return {
109-
subject: `Run ${data.runId} failed for ${data.taskIdentifier} [${data.version}.${data.environment}] ${data.error.message}`,
109+
subject: `[${data.organization}] Run ${data.runId} failed for ${data.taskIdentifier} [${data.version}.${data.environment}] ${data.error.message}`,
110110
component: <AlertRunFailureEmail {...data} />,
111111
};
112112
}
113113
case "alert-deployment-failure": {
114114
return {
115-
subject: `Deployment ${data.version} [${data.environment}] failed: ${data.error.name}`,
115+
subject: `[${data.organization}] Deployment ${data.version} [${data.environment}] failed: ${data.error.name}`,
116116
component: <AlertDeploymentFailureEmail {...data} />,
117117
};
118118
}
119119
case "alert-deployment-success": {
120120
return {
121-
subject: `Deployment ${data.version} [${data.environment}] succeeded`,
121+
subject: `[${data.organization}] Deployment ${data.version} [${data.environment}] succeeded`,
122122
component: <AlertDeploymentSuccessEmail {...data} />,
123123
};
124124
}

0 commit comments

Comments
 (0)