Skip to content

Commit

Permalink
fix variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
sharma-shreyas committed Sep 19, 2024
1 parent da31679 commit 9990423
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions adapters/integrations/gitlab-integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -781,16 +781,16 @@ ${content}`;
);
const startRegex =
/{{\s*config\s*\(/im;
const startMatch = fileContent.match(startRegex);
const startMatch = fileContents.match(startRegex);
let configSection = ''
if (startMatch) {
const startIndex = startMatch.index;
const openParensIndex = fileContent.indexOf('(', startIndex) + 1;
const openParensIndex = fileContents.indexOf('(', startIndex) + 1;
let openParensCount = 1;
let endIndex = openParensIndex;

while (openParensCount > 0 && endIndex < fileContent.length) {
const char = fileContent[endIndex];
while (openParensCount > 0 && endIndex < fileContents.length) {
const char = fileContents[endIndex];

if (char === '(') {
openParensCount++;
Expand All @@ -802,9 +802,9 @@ ${content}`;
}

const endMarker = '}}';
const finalEndIndex = fileContent.indexOf(endMarker, endIndex) + endMarker.length;
const finalEndIndex = fileContents.indexOf(endMarker, endIndex) + endMarker.length;

configSection = fileContent.substring(startIndex, finalEndIndex);
configSection = fileContents.substring(startIndex, finalEndIndex);
logger.withInfo(
"Extracted config section",
integrationName,
Expand Down

0 comments on commit 9990423

Please sign in to comment.