Skip to content

Commit c10f12b

Browse files
author
octo-patch
committed
style: apply prettier formatting to prepare-commit-msg-hook and prompts
Fixes the linux-tests CI failure on the format:check step. The lint and typecheck steps already pass; only prettier reported style issues in the two files touched by this PR.
1 parent 5136271 commit c10f12b

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/commands/prepare-commit-msg-hook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const prepareCommitMessageHook = async (
7777
const fileContent = await fs.readFile(messageFilePath);
7878

7979
const commentedError = String(error).replace(new RegExp('^', 'gm'), '# ');
80-
const message = `\n\n# ---------- [OpenCommit] ---------- #\n# Failed to generate the commit message.\n# To cancel the commit, just close this window without making any changes.\n\n${commentedError}\n\n${fileContent.toString()}`
80+
const message = `\n\n# ---------- [OpenCommit] ---------- #\n# Failed to generate the commit message.\n# To cancel the commit, just close this window without making any changes.\n\n${commentedError}\n\n${fileContent.toString()}`;
8181

8282
await fs.writeFile(messageFilePath, message);
8383
} catch (error) {

src/prompts.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,7 @@ export const getMainCommitPrompt = async (
245245
// Guard against outdated or corrupted config files that are missing the
246246
// prompts field (e.g. generated by an older version of opencommit).
247247
if (!Array.isArray(commitLintConfig.prompts)) {
248-
note(
249-
'Commitlint LLM config is missing prompts, regenerating...'
250-
);
248+
note('Commitlint LLM config is missing prompts, regenerating...');
251249
await configureCommitlintIntegration(true);
252250
commitLintConfig = await utils.getCommitlintLLMConfig();
253251
}

0 commit comments

Comments
 (0)