ubiquity / ubiquibot

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

Proposal: Extensible Incentives #792

Closed 0x4007 closed 6 months ago

0x4007 commented 11 months ago

What if by leveraging the repo/org config, we let partners add custom logic?

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.

// import { getBotConfig, getBotContext, getLogger } from "../../bindings";
// import { addCommentToIssue, getUserPermission, removeLabel, addLabelToIssue } from "../../helpers";

export default function myCustomHandler(bindings, helpers) {
    const context = bindings.getBotContext();
    const logger = bindings.getLogger();
}
0x4007 commented 6 months ago
ubiquibot[bot] commented 6 months ago
! action has an uncaught error
ubiquibot[bot] commented 6 months ago
# Issue was not closed as completed. Skipping.
ubiquibot[bot] commented 6 months ago
! action has an uncaught error
ubiquibot[bot] commented 6 months ago
! action has an uncaught error