mirror of
https://github.com/renovatebot/renovate.git
synced 2024-12-22 13:38:32 +00:00
be837b6306
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>
14 lines
380 B
TypeScript
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;
|
|
}
|