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

Method _captureConditions

ng-dev/pullapprove/group.ts:57–77  ·  view source on GitHub ↗
(config: PullApproveGroupConfig)

Source from the content-addressed store, hash-verified

55 }
56
57 private _captureConditions(config: PullApproveGroupConfig) {
58 if (config.conditions) {
59 return config.conditions.forEach((condition) => {
60 const expression = condition.trim();
61
62 try {
63 this.conditions.push({
64 expression,
65 checkFn: convertConditionToFunction(expression),
66 matchedFiles: new Set(),
67 unverifiable: false,
68 });
69 } catch (e) {
70 Log.error(`Could not parse condition in group: ${this.groupName}`);
71 Log.error(` - ${expression}`);
72 Log.error(`Error:`, e);
73 process.exit(1);
74 }
75 });
76 }
77 }
78
79 /**
80 * Tests a provided file path to determine if it would be considered matched by

Callers 1

constructorMethod · 0.95

Calls 3

pushMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected