Skip to content

Commit 991b6aa

Browse files
fix indent
1 parent 9990423 commit 991b6aa

File tree

1 file changed

+30
-31
lines changed

1 file changed

+30
-31
lines changed

adapters/integrations/gitlab-integration.js

+30-31
Original file line numberDiff line numberDiff line change
@@ -784,23 +784,22 @@ ${content}`;
784784
const startMatch = fileContents.match(startRegex);
785785
let configSection = ''
786786
if (startMatch) {
787-
const startIndex = startMatch.index;
788-
const openParensIndex = fileContents.indexOf('(', startIndex) + 1;
789-
let openParensCount = 1;
790-
let endIndex = openParensIndex;
791-
792-
while (openParensCount > 0 && endIndex < fileContents.length) {
793-
const char = fileContents[endIndex];
794-
795-
if (char === '(') {
796-
openParensCount++;
797-
} else if (char === ')') {
798-
openParensCount--;
799-
}
800-
801-
endIndex++;
787+
const startIndex = startMatch.index;
788+
const openParensIndex = fileContents.indexOf('(', startIndex) + 1;
789+
let openParensCount = 1;
790+
let endIndex = openParensIndex;
791+
792+
while (openParensCount > 0 && endIndex < fileContents.length) {
793+
const char = fileContents[endIndex];
794+
795+
if (char === '(') {
796+
openParensCount++;
797+
} else if (char === ')') {
798+
openParensCount--;
802799
}
803-
800+
endIndex++;
801+
}
802+
804803
const endMarker = '}}';
805804
const finalEndIndex = fileContents.indexOf(endMarker, endIndex) + endMarker.length;
806805

@@ -813,21 +812,21 @@ ${content}`;
813812
);
814813

815814
if (configSection){
816-
logger.withInfo(
817-
"Executing final regex",
818-
integrationName,
819-
CI_COMMIT_SHA,
820-
"getAssetName"
821-
);
822-
823-
var matches = regExp.exec(configSection);
824-
825-
logger.withInfo(
826-
"Successfully executed regex matching",
827-
integrationName,
828-
CI_COMMIT_SHA,
829-
"getAssetName"
830-
);
815+
logger.withInfo(
816+
"Executing final regex",
817+
integrationName,
818+
CI_COMMIT_SHA,
819+
"getAssetName"
820+
);
821+
822+
var matches = regExp.exec(configSection);
823+
824+
logger.withInfo(
825+
"Successfully executed regex matching",
826+
integrationName,
827+
CI_COMMIT_SHA,
828+
"getAssetName"
829+
);
831830

832831
}
833832
if (matches) {

0 commit comments

Comments
 (0)