From 1fe52b4236d53debce33a4da6a2f6d4a573239ee Mon Sep 17 00:00:00 2001
From: n8225 <n8225@users.noreply.github.com>
Date: Sun, 4 Dec 2016 09:57:56 -0600
Subject: [PATCH] Update Dangerfile

---
 Dangerfile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Dangerfile b/Dangerfile
index 7cedf891..db017b33 100644
--- a/Dangerfile
+++ b/Dangerfile
@@ -1,3 +1,5 @@
+#Check for changes to README.md
+has_readme_changes = !git.modified_files.grep(/README.md).empty?
 
 # Ensure there is a summary for a pull request
 fail 'Please provide a summary in the Pull Request description' if github.pr_body.length < 5
@@ -9,7 +11,7 @@ warn 'Please update the Pull Request title to contain the script name' if github
 warn 'Please rebase to get rid of the merge commits in this Pull Request' if git.commits.any? { |c| c.message =~ /^Merge branch 'master'/ }
 
 # Check links
-if [ -a ab-results-README.md-markdown-table.json ]
+if has_readme_changes
  require 'json'
  results = File.read 'ab-results-README.md-markdown-table.json'
  j = JSON.parse results
@@ -20,7 +22,7 @@ if [ -a ab-results-README.md-markdown-table.json ]
 end
 
 # Check syntax
-if [ -a syntaxcheck.json ]
+if has_readme_changes
  require 'json'
  results = File.read 'syntaxcheck.json'
  j = JSON.parse results