Updated on 2025-03-13 GMT+08:00

Configuring Code Commit Rules

Constraints

To configure commit rules for a repository, you need to have the necessary permissions. For details, see Configuring Repo-Level Permissions.

Creating Commit Rules for a Repository

CodeArts Repo allows you to create verification and restriction rules for code commits to ensure code quality. You can select Inherit from project to automatically inherit and use the project settings. The settings cannot be modified.

You can also access the repo homepage of the code to be configured and choose Settings > Policy Settings > Commit Rules.

  1. Set commit rules by referring to Table 1. This configuration takes effect for all branches in the repository.
  2. If you want to configure commit rules for a specified branch, click Create Commit Rules, and refer to Table 2 for filling out the parameters. For common regular expression examples, see Table 3.

If you want to manage the created code commit rules, see Managing Commit Rules.