Commit f794a15f authored by Matthias Käppler's avatar Matthias Käppler

Merge branch 'remove-danger-rule-for-feature0-flag' into 'master'

Remove Danger rule that adds tags to MR title upon FF change

See merge request gitlab-org/gitlab!64496
parents 821e705a 4038e344
......@@ -68,27 +68,3 @@ end
if helper.security_mr? && feature_flag_file_added?
fail "Feature flags are discouraged from security merge requests. Read the [security documentation](https://gitlab.com/gitlab-org/release/docs/-/blob/master/general/security/utilities/feature_flags.md) for details."
end
if feature_flag_file_added_or_removed?
new_mr_title = helper.mr_title.dup
new_mr_title << ' [RUN ALL RSPEC]' unless helper.run_all_rspec_mr?
new_mr_title << ' [RUN AS-IF-FOSS]' unless helper.run_as_if_foss_mr?
changes = {}
changes[:add_labels] = FEATURE_FLAG_LABEL unless helper.mr_has_labels?(FEATURE_FLAG_LABEL)
if new_mr_title != helper.mr_title
changes[:title] = new_mr_title
else
message "You're adding or removing a feature flag, your MR title needs to include `[RUN ALL RSPEC] [RUN AS-IF-FOSS]` (we may have updated it automatically for you and started a new MR pipeline) to ensure everything is covered."
end
if changes.any?
gitlab.api.update_merge_request(
gitlab.mr_json['project_id'],
gitlab.mr_json['iid'],
**changes
)
gitlab.api.post("/projects/#{gitlab.mr_json['project_id']}/merge_requests/#{gitlab.mr_json['iid']}/pipelines")
end
end
......@@ -9,7 +9,8 @@ SPECIALIZATIONS = {
docs: 'documentation',
qa: 'QA',
engineering_productivity: 'Engineering Productivity',
ci_template: 'ci::templates'
ci_template: 'ci::templates',
feature_flag: 'feature flag'
}.freeze
labels_to_add = project_helper.changes_by_category.each_with_object([]) do |(category, _changes), memo|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment