Updated on 2025-07-31 GMT+08:00

Creating a Task

This section explains how to create individual or bulk check tasks from various code sources.

Prerequisites

  • Create a project.
  • (Optional) Create a code repository by referring to CodeArts Repo User Guide > "Creating a Repo".
  • (Optional) Create a third-party code repository.

Constraints

  • When the task to be deleted has a code repository with multiple branches, the deletion will be successful if there are fewer than 200 branches. Otherwise, the deletion will fail.
  • The network may be unstable or other problems may occur when a third-party repository is used.

Creating a Task to Check Code from CodeArts Repo

If you select Automatically create check task when creating a code repository in CodeArts Repo, a code check task will be created synchronously. You can view the task in the task list of CodeArts Check.

If you do not select Automatically create check task when creating a code repository, perform these steps to create a task:

  1. Access CodeArts Check.
  2. Click Create Task and configure parameters by referring to Table 1.

    Table 1 Task parameters

    Parameter

    Description

    Project

    Project that the task belongs to.

    • This parameter is set by default when you access CodeArts Check from the project entry.
    • During access through the service entry, select the project created in Creating a Project based on the site requirements.

    Code Source

    Select the source of code.

    • Select Repo to check code hosted on CodeArts Repo in the current project.

    Name

    Customize your task name.

    • Letters, digits, periods (.), underscores (_), and hyphens (-) allowed.
    • 3 to 128 characters.

    Repository

    Select the code repository to be checked.

    Default Branch

    Select the code branch to be checked.

    Language

    Select the code language to be checked. For details about the languages that can be checked, see Mainstream Programming Languages.

    If the source is a CodeArts Repo repository, the languages are automatically detected from the repository. You can remove languages but not add new ones.

  3. Click Confirm. You can view the task on the task list page of CodeArts Check.

    • To modify the task name and default branch, go to the task details page, choose Settings > Basic Info, and then modify the target task.
    • To delete a task, go to the task details page, choose Settings > Basic Info, and then delete the target task. Alternatively, click in the row where the target task is located, and choose Delete from the drop-down list.

      When the task to be deleted has a code repository with multiple branches, the deletion will be successful if there are fewer than 200 branches. Otherwise, the deletion will fail.

Creating a Check Task from a Third-Party Code Repository

  • The network may be unstable or other problems may occur when a third-party repository is used.
  • It is advised to use the code import function of CodeArts Repo for secure, stable, and efficient download and build.
  1. Access CodeArts Check.
  2. Click Create Task and configure parameters by referring to Table 2.

    Table 2 Parameters

    Parameter

    Description

    Project

    Project that the task belongs to.

    • This parameter is set by default when you access CodeArts Check from the project entry.
    • During access through the service entry, select the project created in Creating a Project based on the site requirements.

    Code Source

    Select the source of code.

    • Select Git. For code hosted on other services, use Git to pull the code.

    Name

    Customize your task name.

    Service Endpoint

    Select the service endpoint connected to the third-party repository. If no endpoint is available, create one by referring to Creating Service Endpoints.

    Repository

    Select the code repository to be checked.

    Default Branch

    Select the code branch to be checked.

    Language

    Select the code language to be checked. For details about the languages that can be checked, see Mainstream Programming Languages.

  3. Click Confirm. You can view the task on the task list page of CodeArts Check.

    • To modify the task name and default branch, go to the task details page, choose Settings > Basic Info, and then modify the target task.
    • To delete a task, go to the task details page, choose Settings > Basic Info, and then delete the target task. Alternatively, click in the row where the target task is located, and choose Delete from the drop-down list.

      When the task to be deleted has a code repository with multiple branches, the deletion will be successful if there are fewer than 200 branches. Otherwise, the deletion will fail.

Related Operations