[bugzilla-gnome-org-customizations] gnome: Fix corner case of commit linking
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bugzilla-gnome-org-customizations] gnome: Fix corner case of commit linking
- Date: Sun, 8 Feb 2015 21:34:15 +0000 (UTC)
commit 4b311ac42c76c59821226cc485d89c8804e9332f
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Sun Feb 8 22:31:44 2015 +0100
gnome: Fix corner case of commit linking
Linking a commit would fail if comment began with "Commit 1234567" or
"Pushed as 1234567". It would fail also in comment like "I already
pushed this (commit 1234567)".
extensions/GNOME/Extension.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/extensions/GNOME/Extension.pm b/extensions/GNOME/Extension.pm
index 0ad6f30..84020ae 100644
--- a/extensions/GNOME/Extension.pm
+++ b/extensions/GNOME/Extension.pm
@@ -314,7 +314,7 @@ sub bug_format_comment {
my $text = $args->{'text'};
if (defined $args->{'bug'}) {
my $replacerGitCommit = {
- match => qr{(\scommit\s|\spushed as\s)\#?([a-f0-9]{7,40})}i,
+ match => qr{\b(commit\s|pushed as\s)\#?([a-f0-9]{7,40})}i,
replace => sub { _createGitCommitLink($self, $args); }
};
push( @$regexes, $replacerGitCommit );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]