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

Function handler

ng-dev/commit-message/validate-range/cli.ts:36–47  ·  view source on GitHub ↗

Handles the command.

({startingRef, endingRef}: Arguments<ValidateRangeOptions>)

Source from the content-addressed store, hash-verified

34
35/** Handles the command. */
36async function handler({startingRef, endingRef}: Arguments<ValidateRangeOptions>) {
37 // If on CI, and no pull request number is provided, assume the branch
38 // being run on is an upstream branch.
39 if (process.env['CI'] && process.env['CI_PULL_REQUEST'] === 'false') {
40 Log.info(`Since valid commit messages are enforced by PR linting on CI, we do not`);
41 Log.info(`need to validate commit messages on CI runs on upstream branches.`);
42 Log.info();
43 Log.info(`Skipping check of provided commit range`);
44 return;
45 }
46 await validateCommitRange(startingRef, endingRef);
47}
48
49/** yargs command module describing the command. */
50export const ValidateRangeModule: CommandModule<{}, ValidateRangeOptions> = {

Callers

nothing calls this directly

Calls 1

validateCommitRangeFunction · 0.85

Tested by

no test coverage detected