createTask

Create a task source file in the project source or a preview branch when a new unit of work must be runnable or schedulable; returns the task source document. Requires project.runs.write.

Arguments

  • projectReferenceString!required

  • inputCreateTaskInput!required

  • input.idString!required

    Becomes the file name and the task id.

  • input.nameString!required

  • input.descriptionString

  • input.schedulableBoolean

    Whether a schedule can start the task; default true.

  • input.sourceTargetKindWriteTargetKind

    The source to write; default project. One of project, preview_branch.

  • input.targetBranchIdID

    Required with the kind preview_branch.

Responses

mutation CreateTask($projectReference: String!, $input: CreateTaskInput!) {  createTask(projectReference: $projectReference, input: $input) {    id    name    description    target    sourcePath    source    schedulable    editMode    sourceOnlyReasons  }}
{  "data": {    "createTask": {      "id": "string",      "name": "string",      "description": "string",      "target": "string",      "sourcePath": "string",      "source": "string",      "schedulable": false,      "editMode": "structured",      "sourceOnlyReasons": [        "string"      ]    }  }}

The TaskSource! in data.createTask.