13 raw = fs.readFileSync(configPath, 'utf8');
14 } catch (e) {
15▶ throw new Error(`Failed to read ${configPath}: ${e.message}`);
16 }
17 let config;
· · ·
19 config = JSON.parse(raw);
20 } catch (e) {
21▶ throw new Error(`Failed to parse pr-labeler-config.json: ${e.message}`);
22 }
23 const required = [
· · ·
28 const missing = required.filter(k => !(k in config));
29 if (missing.length > 0) {
30▶ throw new Error(`pr-labeler-config.json missing required keys: ${missing.join(', ')}`);
31 }
32 return config;
· · ·
35function init(github, owner, repo, config, core) {
36 if (!core) {
37▶ throw new Error('init() requires a `core` parameter (e.g., from actions/github-script)');
38 }
39 const {
· · ·
105 test = p => re.test(p);
106 } else {
107▶ throw new Error(
108 `fileRules[${i}] (label: "${rule.label}") has no recognized matcher ` +
109 `(expected one of: prefix, suffix, exact, pattern)`
+ 4 more matches in this file