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: make month determination programmatic, reverse sort
Date Wed, 22 May 2019 14:57:13 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 d113379  make month determination programmatic, reverse sort
d113379 is described below

commit d113379c8d5c2340ee09acf94565da8696db9fa1
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Wed May 22 10:56:52 2019 -0400

    make month determination programmatic, reverse sort
---
 www/officers/list-traffic.cgi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/officers/list-traffic.cgi b/www/officers/list-traffic.cgi
index 0d843aa..923ef18 100755
--- a/www/officers/list-traffic.cgi
+++ b/www/officers/list-traffic.cgi
@@ -212,8 +212,8 @@ _html do
         }
       }
     ) do
-      months = %w(201804 201805 201806 201807 201808 201809 201810 201811 201812  201901
201902 201903 201904 201905) # HACK figure out what we want to track / make interactive
-      months.each do |month|
+      months = Dir["#{SRV_MAIL}/*"].map {|path| File.basename(path).untaint}.grep(/^\d+$/)
# HACK figure out what we want to track / make interactive
+      months.sort.reverse.each do |month|
         data = get_mails_month(yearmonth: month, nondiscuss: NONDISCUSSION_SUBJECTS['<board.apache.org>'])
         next if data.empty?
         _h1 "board@ list statistics for #{month} (total mails: #{data[MAILS].length + data[TOOLS].length})",
id: "#{month}"


Mime
View raw message