Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github_PR throws error Octokit::NotFound: POST 404 #413

Closed
AliHoussein opened this issue Aug 18, 2021 · 1 comment
Closed

Github_PR throws error Octokit::NotFound: POST 404 #413

AliHoussein opened this issue Aug 18, 2021 · 1 comment

Comments

@AliHoussein
Copy link

Hi,
For audit purposes, I am trying to make pronto review a large pull request from branch B to branch A.
I set pronto with the -c parameter and manage to run pronto locally successfully but can't manage to make -f github_pr work.

Command used is
PRONTO_GITHUB_ACCESS_TOKEN=real_token PRONTO_PULL_REQUEST_ID=1 bundle exec pronto run -f github_pr -c branch_A

Output is:

warning: parser/current is loading parser/ruby27, which recognizes
warning: 2.7.4-compliant syntax, but you are running 2.7.1.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
  Unknown file type: rake, defaulting to ruby
  Unknown file type: rake, defaulting to ruby
  Unknown file type: rake, defaulting to ruby
  Unknown file type: rake, defaulting to ruby
  Unknown file type: rake, defaulting to ruby
  Unknown file type: rake, defaulting to ruby
  Unknown file type: rake, defaulting to ruby
  Unknown file type: rake, defaulting to ruby
  Unknown file type: rake, defaulting to ruby
  Unknown file type: rake, defaulting to ruby
  undefined method `force_encoding' for #<Pathname:0x00007f9a353cb618>
  skipping /Users/ali/Documents/Code/GitHub/repo/mes-demarches/spec/models/s3_synchronization_spec.rb
bundler: failed to load command: pronto (/Users/ali/.rbenv/versions/2.7.1/bin/pronto)
Octokit::NotFound: POST https://api.github.com/repos/AliHoussein/mes-demarches/commits//comments: 404 - Not Found // See: https://docs.github.com/rest
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/octokit-4.21.0/lib/octokit/response/raise_error.rb:14:in `on_complete'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/faraday-1.7.0/lib/faraday/middleware.rb:19:in `block in call'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/faraday-1.7.0/lib/faraday/response.rb:59:in `on_complete'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/faraday-1.7.0/lib/faraday/middleware.rb:18:in `call'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/octokit-4.21.0/lib/octokit/middleware/follow_redirects.rb:73:in `perform_with_redirection'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/octokit-4.21.0/lib/octokit/middleware/follow_redirects.rb:61:in `call'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/faraday-1.7.0/lib/faraday/request/retry.rb:148:in `call'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/faraday-1.7.0/lib/faraday/rack_builder.rb:154:in `build_response'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/faraday-1.7.0/lib/faraday/connection.rb:496:in `run_request'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/faraday-1.7.0/lib/faraday/connection.rb:281:in `post'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sawyer-0.8.2/lib/sawyer/agent.rb:94:in `call'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/octokit-4.21.0/lib/octokit/connection.rb:156:in `request'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/octokit-4.21.0/lib/octokit/connection.rb:28:in `post'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/octokit-4.21.0/lib/octokit/client/commit_comments.rb:63:in `create_commit_comment'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/pronto-0.11.0/lib/pronto/github.rb:33:in `create_commit_comment'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/pronto-0.11.0/lib/pronto/github.rb:44:in `create_pull_comment'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/pronto-0.11.0/lib/pronto/formatter/pull_request_formatter.rb:11:in `block in submit_comments'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/pronto-0.11.0/lib/pronto/formatter/pull_request_formatter.rb:11:in `each'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/pronto-0.11.0/lib/pronto/formatter/pull_request_formatter.rb:11:in `submit_comments'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/pronto-0.11.0/lib/pronto/formatter/git_formatter.rb:9:in `format'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/pronto-0.11.0/lib/pronto.rb:69:in `block in run'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/pronto-0.11.0/lib/pronto.rb:68:in `each'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/pronto-0.11.0/lib/pronto.rb:68:in `run'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/pronto-0.11.0/lib/pronto/cli.rb:66:in `block in run'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/pronto-0.11.0/lib/pronto/cli.rb:64:in `chdir'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/pronto-0.11.0/lib/pronto/cli.rb:64:in `run'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/base.rb:485:in `start'
  /Users/ali/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/pronto-0.11.0/bin/pronto:6:in `<top (required)>'
  /Users/ali/.rbenv/versions/2.7.1/bin/pronto:23:in `load'
  /Users/ali/.rbenv/versions/2.7.1/bin/pronto:23:in `<top (required)>'

Gemfile contains

  gem 'pronto', '~> 0.11.0', require: false
  gem 'pronto-brakeman', '~> 0.11.0', require: false
  gem 'pronto-eslint', '~> 0.11.0', require: false
  gem 'pronto-flay', '~> 0.11.0', require: false
  gem 'pronto-haml', '~> 0.11.0', require: false
  gem 'pronto-jshint', '~> 0.11.0', require: false
  gem 'pronto-rails_best_practices', '~> 0.11.0', require: false
  gem 'pronto-reek', '~> 0.11.0', require: false

Couldn't find any documentation or clue online from what the issue could be. If anybody has some pointers.

@AliHoussein
Copy link
Author

I figured out the error was coming from pronto-eslint. The issue seemed to be identified on prontolabs/pronto-eslint#18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant