Make milestone-review-dash script pull all Stadium projects

Change-Id: I2ba04d777001ebac12e5cbeaf5d530c932cc99f7
This commit is contained in:
Armando Migliaccio 2016-08-26 12:24:29 -07:00
parent fc47046cd7
commit 40f5846280
1 changed files with 16 additions and 6 deletions

View File

@ -11,8 +11,11 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import argparse
import sys
import urllib2
import yaml
from launchpadlib.launchpad import Launchpad
@ -113,6 +116,13 @@ def write_queries_for_project(f, project, milestone):
write_section(f, section_name, query)
def get_stadium_projects():
data = urllib2.urlopen("http://git.openstack.org/cgit/openstack/"
"governance/plain/reference/projects.yaml")
governance = yaml.load(data)
return governance["neutron"]["deliverables"].keys()
parser = argparse.ArgumentParser(
description='Create dashboard for critical/high bugs, approved rfe and'
' blueprints. A .dash file will be created in the current'
@ -146,12 +156,12 @@ with open(file_name, 'w') as f:
title = "[dashboard]\ntitle = Neutron %s Review Inbox\n" % milestone
f.write(title)
f.write("description = Review Inbox\n")
f.write("foreach = (project:openstack/neutron OR "
"project:openstack/python-neutronclient OR "
"project:openstack/neutron-specs OR "
"project:openstack/neutron-fwaas OR "
"project:openstack/neutron-lbaas OR "
"project:openstack/neutron-vpnaas) status:open NOT owner:self "
f.write("foreach = (")
projects_query = [
"project:openstack/%s" % p for p in get_stadium_projects()
]
f.write(' OR '.join(projects_query))
f.write(") status:open NOT owner:self "
"NOT label:Workflow<=-1 "
"NOT label:Code-Review>=-2,self branch:master\n")
f.write("\n")