sprintly/sprint.ly-services — pull request #4 by zachsnow (2013-03-27 01:58:33+00:00)
Title: Clean up @mentions in comments when pushing to HipChat.

Right now `@mentions` show in HipChat using the underlying syntax, which is kind of
hard to read. This converts `@mentions` in comments of the form
`@[Some Name](pk:123)` to just `Some Name`. It's not very lenient in terms of how
`@mentions` are formatted in the underlying syntax, so if that changes this will break,
but it will just leave the mentions unconverted -- no worse than now, I guess.

It converts mentions in the whole comment before clamping it down to 50 characters
so that a mention doesn't get cut off and then not matched when cleaning.

*(Not sure if anyone else cares, just hooked up HipChat integration today and it
seemed like a nice little tweak.)*