diff options
author | James Laska <jlaska@redhat.com> | 2011-03-25 08:25:20 -0400 |
---|---|---|
committer | James Laska <jlaska@redhat.com> | 2011-03-25 08:25:20 -0400 |
commit | 0061518d4f32097778af99caa12b76144eee3fa4 (patch) | |
tree | 12e4e93b865331636d74a3696488da8cf141aca2 | |
parent | abb2b3cf5825435369dbe327a9659eaa94b0b361 (diff) | |
download | scripts-0061518d4f32097778af99caa12b76144eee3fa4.tar.gz scripts-0061518d4f32097778af99caa12b76144eee3fa4.tar.xz scripts-0061518d4f32097778af99caa12b76144eee3fa4.zip |
Add bug counts in section headers
-rwxr-xr-x | update-blocker-wiki | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/update-blocker-wiki b/update-blocker-wiki index 148cad6..ce74637 100755 --- a/update-blocker-wiki +++ b/update-blocker-wiki @@ -185,39 +185,54 @@ if __name__ == '__main__': else: page_content += '[[File:F{{FedoraVersionNumber|next}}_anaconda_center.png|right]]' + def join_lists(l): + ''' + Takes a list of lists, and joins them into a single list. For example: + [[1,2,3],[4],[5,6,7]] will become [1,2,3,4,5,6,7] + ''' + return [item for sublist in l for item in sublist] + # Display approved blockers page_content += ''' == Approved Blockers == -The following list of bugs are approved blockers that must be resolved. +The following list of bugs are approved blockers that must be resolved. There +are %s bug(s) affecting %s component(s). -''' +''' % (len(join_lists(accepted_blocker_by_component.values())), len(accepted_blocker_by_component)) # Sorted list of approved bugs page_content += display_bugs_by_component(accepted_blocker_by_component, bugs_by_id) # Display proposed blockers page_content += ''' == Proposed Blockers == -The following list of bugs are not yet approved to block the release. For guidance on reviewing the following bugs, refer to [[QA:SOP_blocker_bug_process]]. +The following list of bugs are not yet approved to block the release. There +are %s bug(s) affecting %s component(s). For guidance on reviewing the following +bugs, refer to [[QA:SOP_blocker_bug_process]]. -''' +''' % (len(join_lists(proposed_blocker_by_component.values())), len(proposed_blocker_by_component)) # Sorted list of proposed bugs page_content += display_bugs_by_component(proposed_blocker_by_component, bugs_by_id) # Display approved nths page_content += ''' == Approved NICE-TO-HAVE == -The following list of bugs are approved nths that must be resolved. +The following list of bugs are approved nths that must be resolved. There are +%s bug(s) affecting %s component(s). + +''' % (len(join_lists(accepted_nth_by_component.values())), len(accepted_nth_by_component)) -''' # Sorted list of approved bugs page_content += display_bugs_by_component(accepted_nth_by_component, bugs_by_id) # Display proposed nths page_content += ''' == Proposed NICE-TO-HAVE == -The following list of bugs are not yet approved to block the release. For guidance on reviewing the following bugs, refer to [[QA:SOP_nth_bug_process]]. +The following list of bugs are not yet approved to block the release. There +are %s bug(s) affecting %s component(s). For guidance on reviewing the following +bugs, refer to [[QA:SOP_nth_bug_process]]. + +''' % (len(join_lists(proposed_nth_by_component.values())), len(proposed_nth_by_component)) -''' # Sorted list of proposed bugs page_content += display_bugs_by_component(proposed_nth_by_component, bugs_by_id) |