MCPcopy Create free account
hub / github.com/angular/dev-infra / handler

Function handler

ng-dev/commit-message/validate-file/cli.ts:54–59  ·  view source on GitHub ↗

Handles the command.

({error, file, fileEnvVariable}: Arguments<ValidateFileOptions>)

Source from the content-addressed store, hash-verified

52
53/** Handles the command. */
54async function handler({error, file, fileEnvVariable}: Arguments<ValidateFileOptions>) {
55 const isErrorMode = error === null ? await getIsErrorModeDefault() : error;
56 const filePath = file || fileEnvVariable || '.git/COMMIT_EDITMSG';
57
58 await validateFile(filePath, isErrorMode);
59}
60
61async function getIsErrorModeDefault(): Promise<boolean> {
62 return !!process.env['CI'] || !!(await getUserConfig())['commitMessage']?.errorOnInvalidMessage;

Callers

nothing calls this directly

Calls 2

getIsErrorModeDefaultFunction · 0.85
validateFileFunction · 0.85

Tested by

no test coverage detected