We’re using Danger to automate parts of code review. For a while it’s been reporting this error:
bundle exec danger Could not set up API to Code Review site for Danger For your GitHub repo, you need to expose: DANGER_GITHUB_API_TOKEN You may also need: DANGER_GITHUB_HOST, DANGER_GITHUB_API_BASE_URL Found these keys in your ENV: CIRCLE_BUILD_NUM, DANGER_GITHUB_API_TOKEN, ...
On closer inspection turned out to be generic. As can be clearly seen from the logs the required token is in the environment. What really happens is that Danger can’t find a git remote, which it uses to validate a working CI.
I ssh’ed into a machine and tried running the same command and the list of remotes came up empty. Is this to be expected? Building without cache works as expected.
As a workaround I’ve added
git remote add origin <repo.git> to
checkout.post, but it’d be great if that just worked automatically.