community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1864381 - /comdev/reporter.apache.org/trunk/site/wizard/kibble.py
Date Sun, 04 Aug 2019 14:03:46 GMT
Author: humbedooh
Date: Sun Aug  4 14:03:45 2019
New Revision: 1864381

URL: http://svn.apache.org/viewvc?rev=1864381&view=rev
Log:
also show issues opened/closed

Modified:
    comdev/reporter.apache.org/trunk/site/wizard/kibble.py

Modified: comdev/reporter.apache.org/trunk/site/wizard/kibble.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/kibble.py?rev=1864381&r1=1864380&r2=1864381&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/kibble.py (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/kibble.py Sun Aug  4 14:03:45 2019
@@ -58,6 +58,20 @@ def main():
         prc_change = '%u%%' % int((prc_after - prc_before) / (prc_before or 1) * 100)
         
         
+        iso_before = 0
+        isc_before = 0
+        for month in before:
+            iso_before += month.get('issues opened', 0)
+            isc_before += month.get('issues closed', 0)
+        iso_after = 0
+        isc_after = 0
+        for month in after:
+            iso_after += month.get('issues opened', 0)
+            isc_after += month.get('issues closed', 0)
+        iso_change = '%u%%' % int((iso_after - pro_before) / (iso_before or 1) * 100)
+        isc_change = '%u%%' % int((isc_after - prc_before) / (isc_before or 1) * 100)
+        
+        
         # Commits
         commits = requests.post('https://demo.kibble.apache.org/api/code/commits',
                   headers = {
@@ -137,6 +151,20 @@ def main():
                     'closed': prc_change,
                 }
             },
+            'issues': {
+                'before': {
+                    'opened': iso_before,
+                    'closed': isc_before,
+                },
+                'after': {
+                    'opened': iso_after,
+                    'closed': isc_after,
+                },
+                'change': {
+                    'opened': iso_change,
+                    'closed': isc_change,
+                }
+            },
             'commits' : {
                 'before': {
                     'commits': cmt_before,



Mime
View raw message