lib/changelog/changelog_file.rb in danger-changelog-0.2.0 vs lib/changelog/changelog_file.rb in danger-changelog-0.2.1

- old
+ new

@@ -36,18 +36,23 @@ # Parse CHANGELOG file. def parse @your_contribution_here = false @bad_lines = [] File.open(filename).each_line do |line| - # ignore lines that aren't changes - next unless line[0] == '*' + next if line.strip.empty? + + changelog_line = ChangelogLineParser.parse(line) + + if changelog_line.nil? || changelog_line.invalid? + @bad_lines << line + next + end + # notice your contribution here - if line == "* Your contribution here.\n" + if changelog_line.is_a?(ChangelogPlaceholderLine) @your_contribution_here = true next end - next if Danger::Changelog::ChangelogLine.valid?(line) - @bad_lines << line end end end end end