django / ticketbot

Django's IRC ticketbot. Linkifies tickets and changesets. Hangs out in #django and #django-dev.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Git Commit Hashes

silent1mezzo opened this issue · comments

When matching Git commit hashes there should be a space before and afterwards to protect against false-positives.

e.g.
13:21 epicserve:My hot tip for the day: https://twitter.com/#!/epicserve/status/200636511924920321
13:21 ticketbot:django/django@200636511924920321

I was just coming to report a similar issue; ack'ing my #django logs, the most common false positives appear to be URLs that contain numbers.

Here is a quick report of false activity; http://dpaste.com/hold/747025/

It seems the easiest fix would be to require a space at the start and end. That would solve all of the false positives I've seen in #django and I think most people would include a space anyway right, otherwise it would be confusing.

... thinking further;

I guess it should either match from the start of the message or have a space at the start. A space at the end may be less common (as people could end a message with the hash) and false detection would be unlikely with the other two rules - none of the cases I found would pass.

Thanks — fixed in a849233!