Notice about delayed notifications
Codecov delays notifications to make sure all reports are uploaded. Learn more at Merging Reports.
Customization of pull request comments?
If you are looking to customize your
comments, including turning them
off, please see Pull Request Comments
Below is a basic configuration for adding a Slack notification.
coverage notify slack url"https://hooks.slack.com/services/abc/123" threshold1% only_pullsfalse branchesnull flagsnull pathsnull
- Navigate to https://slack.com/apps.
- Search for
incoming webhookand click on the Incoming WebHooks result.
- Click Add Configuration.
- Follow the instructions to select a room and click Add Incoming Webhooks Integration.
- Copy the Webhook URL into your yaml.
Here is demonstrated the basic configuration for adding a Gitter notification.
coverage notify gitter url"https://webhooks.gitter.im/e/9d1957r0a481787c756z" threshold1% only_pullsfalse branchesnull flagsnull pathsnull
- Navigate to your room in Gitter. ex. https://gitter.im/codecov/support.
- Click Room Settings icon (top-right corner).
- Click Integrations from the dropdown.
- Click on Codecov from the integration list.
- Copy the webhook url into your yaml.
Below is the basic configuration for adding a Hipchat notification.
coverage notify hipchat url"" threshold1% only_pullsfalse branchesnull flagsnull pathsnull
- Login to your HipChat home:
- Click Rooms tab.
- Select the room you wish to post the notification to.
- Click the Tokens tab.
- Create a new token with Send Notification permission. Label it Codecov.
- Copy the token into this url, as seen below.
coverage notify hipchat # replace ROOM_ID_OR_NAME and ROOM_TOKEN below url"https://api.hipchat.com/v2/room/ROOM_ID_OR_NAME/notification?auth_token=ROOM_TOKEN" only_pullsfalse branchesnull flagsnull pathsnull
All Codecov notifications can be customized. The advanced configuration shown below can be applied to any of the notifications services.
You may create additional notifications that post to different channels with different coverage metrics.
coverage notify slack frontui url"https://hooks.slack.com/services/T04KHQ16W/B225J94BG" flags frontend ui backunit url"https://hooks.slack.com/services/T04KHQ16W/B225J94BG" threshold2% # allow coverage to drop by 2% without posting a notification flags backend
Notice how we added two unique notifications. Each of them are measuring different reports based on Flags.
You may want to prevent any notifications until after a known number of builds. In this case, the Codecov YAML allows you to set notification parameters as follows:
codecov notify after_n_builds5 # do not notify until at least 5 builds have been uploaded from the CI pipeline
In this YAML, at least 5 builds would need to be received before Codecov would push a notification.