Handles the command.
({startingRef, endingRef}: Arguments<ValidateRangeOptions>)
| 34 | |
| 35 | /** Handles the command. */ |
| 36 | async 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. */ |
| 50 | export const ValidateRangeModule: CommandModule<{}, ValidateRangeOptions> = { |
nothing calls this directly
no test coverage detected