It used to be the case that the org config was parsed as well. In refactoring /research it relies on keys.openAi which cannot be set at the repo level. Perhaps I'm doing something wrong but I don't think I am although insight would be appreciated
The naming convention was recently changed to match the repo-level config but the private config uses the previous version. (unless this has changed since V1)
const _orgConfig = parseYaml(
await download({
context,
repository: ".ubiquibot-config",
owner: payload.repository.owner.login,
path: ".github/ubiquibot-config.yml",
})
);
/**
* @TODO update config package to support this, right now
* it's pulling a hardcoded org config from it's own repo
*
* const merged = await generateConfiguration(_repoConfig, _orgConfig)
*/
let merged = { ..._repoConfig, ..._orgConfig };
Also generateConfiguration() I think needs updated so that it can be passed both configs and have it return a correctly merged config
import orgConfig from "../../.github/.ubiquibot-config.yml";
import { BotConfig, botConfigSchema, validateBotConfig } from "../types";
import { githubPluginType } from "../types/configuration/plugin-configuration";
export function generateConfiguration(repoConfig?: BotConfig): BotConfig {
const defaultConfig = Value.Default(botConfigSchema, {}) as BotConfig;
const merged = mergeWith(defaultConfig, orgConfig, repoConfig, (objValue: unknown, srcValue: unknown) => {
if (Array.isArray(objValue) && Array.isArray(srcValue)) {
It used to be the case that the org config was parsed as well. In refactoring
/research
it relies onkeys.openAi
which cannot be set at the repo level. Perhaps I'm doing something wrong but I don't think I am although insight would be appreciatedChanges I had to make:
Also
generateConfiguration()
I think needs updated so that it can be passed both configs and have it return a correctly merged config