* Load and parse the safe outputs configuration from config.json * @returns {object} The parsed configuration object
()
| 11 | * @returns {object} The parsed configuration object |
| 12 | */ |
| 13 | function loadSafeOutputsConfig() { |
| 14 | const configPath = `${process.env.RUNNER_TEMP}/gh-aw/safeoutputs/config.json`; |
| 15 | try { |
| 16 | if (!fs.existsSync(configPath)) { |
| 17 | core.warning(`Config file not found at ${configPath}, using defaults`); |
| 18 | return {}; |
| 19 | } |
| 20 | const configContent = fs.readFileSync(configPath, "utf8"); |
| 21 | return JSON.parse(configContent); |
| 22 | } catch (error) { |
| 23 | core.warning(`Failed to load config: ${getErrorMessage(error)}`); |
| 24 | return {}; |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Get configuration for a specific safe output type |
no test coverage detected