Skip to content

Commit

Permalink
Add danger systems to the repo
Browse files Browse the repository at this point in the history
To monitor new pull requests to the repo, this will check to make sure that when changes are made the changelog is updated. Danger allows for so many customizations but this is simply a basic one to start.
  • Loading branch information
jacksontaylor13 committed Mar 16, 2017
1 parent 810eab1 commit 0b2117d
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Check to see if any changes were made to Spruce library
has_library_changes = !git.modified_files.grep(/Sources/).empty?

# warn if this PR is above 200 lines
warn("Big PR") if git.lines_of_code > 200

# check to see if the changelog has been updated
no_changelog_entry = !git.modified_files.include?("Changelog.md")
if has_app_changes && no_changelog_entry
fail("Any changes to the Spruce library need to be documented in the Changelog")
end

# Run SwiftLint
swiftlint.lint_files
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ gem 'fastlane'
gem 'cocoapods'
gem 'slather'
gem 'coveralls', require: false
gem 'danger'
29 changes: 29 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ GEM
public_suffix (~> 2.0, >= 2.0.2)
babosa (1.0.2)
claide (1.0.1)
claide-plugins (0.9.2)
cork
nap
open4 (~> 1.3)
clamp (0.6.5)
cocoapods (1.2.0)
activesupport (>= 4.0.2, < 5)
Expand Down Expand Up @@ -47,14 +51,28 @@ GEM
netrc (= 0.7.8)
cocoapods-try (1.1.0)
colored (1.2)
colored2 (3.1.2)
commander (4.4.3)
highline (~> 1.7.2)
cork (0.2.0)
colored (~> 1.2)
coveralls (0.8.19)
json (>= 1.8, < 3)
simplecov (~> 0.12.0)
term-ansicolor (~> 1.3)
thor (~> 0.19.1)
tins (~> 1.6)
danger (4.3.0)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
cork (~> 0.1)
faraday (~> 0.9)
faraday-http-cache (~> 1.0)
git (~> 1)
kramdown (~> 1.5)
octokit (~> 4.2)
terminal-table (~> 1)
docile (1.1.5)
domain_name (0.5.20161129)
unf (>= 0.0.5, < 1.0.0)
Expand All @@ -66,6 +84,8 @@ GEM
faraday-cookie_jar (0.0.6)
faraday (>= 0.7.4)
http-cookie (~> 1.0.0)
faraday-http-cache (1.3.1)
faraday (~> 0.8)
faraday_middleware (0.11.0.1)
faraday (>= 0.7.4, < 1.0)
fastimage (2.0.1)
Expand Down Expand Up @@ -104,6 +124,7 @@ GEM
fourflusher (2.0.1)
fuzzy_match (2.0.4)
gh_inspector (1.0.3)
git (1.3.0)
google-api-client (0.9.28)
addressable (~> 2.3)
googleauth (~> 0.5)
Expand All @@ -129,6 +150,7 @@ GEM
i18n (0.8.0)
json (1.8.3)
jwt (1.5.6)
kramdown (1.13.2)
little-plugger (1.1.4)
logging (2.1.0)
little-plugger (~> 1.1)
Expand All @@ -149,6 +171,9 @@ GEM
netrc (0.7.8)
nokogiri (1.6.8.1)
mini_portile2 (~> 2.1.0)
octokit (4.6.2)
sawyer (~> 0.8.0, >= 0.5.3)
open4 (1.3.4)
os (0.9.6)
plist (3.2.0)
public_suffix (2.0.5)
Expand All @@ -158,6 +183,9 @@ GEM
rouge (1.11.1)
ruby-macho (0.2.6)
rubyzip (1.2.1)
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
faraday (~> 0.8, < 1.0)
security (0.1.3)
signet (0.7.3)
addressable (~> 2.3)
Expand Down Expand Up @@ -208,6 +236,7 @@ PLATFORMS
DEPENDENCIES
cocoapods
coveralls
danger
fastlane
slather

Expand Down
1 change: 1 addition & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ general:
test:
override:
- gem install bundler
- bundle exec danger
- bundle exec fastlane run_tests
post:
- bundle exec slather

0 comments on commit 0b2117d

Please sign in to comment.