diff --git a/keeps/delete_old_feature_flags.rb b/keeps/delete_old_feature_flags.rb index d59fab8133de7891919d5794bba05855782188c1..2e3ec0a30f842a28d9f0a616062e306e29ff093b 100644 --- a/keeps/delete_old_feature_flags.rb +++ b/keeps/delete_old_feature_flags.rb @@ -55,12 +55,11 @@ def each_change milestone: feature_flag.milestone, milestones_ago: CUTOFF_MILESTONE_OLD) - # feature_flag_default_enabled = feature_flag_definition[:default_enabled] # feature_flag_gitlab_com_state = fetch_gitlab_com_state(feature_flag.name) # TODO: Handle the different cases of default_enabled vs enabled/disabled on GitLab.com - # # Finalize the migration + # Finalize the migration change = ::Gitlab::Housekeeper::Change.new change.changelog_type = 'removed' change.title = "Delete the `#{feature_flag.name}` feature flag" @@ -72,6 +71,10 @@ def each_change As part of our process we want to ensure [feature flags don't stay too long in the codebase](https://docs.gitlab.com/ee/development/feature_flags/#types-of-feature-flags). + Rollout issue: #{feature_flag.rollout_issue_url} + + #{feature_flag_default_enabled_note(feature_flag_definition[:default_enabled])} + <details><summary>Mentions of the feature flag (click to expand)</summary> ``` @@ -108,6 +111,20 @@ def fetch_gitlab_com_state(feature_flag_name) # TBD end + def feature_flag_default_enabled_note(feature_flag_default_enabled) + if feature_flag_default_enabled + <<~NOTE + The feature flag is enabled by default. Unless it's disabled on GitLab.com, you should keep the feature-flag + code branch, otherwise, keep the other branch. + NOTE + else + <<~NOTE + The feature flag isn't enabled by default. If it's enabled on GitLab.com, you should keep the feature-flag + code branch, otherwise, keep the other branch. + NOTE + end + end + def feature_flag_grep(feature_flag_name) Gitlab::Housekeeper::Shell.execute( 'git',