Page MenuHomePhabricator
Paste P7192

blockers
ActivePublic

Authored by mmodell on May 30 2018, 9:31 PM.
Tags
None
Referenced Files
F18621298: blockers
May 30 2018, 9:31 PM
Subscribers
None
@cli.argument('--count', help='Show at most this many tasks',
metavar='NUM', default=1, type=int)
@cli.argument('--release', help="Show the task id for a specific version",
metavar='VERSION', type=mediawiki_version)
@cli.subcommand('show')
def show(self, *args):
'''
Show a list of deployment blockers tasks
'''
limit = self.arguments.count
constraints = {}
if self.arguments.release:
constraints['query'] = self.arguments.release
limit = 1
res = phab.maniphest.search(
queryKey="GTbIUdDaMLqV",
constraints=constraints,
limit=limit)
for task in res.data:
if limit > 1:
print(
"T%d %s %s" %
(task["id"],
task['fields']['status']['name'],
task['fields']['custom.release.version']))
else:
print("T%d" % task["id"])