Skip to content
Snippets Groups Projects
Unverified Commit 1dad5645 authored by Sergei Zharinov's avatar Sergei Zharinov Committed by GitHub
Browse files

chore(bazel): Log non-https URLs for `git_repository` (#20467)

parent 91822a60
No related merge requests found
import parseGithubUrl from 'github-url-from-git';
import { z } from 'zod';
import { logger } from '../../../../logger';
import { regEx } from '../../../../util/regex';
import { GithubReleasesDatasource } from '../../../datasource/github-releases';
import type { PackageDependency } from '../../types';
......@@ -9,6 +10,10 @@ const githubUrlRegex = regEx(
);
function githubPackageName(input: string): string | undefined {
// istanbul ignore if
if (!input.startsWith('https://')) {
logger.once.info({ url: input }, `Bazel: non-https git_repository URL`);
}
return parseGithubUrl(input)?.match(githubUrlRegex)?.groups?.packageName;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment