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: More syntax. Use Git summary message as title
Date Mon, 05 Jun 2017 14:37:24 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 2f19938  More syntax. Use Git summary message as title
2f19938 is described below

commit 2f199380c0fed2bdee06c142523af636d4a7f595
Author: Sebb <sebb@apache.org>
AuthorDate: Mon Jun 5 15:36:50 2017 +0100

    More syntax. Use Git summary message as title
---
 www/status/monitors/git.rb | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/www/status/monitors/git.rb b/www/status/monitors/git.rb
index e158f6b..1c2c2cd 100644
--- a/www/status/monitors/git.rb
+++ b/www/status/monitors/git.rb
@@ -38,6 +38,7 @@ def Monitor.git(previous_status)
     level = 'success'
     title = nil
     data = revision = update[/^(Already up-to-date.|Updating [0-9a-f]+\.\.[0-9a-f]+)$/]
+    title = update[/^ \d+ files? changed(, \d+ insertions\(\+\))?(, \d+ deletions\(-\))?$/]
     show 'data', data
 
     lines = update.split("\n")
@@ -51,6 +52,7 @@ def Monitor.git(previous_status)
       '  (use "git pull" ',
       'Fast-forward',
       'Updating ',
+      ' create mode ',
       # TODO Should these 2 lines be handled differently?
       'From git://',
       ' * [new branch]',
@@ -58,7 +60,7 @@ def Monitor.git(previous_status)
       
     lines.reject! do |line| 
       line.start_with?(*start_ignores) or
-      line =~ /^ \d+ files? changed, \d+ insertions\(\+\), \d+ deletions\(-\)$/ or
+      line =~ /^ \d+ files? changed(, \d+ insertions\(\+\))?(, \d+ deletions\(-\))?$/ or
       line =~  /^ +[0-9a-f]+\.\.[0-9a-f]+ +\S+ -> \S+$/ # branch
     end
 
@@ -78,10 +80,6 @@ def Monitor.git(previous_status)
         seen_level[level] = true
       elsif String  === data
         title = "No files updated"
-      elsif data.length == 1
-        title = "1 file updated"
-      else
-        title = "#{data.length} files updated"
       end
 
       data << revision if revision and data.instance_of? Array
@@ -163,5 +161,16 @@ Fast-forward
  modules/gitbox/files/asfgit/git_multimail.py | 1009 +++++++++++++++++++-------
  1 file changed, 737 insertions(+), 272 deletions(-)
 
+/x1/srv/git/infrastructure-puppet5
+Already on 'deployment'
+Your branch is up-to-date with 'origin/deployment'.
+From git://git.apache.org/infrastructure-puppet
+   f827a83..b649da5  deployment -> origin/deployment
+Updating f827a83..b649da5
+Fast-forward
+ .../git_mirror_asf/files/bin/graduate-podling.py   | 159 +++++++++++++++++++++
+ 1 file changed, 159 insertions(+)
+ create mode 100644 modules/git_mirror_asf/files/bin/graduate-podling.py
+
 /x1/srv/git/letsencrypt
 Already up-to-date.

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

Mime
View raw message