Skip to content

Instantly share code, notes, and snippets.

@sc68cal
Forked from dims/parked_bugs.py
Last active March 4, 2016 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sc68cal/b80e97aa9da94f96002b to your computer and use it in GitHub Desktop.
Save sc68cal/b80e97aa9da94f96002b to your computer and use it in GitHub Desktop.
Bugs marked "In Progress" but no reviews
#!/usr/bin/env python
# Usage: python parked_bugs.py neutron
# Advanced Usage: python parked_bugs.py neutron nova cinder
import itertools
import sys
from launchpadlib import uris
from launchpadlib.launchpad import Launchpad
if __name__ == "__main__":
projects = sys.argv[1:]
lp = Launchpad.login_anonymously(
'dims-untriaged-bot',
service_root=uris.LPNET_SERVICE_ROOT
)
for name in projects:
project = lp.projects[name]
inprogress = project.searchTasks(status='In Progress')
for bug in itertools.chain(inprogress):
review = False
for comment in bug.bug.messages.entries:
if 'https://review.openstack.org/' in comment['content']:
review = True
break
if not review:
print('%s : %s' % (bug.web_link, bug.owner))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment