Skip to content

Commit

Permalink
Merge branch 'master' into visual_studio_app_center
Browse files Browse the repository at this point in the history
  • Loading branch information
cojoj committed Feb 27, 2019
2 parents f475b83 + c5c14a2 commit 7d27344
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

## master


* Add support for Visual Studio App Center [@rishabhtayal](https://github.com/rishabhtayal) / [@cojoj](https://github.com/cojoj)
* Add more helptext explaining what to do if Danger didn't run on a CircleCI build. [@ghiculescu](https://github.com/ghiculescu)

## 5.15.0

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 Orta, Felix Krause
Copyright (c) 2019-present Orta, Felix Krause

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 9 additions & 1 deletion lib/danger/danger_core/executor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,15 @@ def validate_ci!
def validate_pr!(cork, fail_if_no_pr)
unless EnvironmentManager.pr?(system_env)
ci_name = EnvironmentManager.local_ci_source(system_env).name.split("::").last
cork.puts "Not a #{ci_name} Pull Request - skipping `danger` run".yellow

msg = "Not a #{ci_name} Pull Request - skipping `danger` run. "
# circle won't run danger properly if the commit is pushed and build runs before the PR exists
# https://danger.systems/guides/troubleshooting.html#circle-ci-doesnt-run-my-build-consistently
# the best solution is to enable `fail_if_no_pr`, and then re-run the job once the PR is up
if ci_name == "CircleCI"
msg << "If you only created the PR recently, try re-running your workflow."
end
cork.puts msg.strip.yellow

exit(fail_if_no_pr ? 1 : 0)
end
Expand Down

0 comments on commit 7d27344

Please sign in to comment.