Skip to content

Unable to run tests for plugin remote on GitHub Enterprise #17

@liamnichols

Description

@liamnichols

I'm writing a plugin who's repo is hosted on a private GHE instance and when I run bundle exec rake spec I am presented with the following

➜  danger-localized_strings git:(master) ✗ bundle exec rake spec
/Users/liamnichols/.rbenv/versions/2.3.6/bin/ruby -I/Users/liamnichols/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/rspec-core-3.7.1/lib:/Users/liamnichols/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/rspec-support-3.7.1/lib /Users/liamnichols/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/rspec-core-3.7.1/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
.
Could not set up API to Code Review site for Danger

For Danger to run on this project, you need to expose a set of following the ENV vars:
 - GitHub: DANGER_GITHUB_API_TOKEN
 - GitLab: DANGER_GITLAB_API_TOKEN
 - BitbucketServer: DANGER_BITBUCKETSERVER_USERNAME, DANGER_BITBUCKETSERVER_PASSWORD, DANGER_BITBUCKETSERVER_HOST
 - BitbucketCloud: DANGER_BITBUCKETCLOUD_USERNAME, DANGER_BITBUCKETCLOUD_PASSWORD
 - VSTS: DANGER_VSTS_API_TOKEN, DANGER_VSTS_HOST


Found these keys in your ENV: HAS_JOSH_K_SEAL_OF_APPROVAL, TRAVIS_PULL_REQUEST, TRAVIS_REPO_SLUG, TRAVIS_COMMIT_RANGE, DANGER_GITHUB_API_TOKEN.

Failing the build, Danger cannot run without API access.
You can see more information at http://danger.systems/guides/getting_started.html

I found #7 as this has a similar effect and after some digging, I realised it is because danger checks for a remote named origin to look for the repo name when detecting the host.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions