Add ability to set coverage badge to current branch
Problem to solve
Currently, the test coverage badge can be hardcoded for the branch you'd like to display the coverage for. This feature proposal is to allow a placeholder for the current branch to be used instead of hardcoding the branch. This will allow the coverage report badge to display for the branch that you're currently on.
It would work similar to the project badge placeholders:
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
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.
Add support for a placeholder for the current branch in the URL for the coverage badge.
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 can set a test coverage badge URL with a placeholder for the current branch. This will allow them to see the coverage of the branch they are currently on.
Links / references