Commit 9462f9f7 authored by Samuel Giddins's avatar Samuel Giddins

Merge pull request #5413 from CocoaPods/danger-changelog

Add a note to include a CHANGELOG entry in a PR #trivial
parents 462372ba 41f8faf9
......@@ -9,6 +9,24 @@
end
end
# Ensure a clean commits history
if commits.any? { |c| c.message =~ /^Merge branch '#{branch_for_merge}'/ }
fail("Please rebase to get rid of the merge commits in this PR")
end
# Request a CHANGELOG entry, and give an example
has_app_changes = !modified_files.grep(/lib/).empty?
if !modified_files.include?("CHANGELOG.md") && has_app_changes
fail("Please include a CHANGELOG entry to credit yourself! \nYou can find it at [CHANGELOG.md](https://github.com/CocoaPods/CocoaPods/blob/master/CHANGELOG.md).", sticky: false)
markdown <<-MARKDOWN
Here's an example of your CHANGELOG entry:
```markdown
* #{pr.title}#{' '}
[#{pr_author}](https://github.com/#{pr_author})
[#issue_number](https://github.com/CocoaPods/CocoaPods/issues/issue_number)
```
*note*: There are two invisible spaces after the entry's text.
MARKDOWN
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment