diff options
Diffstat (limited to 'danger/product_intelligence/Dangerfile')
-rw-r--r-- | danger/product_intelligence/Dangerfile | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/danger/product_intelligence/Dangerfile b/danger/product_intelligence/Dangerfile index fd6ae76b4f1..eedb9b89d22 100644 --- a/danger/product_intelligence/Dangerfile +++ b/danger/product_intelligence/Dangerfile @@ -12,13 +12,11 @@ For MR review guidelines, see the [Service Ping review guidelines](https://docs. MSG # exit if not matching files or if no product intelligence labels -matching_changed_files = product_intelligence.matching_changed_files -labels = product_intelligence.missing_labels +product_intelligence_paths_to_review = project_helper.changes_by_category[:product_intelligence] +labels_to_add = product_intelligence.missing_labels -return if matching_changed_files.empty? || labels.empty? +return if product_intelligence_paths_to_review.empty? || labels_to_add.empty? -warn format(CHANGED_FILES_MESSAGE, changed_files: helper.markdown_list(matching_changed_files)) +warn format(CHANGED_FILES_MESSAGE, changed_files: helper.markdown_list(product_intelligence_paths_to_review)) -gitlab.api.update_merge_request(gitlab.mr_json['project_id'], - gitlab.mr_json['iid'], - add_labels: labels) +project_helper.labels_to_add.concat(labels_to_add) |