From 20506cd63eddd9d9cc5146947dd35b74bafa6332 Mon Sep 17 00:00:00 2001 From: Steven Rowe Date: Mon, 6 Jan 2014 19:51:50 +0000 Subject: [PATCH] LUCENE-5383: fix changes2html to link pull requests git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1555998 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/CHANGES.txt | 2 ++ lucene/site/changes/changes2html.pl | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 3b6236d08b9..734bc5da788 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -114,6 +114,8 @@ Build of failing. It also instructs the user, how to run on SVN 1.8 working copies. (Robert Muir, Uwe Schindler) +* LUCENE-5383: fix changes2html to link pull requests (Steve Rowe) + Bug fixes * LUCENE-5285: Improved highlighting of multi-valued fields with diff --git a/lucene/site/changes/changes2html.pl b/lucene/site/changes/changes2html.pl index 61ac1c11e63..b5ef0af6068 100755 --- a/lucene/site/changes/changes2html.pl +++ b/lucene/site/changes/changes2html.pl @@ -27,6 +27,7 @@ use warnings; # JIRA REST API documentation: my $project_info_url = 'https://issues.apache.org/jira/rest/api/2/project'; my $jira_url_prefix = 'http://issues.apache.org/jira/browse/'; +my $github_pull_request_prefix = 'https://github.com/apache/lucene-solr/pull/'; my $bugzilla_url_prefix = 'http://issues.apache.org/bugzilla/show_bug.cgi?id='; my $month_regex = &setup_month_regex; my %month_nums = &setup_month_nums; @@ -554,6 +555,9 @@ for my $rel (@releases) { # Link Lucene XXX, SOLR XXX and INFRA XXX to JIRA $item =~ s{((LUCENE|SOLR|INFRA)\s+(\d{3,}))} {$1}gi; + # Link "[ github | gh ] pull request [ # ] X+" to Github pull request + $item =~ s{((?:(?:(?:github|gh)\s+)?pull\s+request\s*(?:\#?\s*)?|gh-)(\d+))} + {$1}gi; if ($product eq 'LUCENE') { # Find single Bugzilla issues $item =~ s~((?i:bug|patch|issue)\s*\#?\s*(\d+))