Skip to main content

replaceGitLabUrlType()

Home > @backstage/integration > replaceGitLabUrlType

Takes a GitLab URL and replaces the type part (blob, tree etc).

Signature:

function replaceGitLabUrlType(url: string, type: 'blob' | 'tree' | 'edit'): string;

Parameters

Parameter

Type

Description

url

string

The original URL

type

'blob' | 'tree' | 'edit'

The desired type, e.g. 'blob', 'tree', 'edit'

**Returns:**

string