Skip to main content

git_username

Function git_username 

Source
pub fn git_username(
    kind: IntegrationKind,
    account: &str,
    login: &str,
) -> Option<String>
Expand description

The user name git’s HTTPS transport sends together with token for kind, or None for a kind that is not a code host (issue trackers, a folder of notes). Pure, so every host is a table-test row.

KindUser name
github, github enterprisex-access-token
gitlab*oauth2
bitbucket cloudthe account, or x-token-auth for an access token (no account)
bitbucket data centerthe account, else the login
azure devops*any non-empty name: the account, else the login, else gitpoulpi
gitea, forgejothe login, else the account
gerritthe account (HTTP password auth), else the login

account is the profile’s configured account, login the one the host reported on the last check. A profile’s own username overrides this.