Extract express out of hubot core
See original GitHub issueThe main problem with hubot’s express support, from a user’s perspective, is that it doesn’t allow a lot of customizability. Sure, you can add routes to it easily enough, but if you need to add or swap middleware, it’s less obvious how to do that in a clean way.
A problem from a hubot maintenance point of view is that it’s a part of hubot’s core that people want to change, so any changes to it have to be carefully considered before merging or it could impact existing users.
So the general thinking has been to remove robot.router
from hubot-core, and move it to its own package. The main obstacle to doing that is… if express support is external to core, how would scripts go about adding their own routes, middleware, etc, without clobbering others? In addition, there’s not a clear path for something like this being an extension to hubot, rather than a package of scripts.
Most recent discussion over in https://github.com/github/hubot/pull/764
Issue Analytics
- State:
- Created 9 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top GitHub Comments
I have been thinking about this a bit, and I don’t think we can quite remove express, as it will be useful when building adapters that use webhooks.
The main motivation for me to want to remove express was that there have been many requests over the year to adjust how the builtin express app works, and that usually involves exposing environment variables to turn things on or off. There are an infinite number of combinations though, so it doesn’t really scale.
Instead of removing, maybe we could do something similar to botkit, which has a default way to setup express, or you can pass in your own instance of express. I think that would give users a lot more flexibility, while offering express as something out of the box.
I think the main blocker to doing that is https://github.com/github/hubot/issues/858
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.