Skip to content

Commit 784de6a

Browse files
committed
fix(lib): use connection or developerConnection for maven project repo url instead of url
1 parent ec21629 commit 784de6a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/services/project.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const findProjectRepositoriesMaven = (): string[] => {
7979
.filter(Boolean)
8080
.flatMap((document) =>
8181
xpath.select(
82-
'string(//*[local-name()="project"]/*[local-name()="scm"]/*[local-name()="url"])',
82+
'string(//*[local-name()="project"]/*[local-name()="scm"]/*[local-name()="connection" or local-name()="developerConnection"][last()])',
8383
document!,
8484
true
8585
)
@@ -129,6 +129,7 @@ function findSetupPyFiles() {
129129

130130
function sanitizeRepositoryUrl(rawUrl: string) {
131131
return rawUrl
132+
.replace(/^scm:.*?:/gi, '') // remove maven scm prefix
132133
.replace('git+', '')
133134
.replace('git@', 'https://')
134135
.replace(/(?<!https?):/gi, '/');

0 commit comments

Comments
 (0)