0

I am trying to run Danger locally with this command:

danger pr https://github.com/MyOwner/MyRepo/pull/219

Each time, this command failed, without more informations...

Traceback (most recent call last):
    30: from /usr/local/bin/danger:23:in `<main>'
    29: from /usr/local/bin/danger:23:in `load'
    28: from /Library/Ruby/Gems/2.6.0/gems/danger-8.0.4/bin/danger:5:in `<top (required)>'
    27: from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    26: from /Library/Ruby/Gems/2.6.0/gems/danger-8.0.4/lib/danger/commands/pr.rb:60:in `run'
    25: from /Library/Ruby/Gems/2.6.0/gems/danger-8.0.4/lib/danger/commands/pr.rb:60:in `new'
    24: from /Library/Ruby/Gems/2.6.0/gems/danger-8.0.4/lib/danger/danger_core/environment_manager.rb:30:in `initialize'
    23: from /Library/Ruby/Gems/2.6.0/gems/danger-8.0.4/lib/danger/danger_core/environment_manager.rb:30:in `new'
    22: from /Library/Ruby/Gems/2.6.0/gems/danger-8.0.4/lib/danger/ci_source/local_git_repo.rb:45:in `initialize'
    21: from /Library/Ruby/Gems/2.6.0/gems/danger-8.0.4/lib/danger/ci_source/local_git_repo.rb:95:in `found_pull_request'
    20: from /Library/Ruby/Gems/2.6.0/gems/danger-8.0.4/lib/danger/ci_source/support/pull_request_finder.rb:17:in `call'
    19: from /Library/Ruby/Gems/2.6.0/gems/danger-8.0.4/lib/danger/ci_source/support/pull_request_finder.rb:31:in `check_if_any_pull_request!'
    18: from /Library/Ruby/Gems/2.6.0/gems/danger-8.0.4/lib/danger/ci_source/support/pull_request_finder.rb:51:in `pull_request'
    17: from /Library/Ruby/Gems/2.6.0/gems/danger-8.0.4/lib/danger/ci_source/support/pull_request_finder.rb:93:in `remote_pull_request'
    16: from /Library/Ruby/Gems/2.6.0/gems/octokit-4.18.0/lib/octokit/client/pull_requests.rb:33:in `pull_request'
    15: from /Library/Ruby/Gems/2.6.0/gems/octokit-4.18.0/lib/octokit/connection.rb:19:in `get'
    14: from /Library/Ruby/Gems/2.6.0/gems/octokit-4.18.0/lib/octokit/connection.rb:156:in `request'
    13: from /Library/Ruby/Gems/2.6.0/gems/sawyer-0.8.2/lib/sawyer/agent.rb:94:in `call'
    12: from /Library/Ruby/Gems/2.6.0/gems/faraday-1.0.1/lib/faraday/connection.rb:198:in `get'
    11: from /Library/Ruby/Gems/2.6.0/gems/faraday-1.0.1/lib/faraday/connection.rb:492:in `run_request'
    10: from /Library/Ruby/Gems/2.6.0/gems/faraday-1.0.1/lib/faraday/rack_builder.rb:153:in `build_response'
     9: from /Library/Ruby/Gems/2.6.0/gems/faraday-http-cache-2.2.0/lib/faraday/http_cache.rb:115:in `call'
     8: from /Library/Ruby/Gems/2.6.0/gems/faraday-http-cache-2.2.0/lib/faraday/http_cache.rb:135:in `call!'
     7: from /Library/Ruby/Gems/2.6.0/gems/faraday-http-cache-2.2.0/lib/faraday/http_cache.rb:187:in `process'
     6: from /Library/Ruby/Gems/2.6.0/gems/faraday-http-cache-2.2.0/lib/faraday/http_cache.rb:283:in `fetch'
     5: from /Library/Ruby/Gems/2.6.0/gems/octokit-4.18.0/lib/octokit/middleware/follow_redirects.rb:61:in `call'
     4: from /Library/Ruby/Gems/2.6.0/gems/octokit-4.18.0/lib/octokit/middleware/follow_redirects.rb:73:in `perform_with_redirection'
     3: from /Library/Ruby/Gems/2.6.0/gems/faraday-1.0.1/lib/faraday/response.rb:11:in `call'
     2: from /Library/Ruby/Gems/2.6.0/gems/faraday-1.0.1/lib/faraday/response.rb:65:in `on_complete'
     1: from /Library/Ruby/Gems/2.6.0/gems/faraday-1.0.1/lib/faraday/response.rb:12:in `block in call'
/Library/Ruby/Gems/2.6.0/gems/octokit-4.18.0/lib/octokit/response/raise_error.rb:16:in `on_complete': GET https://api.github.com/repos/MyOwner/MyRepo/pulls/219: 404 - Not Found // See: https://developer.github.com/v3/pulls/#get-a-single-pull-request (Octokit::NotFound)

What can I do to have more information about this issue?

Seth McClaine
  • 9,142
  • 6
  • 38
  • 64
Kevin ABRIOUX
  • 16,507
  • 12
  • 93
  • 99

1 Answers1

0

Some of this is speculation but...

You are getting a 404 on https://api.github.com/repos/MyOwner/MyRepo/pulls/219 which I expect is because you haven't provided an access token. (GitHub throws a 404 on unauthorized endpoints for security)

Check out their docs: https://danger.systems/js/guides/getting_started.html#setting-up-an-access-token

Seth McClaine
  • 9,142
  • 6
  • 38
  • 64