Sha256: cdc72241e89180ad317f047d17e4d8ced7302ba0da02e9d33d947e0561c22cb2

Contents?: true

Size: 1.56 KB

Versions: 59

Compression:

Stored size: 1.56 KB

Contents

# Ensure a clean commits history
if git.commits.any? { |c| c.message =~ /^Merge branch '#{github.branch_for_base}'/ }
  fail('Please rebase to get rid of the merge commits in this PR')
end
can_merge = github.pr_json["mergeable"]
is_merged = github.pr_json["merged"]

if is_merged
  warn("This PR was merged before CI was done.", sticky: false)
else
  warn("This PR cannot be merged yet.", sticky: false) unless can_merge
end

# Make it more obvious that a PR is a work in progress and shouldn't be merged yet
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

#ENSURE THERE IS A SUMMARY FOR A PR
warn("Please provide a summary in the Pull Request description. See more info <a href=\"http\://tinyletter.com/exercism/letters/exercism-pull-requests\">here.</a>") if github.pr_body.length < 5

# LINT Comments in for each Line
jsonpath = "lintreport.json"
contents = File.read jsonpath
require "json"
if contents.to_s == ''
	contents = "[]"
end
json = JSON.parse contents
json.each do |object|
   shortFile =  object["file"]
   shortFile.sub! "/Users/travis/build/exercism/xswift/", ''
   shortFile = shortFile.to_s || ''
   msg = object["reason"].to_s || ''
   line = object["line"] || 1
   #only warn for files that were edited in this PR.
   if git.modified_files.include? shortFile
   	shortFile.prepend("/")  # get away from doing inline comments since they are buggy as of Sep-2016
   	warn(msg, file: shortFile, line: line)
   else
   	message(msg, file: shortFile, line: line)
   end
end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
trackler-2.0.8.30 tracks/swift/Dangerfile
trackler-2.0.8.29 tracks/swift/Dangerfile
trackler-2.0.8.28 tracks/swift/Dangerfile
trackler-2.0.8.27 tracks/swift/Dangerfile
trackler-2.0.8.26 tracks/swift/Dangerfile
trackler-2.0.8.24 tracks/swift/Dangerfile
trackler-2.0.8.23 tracks/swift/Dangerfile
trackler-2.0.8.22 tracks/swift/Dangerfile
trackler-2.0.8.21 tracks/swift/Dangerfile
trackler-2.0.8.20 tracks/swift/Dangerfile
trackler-2.0.8.19 tracks/swift/Dangerfile
trackler-2.0.8.18 tracks/swift/Dangerfile
trackler-2.0.8.17 tracks/swift/Dangerfile
trackler-2.0.8.16 tracks/swift/Dangerfile
trackler-2.0.8.15 tracks/swift/Dangerfile
trackler-2.0.8.14 tracks/swift/Dangerfile
trackler-2.0.8.13 tracks/swift/Dangerfile
trackler-2.0.8.12 tracks/swift/Dangerfile
trackler-2.0.8.11 tracks/swift/Dangerfile
trackler-2.0.8.10 tracks/swift/Dangerfile