ubiquity-os / ubiquity-os-kernel

1 stars 13 forks source link

feat: plugins can describe their own event listeneners #74

Closed gentlementlegen closed 2 months ago

gentlementlegen commented 2 months ago

Resolves #73 Depends on https://github.com/ubiquity/ubiquibot-kernel/pull/71

gentlementlegen commented 2 months ago

For this PR to work properly, all the related manifest pull-requests have to be merged, @0x4007 let me know if I am good to merge them.

0x4007 commented 2 months ago

@gentlementlegen yes merge them.

rndquu commented 2 months ago

@gentlementlegen Check this config.

Trying to run the hello world plugin and the kernel responds with No handler found for event issue_comment although the config does have the runsOn section.

What am I doing wrong?

gentlementlegen commented 2 months ago

@gentlementlegen Check this config.

Trying to run the hello world plugin and the kernel responds with No handler found for event issue_comment although the config does have the runsOn section.

What am I doing wrong?

I updated the README with a proper config due to the new schema. I think the runsOn is misused in yours, it should go within the plugin itself.

rndquu commented 2 months ago

@gentlementlegen Check this issue, this config (from readme) and this comment. It seems that the "hello-world" plugin responds to any comment while the expected behavior is to respond only to the /hello command.

gentlementlegen commented 2 months ago

@rndquu The issue was that the hello-world plugin would not serve the manifest, so the kernel would not be able to filter out the commands. I added a manifest and serve it, which should solve the problem. Also I merged in PR https://github.com/ubiquity/ubiquibot-kernel/issues/75 within this one because it was needed to properly filter out the commands anyway.

rndquu commented 2 months ago

@rndquu The issue was that the hello-world plugin would not serve the manifest, so the kernel would not be able to filter out the commands. I added a manifest and serve it, which should solve the problem. Also I merged in PR #75 within this one because it was needed to properly filter out the commands anyway.

If plugin doesn't serve manifest at all then what's going to happen? Perhaps we should create a new github issue for showing empty manifest related error and stopping plugin execution?

gentlementlegen commented 2 months ago

@rndquu Thank you for the remark, created a ticket for it: https://github.com/ubiquity/ubiquibot-kernel/issues/78