lib/todoist/plugin.rb in danger-todoist-1.2.0 vs lib/todoist/plugin.rb in danger-todoist-1.2.1

- old
+ new

@@ -111,25 +111,26 @@ @todos = DiffTodoFinder.new(keywords) .find_diffs_containing_todos(diffs_of_interest) end def keywords - return @keywords unless @keywords.nil? - DEFAULT_KEYWORDS + @keywords || DEFAULT_KEYWORDS end def message - return @message unless @message.nil? - DEFAULT_MESSAGE + @message || DEFAULT_MESSAGE end def files_of_interest git.modified_files + git.added_files end + # for whatever reason nils/false weird things creep + # into the files_of_interest. We have to make sure to only + # try to look up diffs for actual filepaths (strings) def diffs_of_interest files_of_interest - .compact + .select { |file| file.is_a?(String) } .map { |file| git.diff_for_file(file) } end end end