diff options
author | Byron Jones <bjones@mozilla.com> | 2013-10-24 07:15:38 +0200 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2013-10-24 07:15:38 +0200 |
commit | ace93239c350e28c8201d948ea0f5c9126c2759a (patch) | |
tree | fd7c0112b12065aa7ecf5acccbb5914f92170cfe | |
parent | 5d9ef79dda657769f21833b030c9ed154468e0ab (diff) | |
download | bugzilla-ace93239c350e28c8201d948ea0f5c9126c2759a.tar.gz bugzilla-ace93239c350e28c8201d948ea0f5c9126c2759a.tar.xz |
Bug 930366: detection of github PRs not working with trailing '/' in urls
-rw-r--r-- | extensions/BMO/Extension.pm | 2 | ||||
-rwxr-xr-x | extensions/BMO/bin/migrate-github-pull-requests.pl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index 1fdb7d3c2..5f236dea4 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -607,7 +607,7 @@ sub attachment_process_data { # trim and check for the pull request url $url = trim($url); return if $url =~ /\s/; - return unless $url =~ m#^https://github\.com/[^/]+/[^/]+/pull/\d+$#i; + return unless $url =~ m#^https://github\.com/[^/]+/[^/]+/pull/\d+\/?$#i; # must be a valid pull-request $attributes->{mimetype} = GITHUB_PR_CONTENT_TYPE; diff --git a/extensions/BMO/bin/migrate-github-pull-requests.pl b/extensions/BMO/bin/migrate-github-pull-requests.pl index eba0dd422..de71a7856 100755 --- a/extensions/BMO/bin/migrate-github-pull-requests.pl +++ b/extensions/BMO/bin/migrate-github-pull-requests.pl @@ -57,7 +57,7 @@ foreach my $attachment (@$attachments) { # check payload my $url = trim($attachment->{thedata}); next if $url =~ /\s/; - next unless $url =~ m#^https://github\.com/[^/]+/[^/]+/pull/\d+$#i; + next unless $url =~ m#^https://github\.com/[^/]+/[^/]+/pull/\d+\/?$#i; $dbh->bz_start_transaction; |