mirror of
				https://github.com/awesome-selfhosted/awesome-selfhosted.git
				synced 2025-11-04 03:42:47 +00:00 
			
		
		
		
	Update Dangerfile
This commit is contained in:
		@@ -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
 | 
					# 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
 | 
					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'/ }
 | 
					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
 | 
					# Check links
 | 
				
			||||||
if [ -a ab-results-README.md-markdown-table.json ]
 | 
					if has_readme_changes
 | 
				
			||||||
 require 'json'
 | 
					 require 'json'
 | 
				
			||||||
 results = File.read 'ab-results-README.md-markdown-table.json'
 | 
					 results = File.read 'ab-results-README.md-markdown-table.json'
 | 
				
			||||||
 j = JSON.parse results
 | 
					 j = JSON.parse results
 | 
				
			||||||
@@ -20,7 +22,7 @@ if [ -a ab-results-README.md-markdown-table.json ]
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Check syntax
 | 
					# Check syntax
 | 
				
			||||||
if [ -a syntaxcheck.json ]
 | 
					if has_readme_changes
 | 
				
			||||||
 require 'json'
 | 
					 require 'json'
 | 
				
			||||||
 results = File.read 'syntaxcheck.json'
 | 
					 results = File.read 'syntaxcheck.json'
 | 
				
			||||||
 j = JSON.parse results
 | 
					 j = JSON.parse results
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user