gitlabClientfunctionfunction gitlabClient(options: GitlabOptions): GitHostClientA GitLab client over a transport: the common four capabilities, protected branches, issues and merge requests, and groups to any depth.
GitLab behind the one interface (commons 0001-githost FR-001 to FR-006): REST API v4 over the runtime's Transport, gitlab.com or a self-managed host, public and private projects, groups to any depth (a project is addressed by its whole path, URL-encoded), issues, merge requests, protected branches and whether a commit's signature is verified.
The token is given once to gitlabClient and lives only in the closure that builds the request headers (PRIVATE-TOKEN for a personal or project access token, JOB-TOKEN for a CI job's token): it is in no result, no failure and no property of the client, and it is sent only to the one host the client serves. A private project asked for with no token is answered not-found, as GitLab says; with a token that may not read it, unauthorized. On GitLab, requiresReview of a protected branch means that changes enter only by a merge request (no one may push) or that a code owner must approve, which is what the branch rule alone tells; the approval rules of a merge request are another endpoint of a paid plan.
gitlabClientfunctionfunction gitlabClient(options: GitlabOptions): GitHostClientA GitLab client over a transport: the common four capabilities, protected branches, issues and merge requests, and groups to any depth.
GitlabOptionstypeno test imports ittype GitlabOptions = {
/** How requests are sent: the live transport, or a recorded one. */
readonly transport: Tran… (631 characters)type GitlabOptions = {
/** How requests are sent: the live transport, or a recorded one. */
readonly transport: Transport;
/** The host's address without the API path (`https://gitlab.com` by default); its host name is the one host this client serves. */
readonly baseUrl?: string;
/** A token, from the environment by the caller; never stored in a file and never in a result. Absent: only what is public. */
readonly token?: string | undefined;
/** What the token is: a personal or project access token (`PRIVATE-TOKEN`, the default), or a CI job's token (`JOB-TOKEN`). */
readonly tokenKind?: "access" | "job";
};How a GitLab client is made.