(config: PullApproveGroupConfig)
| 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 |
no test coverage detected