Skip to content

Commit

Permalink
Add danger (TextureGroup#18)
Browse files Browse the repository at this point in the history
* Add Danger

* Move danger up

* Remove slather for now

* Have danger failures in log

* Add print out of API token for debugging

* Make verbose

* Make verbose for real

* Try this

* Revert "Try this"

This reverts commit 3bfc163.

* Try another thing

* Get rid of logging
  • Loading branch information
garrettmoon authored Apr 19, 2017
1 parent a9be79c commit 86d13e4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
16 changes: 16 additions & 0 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Sometimes it's a README fix, or something like that - which isn't relevant for
# including in a project's CHANGELOG for example
declared_trivial = github.pr_title.include? "#trivial"
has_source_changes = !git.modified_files.grep(/Source/).empty?

# 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("This is a big PR, please consider splitting it up to ease code review.") if git.lines_of_code > 500

# Changelog entries are required for changes to source files.
no_changelog_entry = !git.modified_files.include?("CHANGELOG.md")
if has_source_changes && no_changelog_entry && not_declared_trivial
fail("Any source code changes should have an entry in CHANGELOG.md.")
end
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source 'https://rubygems.org'

gem 'slather'
gem 'danger'
3 changes: 3 additions & 0 deletions run_tests_update_status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ trap trap_handler INT TERM EXIT

updateStatus "pending" "Starting build…"

echo "--- Running Danger"
bundle exec danger --verbose 2>&1|tee `pwd`/log.txt

./build.sh all 2>&1|tee `pwd`/log.txt

rm `pwd`/log.txt
Expand Down

0 comments on commit 86d13e4

Please sign in to comment.