From 34d2b0a64fca3b3b14e2eb36fa35d02f5e35ed83 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 5 Aug 2013 11:06:43 +0530 Subject: [PATCH] Allow refering to bugs without closing them in commit messages --- setup/git_pre_commit_hook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/git_pre_commit_hook.py b/setup/git_pre_commit_hook.py index 8be2640f35..978983ca56 100755 --- a/setup/git_pre_commit_hook.py +++ b/setup/git_pre_commit_hook.py @@ -20,7 +20,7 @@ from lxml import html SENDMAIL = ('/home/kovid/work/env', 'pgp_mail') LAUNCHPAD_BUG = 'https://bugs.launchpad.net/calibre/+bug/%s' GITHUB_BUG = 'https://api.github.com/repos/kovidgoyal/calibre/issues/%s' -BUG_PAT = r'(Fix|Implement|Fixes|Fixed|Implemented)\s+#(\d+)' +BUG_PAT = r'(Fix|Implement|Fixes|Fixed|Implemented|See)\s+#(\d+)' class Bug: @@ -45,7 +45,7 @@ class Bug: summary = json.loads(urllib.urlopen(GITHUB_BUG % bug).read())['title'] if summary: print ('Working on bug:', summary) - if int(bug) > 100000: + if int(bug) > 100000 and action != 'See': self.close_bug(bug, action) return match.group() + ' [%s](%s)' % (summary, LAUNCHPAD_BUG % bug) return match.group() + ' (%s)' % summary