whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: All but asf are /private; only keep 1 line of log
Date Tue, 04 Aug 2020 21:57:43 GMT
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 d599ae2  All but asf are /private; only keep 1 line of log
d599ae2 is described below

commit d599ae2e895513242cc4b0f5dc668ab09d6c9486
Author: Sebb <sebb@apache.org>
AuthorDate: Tue Aug 4 22:57:34 2020 +0100

    All but asf are /private; only keep 1 line of log
---
 tools/pubsub2rake.rb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/pubsub2rake.rb b/tools/pubsub2rake.rb
index cd3329c..a3b2ce4 100755
--- a/tools/pubsub2rake.rb
+++ b/tools/pubsub2rake.rb
@@ -102,7 +102,7 @@ if $0 == __FILE__
   pubsub_CRED = File.read(pubsub_FILE).chomp.split(':') rescue nil
 
   WATCH=Hash.new{|h,k| h[k] = Array.new}
-  # determine which paths were are interested in
+  # determine which paths we are interested in
   # depth: 'skip' == ignore completely
   # files: only need to update if path matches one of the files
   # depth: 'files' only need to update for top level files
@@ -117,10 +117,10 @@ if $0 == __FILE__
     path = event['pubsub_path']
     if WATCH.include? path # WATCH auto-vivifies
       $hits += 1
-      log = event['commit']['log']
+      log = event['commit']['log'].sub(/\n.*/,'') # keep only first line
       id = event['commit']['id']
       puts ""
-      puts stamp id,log,path
+      puts stamp id,path,log
       matches = Hash.new{|h,k| h[k] = Array.new} # key alias, value = array of matching files
       watching = WATCH[path]
       watching.each do |svn_prefix, svn_alias, files|
@@ -158,7 +158,7 @@ if $0 == __FILE__
     url = desc['url']
 
     one,two,three=url.split('/',3)
-    path_prefix = one == 'private' ? ['/private','svn'] : ['/svn'] 
+    path_prefix = one == 'asf' ? ['/svn'] : ['/private','svn']
     pubsub_key = [path_prefix,one,two,'commit'].join('/')
     svn_relpath = [two,three].join('/')
     WATCH[pubsub_key] << [svn_relpath, name, desc['files']]


Mime
View raw message