-
Notifications
You must be signed in to change notification settings - Fork 925
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
Discussion: Plugin API #207
Comments
These are some very interesting ideas. 🤔 I'm not sure moving all probot plugins towards being more plugin-like is the best idea though. I think maybe we could differentiate between plugins and apps and do some re-branding around that. I think plugins should be really small things like But I think stale for example is really more of a stand-alone App, in that it's very complete. I was thinking about that re: probot/stale#55. Obviously we shouldn't not update it for existing users, but still, moving forward, I think there are definitely stand-alone probot Apps that really don't need further integration. Just my $0.02 though 🙇♀️ |
I think the fact that an probot app can be a plugin at the same time as great for composition. I would not change that |
Just to clarify, when you say "plugin" you're talking about scheduler, but not "apps" like stale, right @JasonEtco? (The rest of this comment assumes that's what you meant. Sorry if I'm reading that wrong.) First, I think we have a terminology issue that needs resolved. Since at least #89, "plugins" are what we've been calling the node modules that use probot. Meanwhile, scheduler, which is a reusable module used by "plugins", calls itself a "helper". Without changing any functionality, I'd first like to propose we change terminology:
What does everyone think of that?
I like the idea of adding explicit configuration for extensions eventually. Since there's only currently one example in the wild, I think it feels a little to early to add an explicit API for it because we don't know how they'll be used. Will it be common to use multiple extensions in a single app? If so, an interface like you've suggested makes a lot of sense. But if apps at most use 1-2 plugins, something more like |
Agreed; I think your suggestion to use "App" to describe a thing built on Probot that you host and install in a repo, and "Extension" to describe some third-party code used in a Probot App (maybe along with some other code you wrote) is good. You were correcting in guessing what I meant 👍
I see what you're saying; I'm thinking about long-term reusability of very specific actions that extend Probot Apps, but I agree that it's a little early. However, I do think that having some form of API around it early, however minimal, will make it easier for Probot users to build multiple apps with overlapping functionality. I like the @bkeepers, feel free to close this out and reference it later when the "extension" conversation comes up again 🙌 |
you mean "combined with other apps", right? I like the terminology 👍
+1 |
My only question about this terminology is how do you differentiate a probot-app that is probot + code and an app that is probot + other apps + code (maybe)? Like if I wanted to just create a single app that includes things like auto-responder, stale, and welcome. The thing I deploy is the probot-app, but what are the other dependencies I included to make my app? Combining apps into other apps seems weird... But maybe not? I'm also interested in what it would look like to build my app without putting any real logic in index.js, but instead let it just call an init method (pass it robot) to make it more portable for more comprehensive apps (I'm sure there is some name for this pattern, but ¯_(ツ)_/¯). |
@jbjonesjr - I agree that that's a reasonable pattern, certainly one I've used (especially in
That's an interesting note; if you're using a Probot App inside your Probot App, does that first App become an Extension? 🤔 In this case, would you still use the I think we're overthinking this - I would say that a Probot App is what you deploy. Code brought in to your Probot App is considered an Extension. What do y'all think about this? |
The only analog I can think of is a Rails app vs a Rails Engine. Does that comparison make sense? Currently, Probot apps can be deployed together, but unlike Rails Engines, each app is still isolated from the other. The fact that they're running in the same Node runtime is just a deployment convenience. Until we have real world examples of apps extending the functionality of other apps, I'm not sure it's worth optimizing for the Rails Engine use case in Probot. Does that make sense? |
What I plan to do for @hoodiehq is to create different bot accounts for different teams (code, documentation, editorial, community). These bots will consume & combine functionality from other bots, at least that is my plan. I find the current API very nice for that, but I have not yet tried it |
The terminology change suggested in #207 (comment) is done. I don't think there's anything else actionable in this issue at the moment, so I'm going to close it. Thanks @JasonEtco for bringing this up. I'm looking forward to seeing more examples of extensions in the wild and adding APIs to support it. |
Hey folks; I've been thinking about how plugins differ from using webhooks within a Probot App, and I think that there is some friction around differentiating the two. Currently, a "plugin" is a node module that is called like a function:
And that's cool, but it doesn't feel like a plugin, it feels more like a function call (which really it is). As an example, Webpack does this differently:
Do you folks think it could be a good idea to explore some kind of plugin configuration API like that? Maybe something like (but not exactly):
Feel free to close this if you don't agree 👍
The text was updated successfully, but these errors were encountered: