How to get codecov.io to post coverage reports to bitbucket pull request comments

1.2k Views Asked by At

I am trying out using codecov.io with BitRise and BitBucket. I am able to get code coverage reports from my pull requests posted to CodeCov.io, but not to the bitbucket pull request comments.

I have added a codecov.yaml file to the repo, which looks like this:

 comment:
  layout: "reach, diff, flags, files"
  behavior: default
  require_changes: false  # if true: only post the comment if coverage changes
  require_base: no        # [yes :: must have a base report to post]
  require_head: no       # [yes :: must have a head report to post]
  branches: null

And I have also set up a new bitbucket user with write access to the repo, that I have also logged into codecov.io with, and I have set this user as the 'codecov bot' by editing the Team.yaml file as follows:

codecov:
    bot: codecovbot

Is there anything else I need to do to get this working?

1

There are 1 best solutions below

0
On

You can add yml setting in your codecov.io account:

codecov:
    bot: codecovbot

coverage:
    status:
        project:
            default: off
        patch:
            default: off

comment:
  layout: "diff, flags, files"
  behavior: default
  require_changes: false  # if true: only post the comment if coverage changes
  require_base: no        # [yes :: must have a base report to post]
  require_head: yes       # [yes :: must have a head report to post]
  branches: null