aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFathi Boudra <fabo@debian.org>2011-12-01 10:24:45 +0200
committerFathi Boudra <fabo@debian.org>2011-12-01 10:24:45 +0200
commit5acf14a10550015029fb08c2d49cdd4cacf509b0 (patch)
tree3eee32b7487447dabf23de208a706f76c5423200
parent1d34b927e59d8f921fb755a2251ebacf70dd46c1 (diff)
Add a script to generate bugs table for weekly release meeting.
-rwxr-xr-xtools/bug-track/linaro-release-bug2moin.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/tools/bug-track/linaro-release-bug2moin.py b/tools/bug-track/linaro-release-bug2moin.py
new file mode 100755
index 0000000..a6dc562
--- /dev/null
+++ b/tools/bug-track/linaro-release-bug2moin.py
@@ -0,0 +1,42 @@
+#!/usr/bin/python
+# script to generate the bugs table for weekly release meeting
+
+import os
+import sys
+import subprocess
+import launchpadlib
+from launchpadlib.launchpad import Launchpad
+
+if __name__ == '__main__':
+ CACHE_DIR = os.path.expanduser('~/.launchpadlib/cache')
+
+ print("Please wait. It can take some time...\n")
+ filename = './linaro-release-bugs.moin'
+ outfile = open(filename, 'w')
+ #outfile.write("||<rowbgcolor=\"#aaeeaa\"> Bug ID || Summary || Importance || Notes ||\n")
+
+ lp = Launchpad.login_anonymously('linaro-release-bugs2moin', 'production', CACHE_DIR)
+ pillar = lp.projects["~linaro-release"]
+ bugs = pillar.searchTasks(
+ status=[
+ "New",
+ "Confirmed",
+ "Triaged",
+ "In Progress",
+ "Fix Committed",
+ "Incomplete"],
+ importance=[
+ "Critical",
+ "High"])
+ for bug_task in bugs:
+ id = bug_task.bug.id
+ title = bug_task.bug.title
+ importance = bug_task.importance
+ status = bug_task.status
+ print "|| Bug:%s || %s || %s || %s ||" % (id, title, importance, status)
+ outfile.write("|| Bug:%s || %s || %s || ||\n" % (id, title, importance))
+
+ outfile.close()
+
+ # Requires sort and sponge installed
+ subprocess.call("LANG=C sort -u " + filename + " | sponge " + filename, shell=True)