replaceGithubUrlType()
Home > @backstage/integration
> replaceGithubUrlType
Takes a GitHub URL and replaces the type part (blob, tree etc).
Signature:
function replaceGithubUrlType(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" |
string