Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Badge Display Issue with Branch Names Containing URL-Unsafe Characters #32

Closed
3 tasks done
Bolero-fk opened this issue Nov 7, 2023 · 2 comments · Fixed by #33
Closed
3 tasks done

[Bug]: Badge Display Issue with Branch Names Containing URL-Unsafe Characters #32

Bolero-fk opened this issue Nov 7, 2023 · 2 comments · Fixed by #33
Assignees
Labels
bug Something isn't working

Comments

@Bolero-fk
Copy link

What happened?

The issue arises when a branch name includes URL-unsafe characters, such as the hashtag (#). In these cases, the badge fails to display properly.

Steps to Reproduce:

  1. Create or use a branch with a name that contains a URL-unsafe character (e.g., AddNewFeature#1).
  2. Run the coverage-action workflow
  3. Observe that the generated badges do not appear in the pull request comments as expected.

image

Additional Information:
I was able to display the badge correctly by manually changing the URL to encode the '#' character. For example, changing the URL from this:
![badge](<RepositoryName>/_xml_coverage_reports/data/AddNewFeature#1/badge.svg)
To this:
![badge](<RepositoryName>/_xml_coverage_reports/data/AddNewFeature%231/badge.svg)
This modification allowed the badge to be displayed as intended.

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.
@Bolero-fk Bolero-fk added the bug Something isn't working label Nov 7, 2023
@cicdguy
Copy link
Contributor

cicdguy commented Nov 7, 2023

Thanks for the detailed report. We're looking into a fix for this. Will notify you when it's been released.

cicdguy added a commit that referenced this issue Nov 7, 2023
URL encode branch names.
Fixes #32
@cicdguy
Copy link
Contributor

cicdguy commented Nov 7, 2023

This should be fixed now @Bolero-fk
Related release: https://github.com/insightsengineering/coverage-action/releases/tag/v2.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants