Add code coverage to the pipeline notification message for chat integrations
Problem to solve
Current pipeline notification message for chat integrations (e.g. Mattermost, Slack) does not include code coverage information.
Further details
If a team took the time to configure code coverage information for it's project, then it should be safe to assume that it's a relevant information for them.
With this assumption in mind, adding code coverage information to the pipeline notification message would increase the amount of useful information provided to the team through this channel.
Proposal
When code coverage information is available at the end of a pipeline, include that information in the notification message.
If code coverage information is not available at the end of a pipeline, leave the notification message as is.
Should ideally apply this change to all default chat integrations, to keep them in sync.
What does success look like, and how can we measure that?
(If no way to measure success, link to an issue that will implement a way to measure this)
Original description:
I'm trying to add the code coverage percentage to the success message of Slack webhook.
Unfortunately, I can't find the coverage value in any of the variables on slack_message.rb.
The build
object does have a build.coverage
index but it seems to be always nil
, even though the code coverage is set correctly on the build report.
Is there a way to access this value on this file?
By the way, it would be nice to have this information on the Slack message by default.
Thank you