Draft: Custom Model feature settings main feature type methods
What does this MR do and why?
For the group groupcustom models I made this on top the feature_metadata.yml to make the main feature categorisation more versatile and robust.
With this, we can do a few things just like with enums when the Ai::FeatureConfigurable concern is included:
- Check what main feature a feature setting is by doing
feature_setting.code_suggestions_type? - Scope all the feature setting from the same main feature by doing
featureSettingClass.code_suggestions_type - Edit main features more easily. We can add remove or edit the values of
Ai::FeatureConfigurable::MAIN_FEATURESconstant
How to set up and validate locally
Create any instance of a feature setting class that includes the Ai::FeatureConfigurable concern (Like Ai::FeatureSetting). Then you free to use any of the keys of Ai::FeatureConfigurable::MAIN_FEATURES constant as prefix for the boolean instance method like Ai::FeatureSetting#duo_chat_issues_type? or the scope class methods like Ai::FeatureSetting.other_type.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.