diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-11 18:10:13 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-11 18:10:13 +0000 |
commit | e58ce90f147742c314b9cc08c2d1c0b585e39cf9 (patch) | |
tree | 467a1716bb63f4061e57b824c0e07532ca2fba4c /danger | |
parent | 62cd7010ef91dcaa5a5a36790985053db0b38671 (diff) | |
download | gitlab-ce-e58ce90f147742c314b9cc08c2d1c0b585e39cf9.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'danger')
-rw-r--r-- | danger/feature_flag/Dangerfile | 24 | ||||
-rw-r--r-- | danger/specialization_labels/Dangerfile | 3 |
2 files changed, 2 insertions, 25 deletions
diff --git a/danger/feature_flag/Dangerfile b/danger/feature_flag/Dangerfile index bf2194724fc..ac9ea812ebb 100644 --- a/danger/feature_flag/Dangerfile +++ b/danger/feature_flag/Dangerfile @@ -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 diff --git a/danger/specialization_labels/Dangerfile b/danger/specialization_labels/Dangerfile index 2261fe23e4e..35125f20b14 100644 --- a/danger/specialization_labels/Dangerfile +++ b/danger/specialization_labels/Dangerfile @@ -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| |