@@ -479,11 +479,21 @@ const SCM_HOSTS = new Set([
479479 'codeberg.org' ,
480480 // Self-hosted GitLab / Gitea instances seen in Maven POMs with clean
481481 // /<owner>/<repo> paths (same shape as gitlab.com — handled by the generic logic).
482+ // Internal-only hosts (git.corp.adobe.com, gitlab.alibaba-inc.com) are excluded:
483+ // their links are unreachable for consumers. The ≥2-segment owner/repo requirement
484+ // acts as a safety net so a mis-classified host yields NULL, never a junk link.
482485 'gitlab.smartb.city' ,
483486 'gitlab.ow2.org' ,
484487 'gitlab.nuiton.org' ,
485488 'gitlab.inria.fr' ,
486489 'git.neckar.it' ,
490+ 'git.iem.at' ,
491+ 'git.oschina.net' ,
492+ 'git.i-novus.ru' ,
493+ 'gitlab.protontech.ch' ,
494+ 'git.catchpoint.net' ,
495+ 'git.dorkbox.com' ,
496+ 'git.adorsys.de' ,
487497] )
488498
489499/** Hosts whose owner/repo path is case-insensitive and should be lower-cased. */
@@ -529,13 +539,14 @@ export function normalizeScmUrl(raw: string | null): string | null {
529539 // ssh://git@host /… → https://host/…
530540 s = s . replace ( / ^ s s h : \/ \/ g i t @ ( [ ^ / ] + ) \/ / , 'https://$1/' )
531541
542+ // git:// → https://, and upgrade http:// → https:// — done before the SCP-colon
543+ // rule below so that git://host:owner/repo is normalised too.
544+ s = s . replace ( / ^ g i t : \/ \/ / , 'https://' ) . replace ( / ^ h t t p : \/ \/ / , 'https://' )
545+
532546 // scheme://host:owner/repo → scheme://host/owner/repo — the colon is an SCP path
533547 // separator, not a port (guarded by \D so real numeric ports are left intact).
534548 s = s . replace ( / ^ ( h t t p s ? ) : \/ \/ ( [ ^ : / ] + ) : (? = \D ) / , '$1://$2/' )
535549
536- // git:// → https://, and upgrade http:// → https://
537- s = s . replace ( / ^ g i t : \/ \/ / , 'https://' ) . replace ( / ^ h t t p : \/ \/ / , 'https://' )
538-
539550 // No scheme at all (e.g. "github.com/owner/repo") → assume https
540551 if ( ! s . includes ( '://' ) ) {
541552 // Bare SCP form "host:owner/repo" → "host/owner/repo" before assuming https.
0 commit comments