ubiquibot / plugin-template

Template repository for plugins that will run within Ubiquibot.
0 stars 3 forks source link

Template init #1

Closed Keyrxng closed 2 weeks ago

Keyrxng commented 3 weeks ago

Resolves https://github.com/ubiquibot/plugins-wishlist/issues/13

Keyrxng commented 3 weeks ago

A few questions that I'm unsure of myself.

Keyrxng commented 3 weeks ago

I always forget to tag, @gentlementlegen

gentlementlegen commented 3 weeks ago
  1. There will be an org and a repo based config, and secrets can be passed through it, but for secrets only specific for one repo we will prefer having them directly in that repo. This is mostly to accommodate third party plugins where we don't want to pass down secrets. Only the GitHub app secret is passed around (public or private doesn't really matter).
  2. This will be removed, for now at least before we implemented it in a better way. We will use the token in the payload.
  3. Correct
  4. It is not a requirement yet. The data is not yet processed.
  5. context.logged should ideally use the Ubiquity Logger, but currently the logger is too tied to the current implementation and is not usable as such https://github.com/ubiquity/ubiquibot-logger/issues/2
  6. Correct. Plugins should also provide an example in the README for a quick setup.
Keyrxng commented 3 weeks ago

Do you have any more info to add to the readme or would like something added/removed?

A good understanding of how the kernel works and how to interact with it. A basic understanding of the Ubiquibot configuration file and how to define your plugin's settings.

Me in my glass house throwing rocks here with these two comments in the readme when I just barely know what's going on 😂

gentlementlegen commented 3 weeks ago

The most important information to find there is:

For Actions, Nektos Act is nice for local testing. For wrangler, I usually have an http file, like here. See also https://github.com/ubiquibot/assistive-pricing?tab=readme-ov-file#make-requests

Maybe the Kernel should also be mentioned to do a full setup.

Keyrxng commented 3 weeks ago

@gentlementlegen requested changes made. I also removed the ref to ubqbot_token in Context.ts

Keyrxng commented 3 weeks ago

Also, would be really appreciated if you could have a look at https://github.com/ubiquity/ubiquibot-logger/issues/2 because it is becoming redundant to every plugin. While it's nice to have it inside of this template, it would be definitely better to have a package that can be shared.

I agree and np if it's still open I'll look into it next week