Danger: Danger fails when new commits are pushed to an already commented merge request.

Created on 16 Dec 2020  路  4Comments  路  Source: danger/danger

Report

What did you do?

I have Danger running on a BitRise workflow, every time a pull request is made, it commented inline about linting issues.
I pushed a new commit with changes to resolve those commented issues.

What did you expect to happen?

Expected danger to check the merge request with the new commits, and add new inline comments if new issues were found.

What happened instead?

pipeline failed because of danger exit code 1

WARNING:
Please convert ObjectifiedHash object to hash before calling Hash methods on it.
WARNING: Please convert ObjectifiedHash object to hash before calling Hash methods on it.
WARNING: Please convert ObjectifiedHash object to hash before calling Hash methods on it.
WARNING: Please convert ObjectifiedHash object to hash before calling Hash methods on it.
WARNING: Please convert ObjectifiedHash object to hash before calling Hash methods on it.
WARNING: Please convert ObjectifiedHash object to hash before calling Hash methods on it.
WARNING: Please convert ObjectifiedHash object to hash before calling Hash methods on it.
WARNING: Please convert ObjectifiedHash object to hash before calling Hash methods on it.
WARNING: Please convert ObjectifiedHash object to hash before calling Hash methods on it.
WARNING: Please convert ObjectifiedHash object to hash before calling Hash methods on it.
bundler: failed to load command: danger (/usr/local/bin/danger)
/usr/local/lib/ruby/gems/2.7.0/gems/danger-8.2.1/lib/danger/request_sources/gitlab.rb:366:in hash': no implicit conversion of Hash into Integer (TypeError) from /usr/local/lib/ruby/gems/2.7.0/gems/danger-8.2.1/lib/danger/request_sources/gitlab.rb:366:in-'
from /usr/local/lib/ruby/gems/2.7.0/gems/danger-8.2.1/lib/danger/request_sources/gitlab.rb:366:in submit_inline_comments!' from /usr/local/lib/ruby/gems/2.7.0/gems/danger-8.2.1/lib/danger/request_sources/gitlab.rb:209:inupdate_pull_request_with_inline_comments!'
from /usr/local/lib/ruby/gems/2.7.0/gems/danger-8.2.1/lib/danger/request_sources/gitlab.rb:174:in update_pull_request!' from /usr/local/lib/ruby/gems/2.7.0/gems/danger-8.2.1/lib/danger/danger_core/dangerfile.rb:260:inpost_results'
from /usr/local/lib/ruby/gems/2.7.0/gems/danger-8.2.1/lib/danger/danger_core/dangerfile.rb:288:in run' from /usr/local/lib/ruby/gems/2.7.0/gems/danger-8.2.1/lib/danger/danger_core/executor.rb:29:inrun'
from /usr/local/lib/ruby/gems/2.7.0/gems/danger-8.2.1/lib/danger/commands/runner.rb:73:in run' from /usr/local/lib/ruby/gems/2.7.0/gems/claide-1.0.3/lib/claide/command.rb:334:inrun'
from /usr/local/lib/ruby/gems/2.7.0/gems/danger-8.2.1/bin/danger:5:in <top (required)>' from /usr/local/bin/danger:23:inload'
from /usr/local/bin/danger:23:in <top (required)>' from /usr/local/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:63:inload'
from /usr/local/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:63:in kernel_load' from /usr/local/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:28:inrun'
from /usr/local/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:497:in exec' from /usr/local/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:inrun'
from /usr/local/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' from /usr/local/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:392:indispatch'
from /usr/local/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:30:in dispatch' from /usr/local/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:485:instart'
from /usr/local/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:24:in start' from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.0/exe/bundle:49:inblock in from /usr/local/lib/ruby/site_ruby/2.7.0/bundler/friendly_errors.rb:130:in with_friendly_errors' from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.0/exe/bundle:37:in from /usr/local/bin/bundle:23:in load' from /usr/local/bin/bundle:23:in

'

Your Environment

  • Which CI are you running on?
    Bitrise
  • Are you running the latest version of Danger?
    Yes:
    danger (8.2.1)
    danger-gitlab (8.0.0)
  • What is your Dangerfile?

    # Warn when there is a big PR
    warn("Big PR") if git.lines_of_code > 500
    
    #only have messages posted within the diff of the current PR
    gitlab.dismiss_out_of_range_messages
    
    # ktlint
    checkstyle_format.base_path = Dir.pwd
    checkstyle_format.report "/bitrise/src/build/reports/ktlint/ktlint-report.xml"
    
    # AndroidLint
    android_lint.report_file = "/bitrise/src/build/reports/lint/lint-report.xml"
    android_lint.skip_gradle_task = true
    android_lint.severity = "Error"
    android_lint.filtering = true
    android_lint.lint(inline_mode: true)
    
    

Most helpful comment

I'd look into what's going on with this line:hash': no implicit conversion of Hash into Integer (TypeError) from /usr/local/lib/ruby/gems/2.7.0/gems/danger-8.2.1/lib/danger/request_sources/gitlab.rb:366:in

Somewhere in gitlab it thinks its handling a dictionary but has an integer

All 4 comments

I'd look into what's going on with this line:hash': no implicit conversion of Hash into Integer (TypeError) from /usr/local/lib/ruby/gems/2.7.0/gems/danger-8.2.1/lib/danger/request_sources/gitlab.rb:366:in

Somewhere in gitlab it thinks its handling a dictionary but has an integer

I have the same problem

@orta sorry but have you checked?

Nope, I don't plan on it, you're welcome to look 馃憤馃徎

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dzenbot picture dzenbot  路  7Comments

kylejm picture kylejm  路  4Comments

JuanitoFatas picture JuanitoFatas  路  6Comments

epologee picture epologee  路  4Comments

brettha picture brettha  路  9Comments