Browse Source

chore(issue-platform): Add helper function to convert slug name to feature name (#45671)

This logic is duplicated so adding this helper function
Dan Fuller 2 years ago
parent
commit
b8ede0c448
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/sentry/issues/grouptype.py

+ 5 - 1
src/sentry/issues/grouptype.py

@@ -125,9 +125,13 @@ class GroupType:
 
         return features.has(cls.build_post_process_group_feature_name(), organization)
 
+    @classmethod
+    def build_feature_name_slug(cls) -> str:
+        return cls.slug.replace("_", "-")
+
     @classmethod
     def build_base_feature_name(cls) -> str:
-        return f"organizations:{cls.slug.replace('_', '-')}"
+        return f"organizations:{cls.build_feature_name_slug()}"
 
     @classmethod
     def build_visible_feature_name(cls) -> str: