Perhaps partner projects may want to create their own routines or incentives that can piggyback off of the bot, instead of building a whole new bot.
The inspiration behind this is that I wanted to make a direct incentive for Draeieg to complete QA, and, for example, get paid 100 WXDAI per successful QA test. But I don't want this to be part of the bot's core code. Also its only applicable in the UbiquiBot repo.
What if by leveraging the repo/org config, we let partners add custom logic?
I'm not sure if reentrancy style attacks are viable in TypeScript due to function scopes but I suggest that the custom logic should exist as a TypeScript module (like export default a single function) inside of their repo's .github folder.
For example, using a custom handler in one organization can post a payment permit in another organization (unlikely to be possible given that each Netlify runtime instance is isolated)
in the config, they can define
custom /commands and then associate a handler by writing the filepath to the module.
custom event handlers, meaning they can associate arbitrary GitHub events to a custom handler they can load in during runtime.
There should also be a way to define a wildcard custom handler as well. We can have a special slot in the config, and then when the bot completes its wildcard actions across that repo, it can pick up and run that last bit of logic.
we need to be strict with time limits so that they dont bust our netlify runtime with a timeout and high costs.
we need to sanitize the data that goes in and out of these "external" functions
this can certainly be a premium feature we would charge for.
Examples
I never wrote a handler so I'm not totally up to speed on the architecture, but we can expose some seemingly essential and harmless objects to the handler. I'm also unsure what the return value should be.
What if by leveraging the repo/org config, we let partners add custom logic?
export default
a single function) inside of their repo's.github
folder./commands
and then associate a handler by writing the filepath to the module.Examples
I never wrote a handler so I'm not totally up to speed on the architecture, but we can expose some seemingly essential and harmless objects to the handler. I'm also unsure what the return value should be.