lib/changelog/plugin.rb in danger-changelog-0.2.1 vs lib/changelog/plugin.rb in danger-changelog-0.3.0

- old
+ new

@@ -49,26 +49,27 @@ ```markdown #{Danger::Changelog::ChangelogEntryLine.example(github)} ``` MARKDOWN - warn "Unless you're refactoring existing code, please update #{filename}.", sticky: false + warn "Unless you're refactoring existing code or improving documentation, please update #{filename}.", sticky: false false end end # Is the CHANGELOG.md format correct? + # @return [boolean] def is_changelog_format_correct? changelog_file = Danger::Changelog::ChangelogFile.new(filename) if changelog_file.exists? changelog_file.bad_lines.each do |line| markdown <<-MARKDOWN ```markdown #{line}``` MARKDOWN end messaging.fail("One of the lines below found in #{filename} doesn't match the expected format. Please make it look like the other lines, pay attention to periods and spaces.", sticky: false) if changelog_file.bad_lines? - messaging.fail("Please put back the `* Your contribution here.` line into #{filename}.", sticky: false) unless changelog_file.your_contribution_here? + messaging.fail("Please put back the `#{Danger::Changelog.config.placeholder_line.chomp}` line into #{filename}.", sticky: false) unless changelog_file.your_contribution_here? || !Danger::Changelog.config.placeholder_line? changelog_file.good? else messaging.fail("The #{filename} file does not exist.", sticky: false) false end