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

PR decoration links to icon SVG #662

Closed
marcelstoer opened this issue Aug 24, 2022 · 5 comments · Fixed by #792
Closed

PR decoration links to icon SVG #662

marcelstoer opened this issue Aug 24, 2022 · 5 comments · Fixed by #792
Labels
bug Something isn't working

Comments

@marcelstoer
Copy link
Contributor

Describe the bug
The (GitLab) PR decoration comment has each analysis icon wrapped with a hyperlink that points to the icon SVG.

I see how the list items are created at https://github.com/mc1arke/sonarqube-community-branch-plugin/blob/release/1_8/src/main/java/com/github/mc1arke/sonarqube/plugin/ce/pullrequest/AnalysisDetails.java#L224-L236. However, I don't understand yet how the image ends up being wrapped by a link. MarkdownFormatterFactory and friends don't smuggle in elements, do they?

Expected behavior
Not sure...either no link at all or a link to respective metric e.g. https://my.sonar/component_measures?id=some-id&metric=new_coverage&pullRequest=42&view=list

Screenshots
Screen Shot 2022-08-24 at 16 59 55

Software Versions

  • SonarQube Version: 8.9.6
  • Plugin Version: 1.8 something
@marcelstoer marcelstoer added the bug Something isn't working label Aug 24, 2022
@mc1arke
Copy link
Owner

mc1arke commented Aug 24, 2022

This isn't the plugin, it's a 'feature' of Gitlab to allow you to see the image directly. We don't set a link, and don't have control over Gitlab adding one.

@mc1arke mc1arke closed this as completed Aug 24, 2022
@marcelstoer
Copy link
Contributor Author

Thanks for the clarification. I'm relieved I didn't miss anything obvious in my analysis.

Am I right in assuming that if I were to only wrap each image list item in AnalysisDetails (as proposed in "Expected behavior") the serialized Markdown would represent what I expected?

@mc1arke
Copy link
Owner

mc1arke commented Aug 25, 2022

I'm not sure how Gitlab would handle you wrapping the list item contents with a link. I suspect it you still wrap the image in a link and leave the rest of the content wrapped in your link

@marcelstoer
Copy link
Contributor Author

Arggg, sorry 🙇 . Instead of the bogus "image list item" I had meant to say "list item image". Of course, it makes more sense to wrap the icon rather than the entire list item.

@marcelstoer
Copy link
Contributor Author

marcelstoer commented Jul 27, 2023

I am just revisiting this as the behavior keeps annoying me enough to want to provide a PR. Can you please reopen it.

I just did some experimenting with your latest version and our local GitLab installation. Should actually be very easy to fix.

-> gives you a proper Markdown link around the icon in the form of - [![Bug](bugImageUrl)](SQ-MR-bug-URL) 911 Bugs
-> GitLab won't render its own HTML link around the icon but use the one from the Markdown

marcelstoer added a commit to marcelstoer/sonarqube-community-branch-plugin that referenced this issue Aug 3, 2023
This adds deep links to the three issue types Bugs, Vulnerabilities, and Code Smells.
Furthermore, it adds deep links to Coverage and Duplications.

Fixes mc1arke#662
mc1arke pushed a commit that referenced this issue Sep 16, 2023
This adds deep links to the three issue types Bugs, Vulnerabilities, and Code Smells.
Furthermore, it adds deep links to Coverage and Duplications.

Fixes #662
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.

2 participants