Skip to content
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

Make pager trigger unicode compatible #116

Merged
merged 2 commits into from
Nov 17, 2018

Conversation

kf6nux
Copy link

@kf6nux kf6nux commented Nov 17, 2018

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.

…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 deliniate the pager duty schedule.
@kf6nux
Copy link
Author

kf6nux commented Nov 17, 2018

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
Copy link
Member

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
Copy link
Author

kf6nux commented Nov 17, 2018

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

@stephenyeargin stephenyeargin merged commit 75fbe30 into hubot-archive:master Nov 17, 2018
@kf6nux kf6nux deleted the accept-enhanced-quotes branch November 17, 2018 21:48
@stephenyeargin
Copy link
Member

Released with v3.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants