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

Make pager trigger unicode compatible #116

Closed kf6nux closed 5 years ago

kf6nux commented 5 years ago

Problem: Pager Trigger's regex isn't matching the quoted portion due to some modern OSes converting ASCII double quote and apostrophe to "left/right double quote" and "left/right single quote". i.e. U+0022 gets converted to U+201C/U+201D and U+0027 gets converted to U+2018/U+2019.

Solution: Extend the regex to allow these unicode characters to delineate the PagerDuty schedule.

kf6nux commented 5 years ago

I'm don't usually develop for nodejs. I'm not sure why tests are passing for Node 8 and Node 10, but not Node 6.

stephenyeargin commented 5 years ago

Note entirely sure either. The test suite for this package is rather lacking (simply looks to see if the package compiles and whether things are registered, which isn't exactly useful for regression testing). #49 is a task to fix that bit, which will probably render most of the current tests obsolete.

If you wanted to be on the safe side and get past it, you could update:

https://github.com/hubot-scripts/hubot-pager-me/blob/1b6891f354060c3863b3a4c3bb91f689ee0d8d90/test/pager-me-test.coffee#L9

kf6nux commented 5 years ago

Thanks for the tip @stephenyeargin. Tests are passing now.

stephenyeargin commented 5 years ago

Released with v3.1.0