File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,9 @@ describe('modules/manager/terraform/extractors/others/modules', () => {
148148 const subfolderWithDoubleSlash = bitbucketRefMatchRegex . exec (
149149 'bitbucket.org/hashicorp/example.git//terraform?ref=v1.0.0' ,
150150 ) ?. groups ;
151+ const subfolderWithGitInName = bitbucketRefMatchRegex . exec (
152+ 'bitbucket.org/hashicorp/example.git//terraform-git?ref=v1.0.0' ,
153+ ) ?. groups ;
151154 const depth = bitbucketRefMatchRegex . exec (
152155 'git::https://git@bitbucket.org/hashicorp/example.git?depth=1&ref=v1.0.0' ,
153156 ) ?. groups ;
@@ -180,6 +183,11 @@ describe('modules/manager/terraform/extractors/others/modules', () => {
180183 project : 'example' ,
181184 tag : 'v1.0.0' ,
182185 } ) ;
186+ expect ( subfolderWithGitInName ) . toMatchObject ( {
187+ workspace : 'hashicorp' ,
188+ project : 'example' ,
189+ tag : 'v1.0.0' ,
190+ } ) ;
183191 expect ( depth ) . toMatchObject ( {
184192 workspace : 'hashicorp' ,
185193 project : 'example' ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export const githubRefMatchRegex = regEx(
1313 / g i t h u b \. c o m ( [ / : ] ) (?< project > [ ^ / ] + \/ [ a - z 0 - 9 - _ .] + ) .* \? ( d e p t h = \d + & ) ? r e f = (?< tag > .* ?) ( & d e p t h = \d + ) ? $ / i,
1414) ;
1515export const bitbucketRefMatchRegex = regEx (
16- / (?: g i t : : ) ? (?< url > (?: h t t p | h t t p s | s s h ) ? (?: : \/ \/ ) ? (?: .* @ ) ? (?< path > b i t b u c k e t \. o r g \/ (?< workspace > .* ) \/ (?< project > .* ) .g i t \/ ? (?< subfolder > .* ) ) ) \? ( d e p t h = \d + & ) ? r e f = (?< tag > .* ?) ( & d e p t h = \d + ) ? $ / ,
16+ / (?: g i t : : ) ? (?< url > (?: h t t p | h t t p s | s s h ) ? (?: : \/ \/ ) ? (?: .* @ ) ? (?< path > b i t b u c k e t \. o r g \/ (?< workspace > .* ) \/ (?< project > .* ) \ .g i t \/ ? (?< subfolder > .* ) ) ) \? ( d e p t h = \d + & ) ? r e f = (?< tag > .* ?) ( & d e p t h = \d + ) ? $ / ,
1717) ;
1818export const gitTagsRefMatchRegex = regEx (
1919 / (?: g i t : : ) ? (?< url > (?: (?: h t t p | h t t p s | s s h ) : \/ \/ ) ? (?: .* @ ) ? (?< path > .* \/ (?< project > .* \/ .* ) ) ) \? ( d e p t h = \d + & ) ? r e f = (?< tag > .* ?) ( & d e p t h = \d + ) ? $ / ,
You can’t perform that action at this time.
0 commit comments