cobertura-action icon indicating copy to clipboard operation
cobertura-action copied to clipboard

Validation failed - Body is too long (maximum is 65536 characters)

Open milkshakeuk opened this issue 4 years ago • 5 comments

Hi,

When using this action, I get a validation failed error message:

Run 5monkeys/cobertura-action@master
  with:
    path: **/Cobertura.xml
    repo_token: ***
    pull_request_number: 145
    minimum_coverage: 0
    skip_covered: true
    show_line: false
    show_branch: false
    show_class_names: false
    show_missing: false
    only_changed_files: false
Error: Validation Failed: {"resource":"IssueComment","code":"unprocessable","field":"data","message":"Body is too long (maximum is 65536 characters)"}

https://github.com/nHapiNET/nHapi/actions/runs/566542886

What am I doing wrong? or is there a way around this?

milkshakeuk avatar Feb 15 '21 08:02 milkshakeuk

Don't use this action if your file is big. the comment is based on github api and it has limitation of 65536 chars on json body use reportgenerator instead, though it's slow under linux

chenghuang-mdsol avatar Feb 19 '21 11:02 chenghuang-mdsol

Okay makes sense, it might be nice to add a feature to give a simple result such as overall coverage and or coverage per project. Thank you for responding!

milkshakeuk avatar Feb 19 '21 13:02 milkshakeuk

Hi, i'm facing the same issue as well. Is there any workaround or upgrading features to allow large chars? Thanks!

syamimikhalil avatar Oct 26 '22 05:10 syamimikhalil

Also running into this issue. In our case we only want to fail the check if the coverage for updated code falls below the threshold, a PR comment is just a nice bonus. Would be nice to be able to disable it, that way we could still use this action.

ReportGenerator and similar actions don't seem to support coverage on changed code only.

tibbing avatar Jan 03 '23 16:01 tibbing

Isnt it a bug here: https://github.com/5monkeys/cobertura-action/issues/76#issuecomment-1373612150

rjulius23 avatar Jan 06 '23 13:01 rjulius23