Do not show bot docs link in popover if website_url is missing

What does this MR do and why?

This MR fixes an issue with the user popup for bots, which shows a "Learn more about " link even when the bot has no website_url (and therefore the link does not point to anything).

Screenshots or screen recordings

Before this change, notice how the markup for the "Learn more about " link has an empty href:

Screen_Shot_2022-02-20_at_1.23.12_PM Screen_Shot_2022-02-20_at_1.23.28_PM

How to set up and validate locally

  1. Visit an Issue or MR where a bot commented something (make sure that user.bot? returns true for the bot user). One example on GitLab MRs is the comments from the Danger Bot

  2. Hover on the bot username in the comment

  3. The popover will appear. It used to always contain a "Learn more about " link to the website_url, now it should only show it if website_url is actually set.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Magdalena Frankiewicz

Merge request reports

Loading