Skip to content

"Mastodon link improvements on user profile page"

What does this MR do and why?

Relates to #433391 (closed)

Part 1: Verification

Allows a gitlab user to verify their Mastodon profile, via the rel="me" attribute on their Mastodon handle <a> tag in their respective Gitlab profiles.

Checklist

  • Update Mastodon RelMe verification code branch
  • Update relevant documentation
  • Update MR readme with video of reproduced issue behaviour
  • Frontend review
  • Tag a technical writer to review doc changes
  • Backend review
  • Add to merge train
  • Test verification on staging.gitlab.com & update readme accordingly

Reproduction Of The Issue

Before (.com) After Fix (staging-ref)
vid1 vid2

Part 2: Url Generation

Moved to this MR

Updates the URL generation logic to handle Mastodon usernames. The current URL generation does not correctly handle Mastodon usernames with non-standard top level domains, resulting in broken links.

The second is perhaps more complicated. My Mastodon username is @krejcar25@blep.cz even if we use the social.blep.cz for the actual Mastodon instance. This is done as described in the docs. However GitLab does not check for this. When I set the Mastodon field in GitLab to @krejcar25@blep.cz as I should, the link created is to https://blep.cz/@krejcar25. This of course does not work.
The address https://blep.cz/.well-known/webfinger should be checked, which redirects to the correct address of https://social.blep.cz/.well-known/webfinger. This address should then be used for the link in displayed Profile.

How to set up and validate

Part 1: Verification

  • Create a gitlab & mastodon account
  • Follow the after video above for a visual guide on how to validate
  • Open https://staging-ref.gitlab.com/<gitlab_username>
  • Paste and save your mastodon handle in your gitlab profile
  • Click on the hyperlinked mastodon handle on your gitlab.com/<username> page
  • Copy the uri of the interstitial page & paste it in the "extra fields" section of mastodon user's edit profile page
  • Save changes and you should see a green checkmark next to the your Gitlab site's extra field in mastodon.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Hakeem Abdul-Razak

Merge request reports

Loading