Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Eipert <leipert@gitlab.com>2018-10-16 16:56:03 +0300
committerLukas Eipert <leipert@gitlab.com>2018-10-22 12:04:55 +0300
commit253e1818aa3efafb05d9994aab0f778d339e26ac (patch)
treea453ba647ef7635157519adc96718e3369890755 /danger/eslint
parentfdcdc36eecdbe904cf80fa130aebf4edd34c3f12 (diff)
Create helper to get all changed 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 'danger/eslint')
-rw-r--r--danger/eslint/Dangerfile2
1 files changed, 1 insertions, 1 deletions
diff --git a/danger/eslint/Dangerfile b/danger/eslint/Dangerfile
index f78488cfd0a..4916cacfd7e 100644
--- a/danger/eslint/Dangerfile
+++ b/danger/eslint/Dangerfile
@@ -7,7 +7,7 @@ def get_eslint_files(files)
end
end
-eslint_candidates = get_eslint_files(git.added_files + git.modified_files)
+eslint_candidates = get_eslint_files(helper.all_changed_files)
return if eslint_candidates.empty?