Skip to content

Commit

Permalink
refactor: Update logging statements in CopilotActionService
Browse files Browse the repository at this point in the history
  • Loading branch information
simlarsen committed Jun 21, 2024
1 parent e7659bd commit 261072b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Copilot/Service/CopilotActions/CopilotActionsBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default class CopilotActionBase {
}): Promise<string> {
return `OneUptime Copilot: ${this.copilotActionType} on ${data.vars.filePath}
${this.getDefaultPullRequestBody()}
${await this.getDefaultPullRequestBody()}
`;
}

Expand Down
14 changes: 7 additions & 7 deletions Copilot/Service/CopilotActions/Index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ export default class CopilotActionService {
throw new BadDataException("Invalid CopilotActionType");
}

logger.debug("Executing Copilot Action");
logger.debug("File Path: " + data.vars.filePath);
logger.debug("Commit Hash: " + data.vars.fileCommitHash);
logger.info("Executing Copilot Action");
logger.info("File Path: " + data.vars.filePath);
logger.info("Commit Hash: " + data.vars.fileCommitHash);

const action: CopilotActionBase = actionDictionary[
data.copilotActionType
Expand All @@ -65,8 +65,8 @@ export default class CopilotActionService {
let pullRequest: PullRequest | null = null;

if (result) {
logger.debug("Obtained result from Copilot Action");
logger.debug(
logger.info("Obtained result from Copilot Action");
logger.info(
"Committing the changes to the repository and creating a PR",
);

Expand Down Expand Up @@ -136,11 +136,11 @@ export default class CopilotActionService {
}

if (!result) {
logger.debug("No result obtained from Copilot Action");
logger.info("No result obtained from Copilot Action");
}

await CopilotActionService.addCopilotAction({
serviceCatalogId: data.serviceRepository.serviceCatalogId!,
serviceCatalogId: data.serviceRepository.serviceCatalog?.id!,
serviceRepositoryId: data.serviceRepository.id!,
filePath: filePath,
commitHash: fileCommitHash,
Expand Down

0 comments on commit 261072b

Please sign in to comment.