Skip to content

Commit

Permalink
added logs for visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ArpitShukla12 committed Sep 12, 2024
1 parent a249a6b commit 99459e1
Show file tree
Hide file tree
Showing 2 changed files with 11,623 additions and 25,890 deletions.
28 changes: 21 additions & 7 deletions adapters/integrations/gitlab-integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,29 @@ ${content}`;
headSHA,
});

logger.withInfo(
`Successfully fetched file contents. File size: ${fileContents.length} bytes`,
integrationName,
CI_COMMIT_SHA,
"getAssetName"
);

if (fileContents) {
logger.withInfo(
"Starting regex matching",
integrationName,
CI_COMMIT_SHA,
"getAssetName"
);
var matches = regExp.exec(fileContents);

logger.withInfo(
"Successfully executed regex matching",
integrationName,
CI_COMMIT_SHA,
"getAssetName"
);

if (matches) {
logger.withInfo(
`Found a match: ${matches[1].trim()}`,
Expand Down Expand Up @@ -813,13 +834,6 @@ ${content}`;
);
const buff = Buffer.from(content, "base64");

logger.withInfo(
"Successfully fetched file contents",
integrationName,
CI_COMMIT_SHA,
"getFileContents"
);

return buff.toString("utf8");
} catch (error) {
logger.withError(
Expand Down
Loading

0 comments on commit 99459e1

Please sign in to comment.