This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 15257cd  Rework title parsing
15257cd is described below

commit 15257cd31ff51842b6f302eb4a5e89b73061f77c
Author: Sebb <[email protected]>
AuthorDate: Fri Nov 20 23:12:53 2020 +0000

    Rework title parsing
---
 lib/whimsy/asf/podling.rb | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/whimsy/asf/podling.rb b/lib/whimsy/asf/podling.rb
index 382afc1..7b17cb8 100644
--- a/lib/whimsy/asf/podling.rb
+++ b/lib/whimsy/asf/podling.rb
@@ -426,10 +426,12 @@ module ASF
           name = nil if name =~ /^\s*This/ or name !~ /[A-Za-z]{3}/ or name =~ 
%r{^N/A}
         end
 
-        name ||= title[/"Apache ([a-zA-Z].*?)"/, 1]
-        name ||= title[/'Apache ([a-zA-Z].*?)'/, 1]
-        name ||= title[/.*Apache ([A-Z]\S*)/, 1]
-        name ||= title.gsub('Apache', '')[/.*\b([A-Z]\S*)/, 1]
+        name ||= title[/Establish (?:[wW]h?ether|weather)? ['"“]?(?:Apache 
)?(.+?)['"”]? (?:is|would be|as) a [sS]uitable/, 1]
+        name ||= title[/Determine if (.+?) is a suitable/, 1]
+        name ||= title[/Name [sS]earch for (.+)/, 1]
+        name ||= title[/(?:Apache )?(.+?) name search/, 1]
+        name ||= title[/Is (?:Apache )?(.+?) a suitable (?:project )?name/, 1]
+        name&.sub! 'Apache ', ''
         next unless name
         resolution = issue['fields']['resolution']
         resolution = resolution ? resolution['name'] : 'Unresolved'

Reply via email to