Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: plugins can describe their own event listeneners #74

Merged
merged 28 commits into from
Jul 24, 2024

Conversation

gentlementlegen
Copy link
Member

@gentlementlegen gentlementlegen commented Jul 12, 2024

Resolves #73
Depends on #71

@gentlementlegen gentlementlegen marked this pull request as ready for review July 17, 2024 02:07
@gentlementlegen gentlementlegen changed the base branch from development to main July 17, 2024 02:08
@gentlementlegen gentlementlegen changed the base branch from main to development July 17, 2024 02:08
@gentlementlegen
Copy link
Member Author

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
Copy link
Member

0x4007 commented Jul 17, 2024

@gentlementlegen yes merge them.

@rndquu
Copy link
Member

rndquu commented Jul 17, 2024

@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?

src/github/utils/config.ts Outdated Show resolved Hide resolved
src/github/utils/config.ts Show resolved Hide resolved
src/github/types/plugin-configuration.ts Outdated Show resolved Hide resolved
src/github/utils/plugins.ts Show resolved Hide resolved
src/github/types/plugin-configuration.ts Show resolved Hide resolved
tests/configuration.test.ts Show resolved Hide resolved
@gentlementlegen
Copy link
Member Author

@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.

README.md Show resolved Hide resolved
@rndquu
Copy link
Member

rndquu commented Jul 19, 2024

@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
Copy link
Member Author

@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.

@rndquu
Copy link
Member

rndquu commented Jul 24, 2024

@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?

Copy link
Member

@rndquu rndquu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine

@gentlementlegen
Copy link
Member Author

@rndquu Thank you for the remark, created a ticket for it: #78

@gentlementlegen gentlementlegen merged commit d0f975a into ubiquity:development Jul 24, 2024
3 checks passed
@gentlementlegen gentlementlegen deleted the feat/runs-on branch July 24, 2024 07:41
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a runs_on section to the configuration and the manifests
4 participants