status-report-scripts parseBZbugList,1.33,1.34

Christian Iseli (c4chris) fedora-extras-commits at redhat.com
Fri May 12 21:07:01 UTC 2006


Author: c4chris

Update of /cvs/fedora/status-report-scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16021

Modified Files:
	parseBZbugList 
Log Message:
Show 25 top reviewers and highlight sponsors.


Index: parseBZbugList
===================================================================
RCS file: /cvs/fedora/status-report-scripts/parseBZbugList,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- parseBZbugList	27 Apr 2006 15:45:48 -0000	1.33
+++ parseBZbugList	12 May 2006 21:06:59 -0000	1.34
@@ -85,6 +85,8 @@
   = "http://fedoraproject.org/wiki/Extras/PackagesNoLongerInDevel";
 $main::bzid
   = "http://fedoraproject.org/wiki/Extras/UsefulScripts?action=AttachFile&do=get&target=bzId_pkg.txt";
+$main::members
+  = "https://admin.fedora.redhat.com/accounts/dump-group.cgi?group=cvsextras&format=txt";
 $main::cvsDir = "/export/scratch/extras";
 $main::currel = 5;
 $main::firstrel = 1;
@@ -123,6 +125,7 @@
 my %OWN;
 my %OWN_DUP;
 my %OWN_CVS_RECENT;
+my %MEMBER;
 my %CVS_NO_OWNER;
 my %DISCARD;
 my %FC_INTEGRATED;
@@ -145,6 +148,17 @@
   }
   close IN;
 }
+if ($main::members ne "") {
+  local *IN;
+  open IN, "wget -nv -O - --no-check-certificate \"$main::members\"|"
+    or die "Failed to wget members list : $!";
+  while ( <IN> ) {
+    s/\s+$//;
+    my @F = split /,/;
+    $MEMBER{$F[1]} = \@F;
+  }
+  close IN;
+}
 if ($main::discarded ne "") {
   local *IN;
   open IN, "wget -nv -O - \"$main::discarded\"|"
@@ -554,15 +568,34 @@
 }
 
 sub displayOwnerCntWiki {
-  my ($a, $c, $aref) = @_;
-  for my $i (0 .. 9) {
+  my ($a, $c, $aref, $count, $mark) = @_;
+  if (defined $count) {
+    $count -= 1;
+  } else {
+    $count = 9;
+  }
+  for my $i (0 .. $count) {
     my $n = $$a[$i];
+    my $sponsor = 0;
     $n =~ s/["]//g;
-    $n =~ s/\@/ at /;
-    $n =~ s/\./ dot /g;
+    if (defined $MEMBER{$n}) {
+      my $a = $MEMBER{$n};
+      $n = $$a[2];
+      if ($mark == 1
+	  && ($$a[3] eq "sponsor" || $$a[3] eq "administrator")) {
+	$sponsor = 1;
+      }
+    } else {
+      $n =~ s/\@/ at /;
+      $n =~ s/\./ dot /g;
+    }
     my $aa = $c->{$$a[$i]};
     $aa = $$aa[$aref] if defined $aref;
-    print "||$n||$aa||\n";
+    if ($sponsor == 1) {
+      print "||<style=\"background-color: #80FF80;\"> $n||$aa||\n";
+    } else {
+      print "||$n||$aa||\n";
+    }
   }
   print "\n";
 }
@@ -728,8 +761,10 @@
   print "\nWe have $COUNT_LIST{'acceptedClosed'} accepted, closed package reviews\n";
   print "\n=== Top 10 BZ review requests submitters ===\n";
   &displayOwnerCntWiki($OWNER_LIST{"BZOwner"}, \%BZOWN_CNT, undef);
-  print "\n=== Top 10 BZ review requests reviewers ===\n";
-  &displayOwnerCntWiki($OWNER_LIST{"BZReviewer"}, \%BZREV_CNT, undef);
+  print "\n=== Top 25 BZ review requests reviewers ===\n";
+  print "Sponsors are highlighted in green.\n";
+  &displayOwnerCntWiki($OWNER_LIST{"BZReviewer"},
+		       \%BZREV_CNT, undef, 25, 1);
   print "\n\n=== Potential problems ===\n";
   if ($COUNT_LIST{"missing"} > 0) {
     print "\nWe have $COUNT_LIST{'missing'} accepted, closed packages where I'm unable to ",




More information about the fedora-extras-commits mailing list