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

Pronto is failing to post reviews to github pull request #284

Open
skatkov opened this issue Feb 15, 2018 · 1 comment
Open

Pronto is failing to post reviews to github pull request #284

skatkov opened this issue Feb 15, 2018 · 1 comment

Comments

@skatkov
Copy link

skatkov commented Feb 15, 2018

Using CirlcleCI with github.

Here is my Gemfile.tools

source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end

gem 'pronto'
gem 'oj'
gem 'pronto-rubocop', require: false
gem 'pronto-eslint', require: false
gem 'pronto-flay', require: false
gem 'pronto-brakeman', require: false
gem 'pronto-rails_schema', require: false
gem 'pronto-reek', require: false
gem 'pronto-fasterer', require: false
gem 'pronto-simplecov', require: false
gem 'pronto-rails_best_practices', require: false
gem 'danger'

And my config.yml (using CircleCI):

jobs:
  lint:
    environment:
      - BUNDLE_GEMFILE: Gemfile.tools
    docker:
      # specify the version you desire here
      - image: circleci/ruby:2.4.2-stretch-node-browsers
        environment:
          RAILS_ENV: test
          RACK_ENV: test

    working_directory: ~/repo

    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-tools-dependencies-{{ checksum "Gemfile.tools" }}
          # fallback to using the latest cache if no exact match is found
          - v1-tools-dependencies-

      - run:
          name: install cmake
          command: |
            sudo apt-get install cmake

      - run:
          name: install dependencies
          command: |
            bundle check --path vendor/bundle || bundle install --jobs=4 --retry=3 --path vendor/bundle

      - save_cache:
          paths:
            - ./vendor/bundle
          key: v1-tools-dependencies-{{ checksum "Gemfile.tools.lock" }}


      - run:
          name: Danger code review
          command: |
            bundle exec danger

      - run:
          name: Pronto code analysis
          command: |
            bundle exec pronto run -c origin/master -f github_status -f github_pr_review --exit-code
      - store_artifacts:
          path: ./tmp

I'm from time to time run into this issue, then pronto fails to post review:

Failed to post: POST https://api.github.com/repos/skatkov/amzstore/pulls/258/reviews: 422 - Invalid request.

For 'properties/position', nil is not a number. // See: https://developer.github.com/v3/pulls/reviews/#create-a-pull-request-review
1 Pronto messages posted to GitHub

I've SSH'ed into machine, but my tmp/ folder for project is missing.
I tried to reproduce locally by running bundle exec pronto run --staged and couldn't reproduce

I'm a bit lost trying to understand reason for such failure. I would greatly appreciate, if anyone could advice me how to better understand what is the problem?

@nbekirov
Copy link
Contributor

Maybe this is related to #149.
There are also some debugging suggestions in the comments that might be helpful.

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

2 participants