mirror of
https://github.com/renovatebot/renovate.git
synced 2024-12-22 21:48:32 +00:00
13 lines
440 B
TypeScript
13 lines
440 B
TypeScript
import { regEx } from '../../../util/regex';
|
|
|
|
const githubRepoPattern = regEx(/^https?:\/\/github\.com\/[^/]+\/[^/]+$/);
|
|
|
|
export function isGitHubRepo(url: string): boolean {
|
|
return !url.includes('sponsors') && githubRepoPattern.test(url);
|
|
}
|
|
|
|
// https://packaging.python.org/en/latest/specifications/name-normalization/
|
|
export function normalizePythonDepName(name: string): string {
|
|
return name.replace(/[-_.]+/g, '-').toLowerCase();
|
|
}
|