whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: rough in server side of podling name search
Date Fri, 02 Jun 2017 02:54:16 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys 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  0be6726   rough in server side of podling name search
0be6726 is described below

commit 0be672691eea51cf7c0d081fb551b15cc3904b68
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Thu Jun 1 22:54:04 2017 -0400

    rough in server side of podling name search
---
 www/board/agenda/routes.rb | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index 003ce6c..96a1ff8 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -183,6 +183,26 @@ get '/json/posted-reports' do
   _json :"actions/posted-reports"
 end
 
+# podling name searches
+get '/json/podlingnamesearch' do
+
+  query = 'https://issues.apache.org/jira/rest/api/2/search?' +
+    'jql=project=PODLINGNAMESEARCH&fields=summary'
+
+  issues = JSON.parse(Net::HTTP.get URI(query))['issues']
+
+  issues.map! do |issue|
+    title = issue['fields']['summary']
+    name = title[/"Apache ([A-Z].*?)"/, 1]
+    name ||= title[/'Apache ([A-Z].*?)'/, 1]
+    name ||= title[/.*Apache ([A-Z]\S*)/, 1]
+    name ||= title.gsub('Apache', '')[/.*\b([A-Z]\S*)/, 1]
+    [name, {link: issue['self']}] if name
+  end
+
+  _json issues.compact.sort.to_h
+end
+
 # posted actions
 post '/json/:file' do
   _json :"actions/#{params[:file]}"

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message