Add ability to see code coverage badge on any branch
Problem to solve
As a developer working on a long working branch (say feature branch), I want to be able quickly see the latest coverage value for the branch, so I can see how it compares to master.
Currently, the test coverage badge can be hardcoded for the branch you'd like to display the coverage for but switching between it to compare coverage is slow or involves digging through pipelines.
Customer ticket requesting this feature --> https://gitlab.zendesk.com/agent/tickets/113248 (internal use only)
Delaney, Development Team Lead, https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas#delaney-development-team-lead
Sasha, Software Developer, https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas#sasha-software-developer
Development teams often work on long lived branches like release or feature branches. There is a summary view of a branch similar to the project summary view that can contain badges including the coverage badge.
This would allow compliance teams / quality teams / managers to see how the coverage metric is progressing along with development so there are no late iteration surprises that force the team to cut features to add code coverage OR delay a release.
When a user is viewing the summary page for a branch, they should see the latest code coverage value for that branch and the default branch, so that they can judge how far apart those values are to adjust the team's focus.
This may be expanded to any badge the customer has setup to appear referencing the current branch vs. default.
From the customer:
a badge link that specifies the current branch and job should return the coverage value (I can see it on the job in the build for that branch so the value should be available somehow)
This would allow the customer to set one URL in the README for the test coverage badge, and be able to see the test coverage of the specific branch they are on, rather than just one branch.
Permissions and Security
No specific permissions for the test coverage badge are noted in the documentation.
What does success look like, and how can we measure that?
Users who navigate to a pipeline summary page for a pipeline that generated a parsed coverage report will see a badge with coverage.