hubot-archive / hubot-pager-me

PagerDuty integration for Hubot
https://www.npmjs.com/package/hubot-pager-me
MIT License
73 stars 93 forks source link

Add listener ids for everything #54

Closed technicalpickles closed 2 years ago

technicalpickles commented 8 years ago

Since hubot 2.13.0 hubot has support for listener metadata, and 2.14.0 introduced a way to use it: middleware.

This adds listener ids to everything, so middleware can start targeting it. Open questions/concerns:

cc @bhuga @keithduncan

bhuga commented 8 years ago

id's look good :+1:

how does this affect users that aren't up on hubot 2.13.0 yet?

This is a pretty serious problem. I just checked and I didn't realize that script packages don't have a hubot dependency. :confused:

technicalpickles commented 8 years ago

Maybe could do something like check robot.respond.length, and fail it isn't 3? (It used to be 2 before options).

technicalpickles commented 8 years ago

Also, the hubot script generator uses a peerDependency for specifying hubot as a dependency. We typically use 2.x though, will need to research, but might be able to say like less than 3, but at least 2.13.0

keithduncan commented 8 years ago

Maybe could do something like check robot.respond.length, and fail it isn't 3?

:+1: to explicit feature detection like this over checking something like the version of the library that was loaded

Prefixing with the script / module name seems like it will be ubiquitous, I wonder if the robot loading the listens should automatically prefix any listen id with the name of the module being loaded, this should ensure they can’t clobber each other.

keithduncan commented 2 years ago

A blast from the past and fond memories of working on these projects with you both 😄