]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
pwclient: Integrate 'checks' endpoint
authorStephen Finucane <stephen.finucane@intel.com>
Tue, 21 Jul 2015 17:01:13 +0000 (18:01 +0100)
committerStephen Finucane <stephen.finucane@intel.com>
Thu, 5 Nov 2015 17:08:04 +0000 (17:08 +0000)
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
patchwork/bin/pwclient

index 76dd97b969ecb1caabda643997cdc733533bb70b..39d8f8aaa4a92c27064e483355f7c63e22cdf691 100755 (executable)
@@ -225,6 +225,11 @@ def action_projects(rpc):
                 project['linkname'], \
                 project['name']))
 
+def action_checks(rpc):
+    checks = rpc.check_list("", 0)
+    for check in checks:
+        print("%d (for '%s')" % (check['id'], check['patch']))
+
 def action_states(rpc):
     states = rpc.state_list("", 0)
     print("%-5s %s" % ("ID", "Name"))
@@ -439,6 +444,12 @@ def main():
         help='''List all projects'''
     )
     projects_parser.set_defaults(subcmd='projects')
+    checks_parser = subparsers.add_parser(
+        'checks',
+        add_help=False,
+        help='''Show list of patch checks'''
+    )
+    checks_parser.set_defaults(subcmd='checks')
     states_parser = subparsers.add_parser(
         'states',
         help='''Show list of potential patch states'''
@@ -640,6 +651,9 @@ def main():
     elif action.startswith('project'):
         action_projects(rpc)
 
+    elif action.startswith('check'):
+        action_checks(rpc)
+
     elif action.startswith('state'):
         action_states(rpc)