From a6f9327d7d98ca4d1dc21f9dd68c02cd1ab67880 Mon Sep 17 00:00:00 2001 From: David Whittaker Date: Mon, 2 Dec 2024 10:37:29 -0800 Subject: [PATCH] fix(groups): limit group_key username to first 60 characters --- src/dispatch/plugins/dispatch_google/groups/plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dispatch/plugins/dispatch_google/groups/plugin.py b/src/dispatch/plugins/dispatch_google/groups/plugin.py index ba53c3b20bf3..74c502885e68 100644 --- a/src/dispatch/plugins/dispatch_google/groups/plugin.py +++ b/src/dispatch/plugins/dispatch_google/groups/plugin.py @@ -141,7 +141,8 @@ def create( ): """Creates a new Google Group.""" client = get_service(self.configuration, "admin", "directory_v1", self.scopes) - group_key = f"{name.lower()}@{self.configuration.google_domain}" + # note: group username is limited to 60 characters + group_key = f"{name.lower()[:60]}@{self.configuration.google_domain}" if not description: description = "Group automatically created by Dispatch."