Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P7192
blockers
Active
Public
Actions
Authored by
•
mmodell
on May 30 2018, 9:31 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F18621298: blockers
May 30 2018, 9:31 PM
2018-05-30 21:31:46 (UTC+0)
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"
])
Event Timeline
•
mmodell
created this paste.
May 30 2018, 9:31 PM
2018-05-30 21:31:46 (UTC+0)
Log In to Comment