danger: Could not find a CI source?

Trying to get danger up and running, but we use TeamCity. Getting this error when running bundle exec danger --verbose

Am I missing something?

/Users/josh.lesch/.rvm/gems/ruby-2.2.1/gems/danger-0.7.3/lib/danger/environment_manager.rb:24:in `initialize': Could not find a CI source (RuntimeError)
    from /Users/josh.lesch/.rvm/gems/ruby-2.2.1/gems/danger-0.7.3/lib/danger/commands/runner.rb:35:in `new'
    from /Users/josh.lesch/.rvm/gems/ruby-2.2.1/gems/danger-0.7.3/lib/danger/commands/runner.rb:35:in `run'
    from /Users/josh.lesch/.rvm/gems/ruby-2.2.1/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
    from /Users/josh.lesch/.rvm/gems/ruby-2.2.1/gems/danger-0.7.3/bin/danger:5:in `<top (required)>'
    from /Users/josh.lesch/.rvm/gems/ruby-2.2.1/bin/danger:23:in `load'
    from /Users/josh.lesch/.rvm/gems/ruby-2.2.1/bin/danger:23:in `<main>'

Also, can I tell it what PR to use when using the local arg?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 23 (15 by maintainers)

Most upvoted comments

Yeah, that should be an easy fix, let me see if I can fix this tonight 😃

When I use the local flag with --verbose it tells me the pull that it is going to use, but it doesn’t actually post anything. I know my github token has the correct auth as I use it for commit status.

danger local will actually not post anything, but that’s by-design. It’s for developers to test the workings, by outputting what would normally be posted as a comment to stdout instead.

Using it on a CI server would make it post, if you set the API token in a environment variable.