summaryrefslogtreecommitdiff
path: root/Dangerfile
diff options
context:
space:
mode:
authorLukas Eipert <leipert@gitlab.com>2018-10-16 15:56:03 +0200
committerLukas Eipert <leipert@gitlab.com>2018-10-22 11:04:55 +0200
commit253e1818aa3efafb05d9994aab0f778d339e26ac (patch)
treea453ba647ef7635157519adc96718e3369890755 /Dangerfile
parentfdcdc36eecdbe904cf80fa130aebf4edd34c3f12 (diff)
downloadgitlab-ce-253e1818aa3efafb05d9994aab0f778d339e26ac.tar.gz
Create helper to get all changed filesleipert-danger-fix-moved-files
Danger apparently has three different objects which could contain files you often want to check: - git.added_files - git.modified_files - git.renamed_files The problem: If a file is renamed, `modified_files` contains the file path before the rename. In some Danger checks we use `added_files` + `modified_files`, which might contain the deleted paths of renamed files, but missing the new paths of renamed files. So we need to consider `renamed_files` as well.
Diffstat (limited to 'Dangerfile')
-rw-r--r--Dangerfile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Dangerfile b/Dangerfile
index 10caacff4c4..469e77b2514 100644
--- a/Dangerfile
+++ b/Dangerfile
@@ -1,3 +1,4 @@
+danger.import_plugin('danger/plugins/helper.rb')
danger.import_dangerfile(path: 'danger/metadata')
danger.import_dangerfile(path: 'danger/changes_size')
danger.import_dangerfile(path: 'danger/changelog')