Skip to content

Commit

Permalink
Add real dangerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
turekj committed Feb 13, 2020
1 parent c2dd2d4 commit 74dbe20
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions dangerfile.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
title = danger.github.pr.title
markdown(title)
touched_files = danger.git.modified_files + danger.git.created_files
has_source_changes = any(map(lambda f: f.startswith("danger_python"), touched_files))
has_changelog_entry = "CHANGELOG.md" in touched_files
is_trivial = "#trivial" in danger.github.pr.title

if has_source_changes and not has_changelog_entry and not is_trivial:
warn("Please, add a CHANGELOG.md entry for non-trivial changes")

0 comments on commit 74dbe20

Please sign in to comment.