Skip to content

Commit e71df64

Browse files
samejrmatt-aitken
andauthored
Adds more org names to the alert emails (#1561)
Co-authored-by: Matt Aitken <matt@mattaitken.com>
1 parent 330f6c5 commit e71df64

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
@@ -103,25 +103,25 @@ export class EmailClient {
103103
};
104104
case "alert-attempt": {
105105
return {
106-
subject: `Error on ${data.taskIdentifier} [${data.version}.${data.environment}] ${data.error.message}`,
106+
subject: `[${data.organization}] Error on ${data.taskIdentifier} [${data.version}.${data.environment}] ${data.error.message}`,
107107
component: <AlertAttemptFailureEmail {...data} />,
108108
};
109109
}
110110
case "alert-run": {
111111
return {
112-
subject: `Run ${data.runId} failed for ${data.taskIdentifier} [${data.version}.${data.environment}] ${data.error.message}`,
112+
subject: `[${data.organization}] Run ${data.runId} failed for ${data.taskIdentifier} [${data.version}.${data.environment}] ${data.error.message}`,
113113
component: <AlertRunFailureEmail {...data} />,
114114
};
115115
}
116116
case "alert-deployment-failure": {
117117
return {
118-
subject: `Deployment ${data.version} [${data.environment}] failed: ${data.error.name}`,
118+
subject: `[${data.organization}] Deployment ${data.version} [${data.environment}] failed: ${data.error.name}`,
119119
component: <AlertDeploymentFailureEmail {...data} />,
120120
};
121121
}
122122
case "alert-deployment-success": {
123123
return {
124-
subject: `Deployment ${data.version} [${data.environment}] succeeded`,
124+
subject: `[${data.organization}] Deployment ${data.version} [${data.environment}] succeeded`,
125125
component: <AlertDeploymentSuccessEmail {...data} />,
126126
};
127127
}

0 commit comments

Comments
 (0)