Skip to content

Instantly share code, notes, and snippets.

@mekhami
Created April 30, 2018 15:05
Show Gist options
  • Save mekhami/a193487a5a352741daa7000cfc519f1b to your computer and use it in GitHub Desktop.
Save mekhami/a193487a5a352741daa7000cfc519f1b to your computer and use it in GitHub Desktop.
def mutate(root, info, name=None, desc=None, cmd=None, tags=None, task_files=None):
try:
task_dict = {}
if name:
task_dict['name'] = name
if desc:
task_dict['desc'] = desc
if cmd:
task_dict['cmd'] = cmd
if tags:
task_dict['tags'] = tags
if task_files:
task_dict['task_files'] = task_files
task = pipeline_api.update_task(args.get('uuid'), return_dict=False, agent=info.context['agent'], **task_dict)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment