Skip to content

Commit

Permalink
warn if no milestone on PR
Browse files Browse the repository at this point in the history
Summary:
😄
Closes #890

Differential Revision: D5613905

Pulled By: rnystrom

fbshipit-source-id: 1c2b2b46c118741a7b5b84b568a69bf4edb3a199
  • Loading branch information
jessesquires authored and facebook-github-bot committed Aug 11, 2017
1 parent 1faf59b commit 0a292a8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]"
# Warn when there is a big PR
warn("Big PR") if git.lines_of_code > 500

# Changelog entries are required for changes to library files.
# Changelog entries are required for changes to library files
no_changelog_entry = !git.modified_files.include?("CHANGELOG.md")
if has_source_changes && no_changelog_entry && not_declared_trivial && git.lines_of_code > 10
fail("Any source code changes should have an entry in CHANGELOG.md.")
end

# Milestones are required to track what's included in each release
if has_source_changes && not_declared_trivial
has_milestone = !github.pr_json['milestone'].nil?
warn('All pull requests should have a milestone attached, unless marked *#trivial*.', sticky: false) unless has_milestone
end

# Docs are regenerated when releasing
has_doc_changes = !git.modified_files.grep(/docs\//).empty?
if has_doc_changes
Expand Down

0 comments on commit 0a292a8

Please sign in to comment.