From 2ac0f88bfe6232fd2671b302bb4ce2606371640e Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 03 2014 10:28:13 +0000 Subject: Do not capture the (to) group Relates to #43 --- diff --git a/progit/hooks/files/progit_hook.py b/progit/hooks/files/progit_hook.py index 1402cf0..12938cc 100644 --- a/progit/hooks/files/progit_hook.py +++ b/progit/hooks/files/progit_hook.py @@ -29,9 +29,9 @@ FIXES = [ ] RELATES = [ - re.compile('relate[sd]?:?\s?(to)?\s?#(\d+)', re.I), + re.compile('relate[sd]?:?\s?(?:to)?\s?#(\d+)', re.I), re.compile('.*\s+relate[sd]?:?\s?#(\d+)', re.I), - re.compile('relate[sd]?:?\s?(to)?\s?https?://.*/(\w+)/issue/(\d+)', re.I), + re.compile('relate[sd]?:?\s?(?:to)?\s?https?://.*/(\w+)/issue/(\d+)', re.I), re.compile('.*\s+relate[sd]?:?\s?https?://.*/(\w+)/issue/(\d+)', re.I), ]