The Samba wiki has a ‘Contribute’ page where they provide instructions for new users to get up and running with Samba development. As part of that process, the user is advised to make some adjustments to the CI configuration in their fork of the Samba GitLab repo.
Currently, that document contains “project settings” links to GitLab’s own documentation on CI/CD configuration, which talks the user through navigating into their repo preferences to reach the applicable configuration page.
That’s fine and all, and in the GitLab docs case makes sense as the instructions are generic for any of the user’s repos. But in the Samba case, we know specifically what repo the user needs to configure, they’ve already forked it, and I thought it would be helpful to link directly to the preferences themselves that the user needs to adjust.
IOW, I’d like a link that, when I click it, goes directly to e.g.
https://gitlab.com/ferdnyc/samba/-/settings/ci_cd#project_build_timeout_human_readable — but without needing my username in there.
For a generic reader viewing the Samba wiki, I know every part of that URL except the username. I know they have a user account, because if they’re following along with the instructions they’ve already forked the project repo. (We link directly to https://gitlab.com/samba-team/samba — handy, that! — so that all they have to do is follow it and hit the ‘Fork’ button.) But I have no way of knowing what their username is, to create similar links directly to their fork’s settings page(s).
(And for privacy reasons, I’d prefer not to have to know anyone’s username. It’s a can of worms if an external wiki has to worry about protecting any GitLab user personal information. Hard pass.)
So I’m curious if there’s any special URL or construct that can be used to represent “the user logged in to this browser’s current session”, such that a link to
https://gitlab.com/$SOMETHING/samba/-/settings/ci_cd is interpreted as if
ferdnyc when I click it, but a different user’s username when they click it? (Assuming there’s an active user session, of course.)
GitLab already has generic “current-user” URLs, in the form of the user profile interface. You, I, or any other logged in user’s personal “Edit profile” page is https://gitlab.com/-/profile — no username is required. No doubt this was done for exactly the same reasons: it’s handy to be able to point users directly to the settings page(s) for their own account without needing to know their username. I’m just looking to extend that same concept to per-repo configs.
Obviously in linking to a specific repo, there’s an implicit assumption that the account has a repo by that name. If it doesn’t, they’ll get a 404 page. But I don’t see that as a problem in this case.
The primary inspiration for this request are the MediaWiki standard redirects like Special:MyPage and
Special:MyTalk. By default, any MediaWiki installation will process an internal wikilink to
[[Special:MyTalk]] as representing the reader’s own userpage or user talk page, respectively. It’s incredibly useful when writing documentation and help content that involves the user space. Other pages like
[[Special:Preferences]] are, like
https://gitlab.com/-/profile, generic interfaces to the current user’s account data.
Any interface of this sort also owes a debt to Adobe’s Flash Player Preferences page. Which, as some may remember, was a page on the
adobe.com website where you’d go to configure their plugin. The page used a Flash embed to display the preferences interface for the browser’s local Flash Player plugin, allowing you to configure things like microphone/camera access, local storage permissions and size limits, etc.