1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-23 00:22:19 +01:00

feat: support environment variant updates in email service (#6183)

This change updates the email service's `sendScheduleSuspendedEmail`
method to support environment variants being changed.
This commit is contained in:
Thomas Heartman 2024-02-14 10:11:39 +09:00 committed by GitHub
parent e9176ac1e2
commit e366e48b4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -192,6 +192,11 @@ export class EmailService {
| { | {
reason: 'segment updated'; reason: 'segment updated';
segment: { id: number; name: string }; segment: { id: number; name: string };
}
| {
reason: 'environment variants updated';
flagName: string;
environment: string;
}, },
conflictingChangeRequestId: number | undefined, conflictingChangeRequestId: number | undefined,
changeRequests: { changeRequests: {
@ -226,6 +231,12 @@ export class EmailService {
conflict: `A strategy belonging to ${conflictData.flagName} (ID: ${conflictData.strategyId}) in the project ${project} has been updated, and your changes would overwrite some of the recent changes`, conflict: `A strategy belonging to ${conflictData.flagName} (ID: ${conflictData.strategyId}) in the project ${project} has been updated, and your changes would overwrite some of the recent changes`,
canBeRescheduled: true, canBeRescheduled: true,
}; };
case 'environment variants updated':
return {
conflictScope: 'environment variant configuration',
conflict: `The ${conflictData.environment} environment variant configuration for ${conflictData.flagName} in the project ${project} has been updated, and your changes would overwrite some of the recent changes`,
canBeRescheduled: true,
};
case 'segment updated': case 'segment updated':
return { return {
conflictScope: 'segment', conflictScope: 'segment',