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

Function verify

ng-dev/ngbot/verify.ts:15–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13import {GitClient} from '../utils/git/git-client.js';
14
15export async function verify() {
16 const git = await GitClient.get();
17 /** Full path to NgBot config file */
18 const NGBOT_CONFIG_YAML_PATH = resolve(git.baseDir, '.github/angular-robot.yml');
19
20 /** The NgBot config file */
21 const ngBotYaml = readFileSync(NGBOT_CONFIG_YAML_PATH, 'utf8');
22
23 try {
24 // Try parsing the config file to verify that the syntax is correct.
25 parseYaml(ngBotYaml);
26 Log.info(green('✔ Valid NgBot YAML config'));
27 } catch (e) {
28 Log.error(`! Invalid NgBot YAML config`);
29 Log.error(e);
30 process.exitCode = 1;
31 }
32}

Callers 1

buildNgbotParserFunction · 0.70

Calls 3

resolveFunction · 0.85
getMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected