Validate repository URLs don't end with .git

This commit is contained in:
2026-04-17 03:45:58 +10:00
parent 8851f0f957
commit 7b5ff0c233

View File

@@ -213,6 +213,11 @@ for (const file of changedFiles) {
if (plugin.repository) {
try {
new URL(plugin.repository);
// Repository URL should not end with .git
if (plugin.repository.endsWith('.git')) {
errors.push(`${file}: Repository URL should not end with .git: ${plugin.repository}`);
}
} catch {
errors.push(`${file}: Invalid repository URL: ${plugin.repository}`);
}