ubiquity / ubiquibot

Putting the 'A' in 'DAO'
https://github.com/marketplace/ubiquibot
MIT License
17 stars 59 forks source link

default config not being recognised #816

Open Keyrxng opened 11 months ago

Keyrxng commented 11 months ago

I rely on the default-bot-config.ts to work with the repo as I am not an organization and can't rely on my public test repo to store my API keys etc so I am roadblocked at the moment or at least have to find work arounds to work with the bot

All commands from this commit forward are failing

Am I the only one having these issues, I find that hard to believe?

Org config clearly working so a current workaround is there but not ideal really

Keyrxng commented 11 months ago
const mergeConfigs = (configs: MergedConfigs) => {
  return merge({}, configs.parsedDefault, configs.parsedOrg, configs.parsedRepo);
};

Lodash/merge:

The _.merge() method is used to merge two or more objects starting with the left-most to the right-most to create a parent mapping object. When two keys are the same, the generated object will have value for the rightmost key. If more than one object is the same, the newly generated object will have only one key and value corresponding to those objects.

So default is being overridden by org then repo here, am I understanding this right? So default is redundant and will never be read from as far as I understand it.

0x4007 commented 11 months ago

Just make a test org lol

0x4007 commented 11 months ago

So default is being overridden by org then repo here, am I understanding this right? So default is redundant and will never be read from as far as I understand it.

@whilefoo rfc

whilefoo commented 11 months ago

So default is being overridden by org then repo here, am I understanding this right? So default is redundant and will never be read from as far as I understand it.

It will be read of course. Org and repo override the properties in default config but if property is not present in org or repo config then default config will be used. Unless something else broke it..you can always check the parsed config in the console output to see.

Keyrxng commented 10 months ago

Still the same, default config doesn't get read from.

My org configs have broken and only incentives are being registered from the repo and org configs, which leaves only the default-config.ts and still all commands are disabled.

Am I the only one experiencing this cause if so then obv I've got something setup incorrect, if that's the case, any ideas folks?