Skip to content

Commit

Permalink
Disable email notification on package published events. (dart-lang#7392)
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos authored Jan 15, 2024
1 parent d669ac5 commit 63e4b66
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Important changes to data models, configuration, and migrations between each
AppEngine version, listed here to ease deployment and troubleshooting.

## Next Release (replace with git tag when deployed)
* Note: temporarily disabled email notification on package published events.

## `20240111t095800-all`
* Bumped runtimeVersion to `2024.01.10`.
Expand Down
6 changes: 4 additions & 2 deletions app/lib/package/backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,8 @@ class PackageBackend {
newVersion,
entities.packageVersionInfo,
...entities.assets,
outgoingEmail,
if (activeConfiguration.isPublishedEmailNotificationEnabled)
outgoingEmail,
AuditLogRecord.packagePublished(
uploader: agent,
package: newVersion.package,
Expand Down Expand Up @@ -1168,7 +1169,8 @@ class PackageBackend {
) async {
try {
await Future.wait([
emailBackend.trySendOutgoingEmail(outgoingEmail),
if (activeConfiguration.isPublishedEmailNotificationEnabled)
emailBackend.trySendOutgoingEmail(outgoingEmail),
taskBackend.trackPackage(newVersion.package, updateDependants: true),
if (apiExporter != null)
apiExporter!
Expand Down
3 changes: 3 additions & 0 deletions app/lib/shared/configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,9 @@ class Configuration {
late final isProduction = projectId == 'dartlang-pub';
late final isNotProduction = !isProduction;
late final isStaging = projectId == 'dartlang-pub-dev';

/// NOTE: email notification on package published is temporarily disabled.
late final isPublishedEmailNotificationEnabled = isNotProduction;
}

/// Data structure to describe an admin user.
Expand Down

0 comments on commit 63e4b66

Please sign in to comment.