0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-12-22 13:38:32 +00:00
renovatebot_renovate/lib/modules/manager/sveltos/util.ts
Oliver Bähler be837b6306
feat(manager): add sveltos manager (#30087)
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-10-15 09:55:46 +00:00

14 lines
380 B
TypeScript

import { regEx } from '../../../util/regex';
export function removeRepositoryName(
repositoryName: string,
chartName: string,
): string {
const repoNameWithSlash = regEx(`^${repositoryName}/`, undefined, false);
let modifiedChartName = chartName.replace(repoNameWithSlash, '');
modifiedChartName = modifiedChartName.replace(/\/+$/, '');
return modifiedChartName;
}