Configuring Project-Level Repo Settings
On the CodeArts Repo homepage, go to the project homepage and choose Settings > Policy Settings > Repository Settings. For details about how to set the parameters, see Table 1.
Parameter |
Description |
---|---|
Force inherit |
Optional. Once selected, all repo groups and code repos in the project use the following settings and cannot be changed. Exercise caution when selecting this option. |
Do not fork a repository |
Optional. Once selected, no one can fork the repo in the project. |
Pre-merge |
Optional. Once this is selected, the server automatically generates the pre-merge code of the MR. Compared with running commands on the client, this operation is more efficient and simple, and the build result is more accurate. This option applies to scenarios that have strict requirements on real-time build. |
Branch Name Rule |
Optional. All branch names must match the regular expression with max. 500 characters. If this field is left blank, any branch name is allowed. The rules must meet the following tag naming rules:
|
Tag Name Rule |
Optional. All tag names must match the regular expression specified by this parameter. If this field is left blank, any tag name is allowed. The basic tag naming rules must be met.
|
Configuring Project-Level Protected Branch Rules
CodeArts Repo makes code branches more secure by preventing anyone other than the administrator from committing code, preventing anyone from forcibly committing code, or from deleting the branch. You can set this branch to be protected. The procedure is as follows: On the CodeArts Repo homepage, go to the project homepage, choose Settings > Policy Settings > Protected Branch, click Create Protected Branch, and set parameters as follows.
- Enter a branch name. This parameter is mandatory. Enter a complete branch name or a branch name with wildcard characters. If a branch contains a single slash (/), the branch cannot be matched using the wildcard * due to the fnmatch syntax rule.
- You can set the push or merge permission for the administrator/project manager, committer, and developer. These two permissions cannot be granted at the same time because the protected branch cannot be forcibly pushed or merged into the code. You can create, edit, and delete protected branches in batches.
If you want all repo groups and repo in this project to use the preceding settings, select Force Inherit.
Configuring Project-Level Merge Request Rules
A merge request rule consists of three parts: merge mechanism, merge condition, MR setting, and merge method.
Parameter |
Description |
---|---|
Merge Mechanism |
Mandatory. There are two options.
|
Parameter |
Description |
---|---|
Merge Conditions |
Optional. The options are as follows:
|
Parameter |
Description |
---|---|
Do not merge your own requests |
After this parameter is selected, the Merge button is unavailable when you view the MRs created by yourself. You need to ask the person who has the permission to merge the MRs. |
Do not approve your own requests |
If you select this parameter, the Approve button is dimmed and you cannot approve your own MRs. You need to ask another person with the approve permission to approve your MRs. |
Do not review your own requests |
If you select this parameter, the Review button is dimmed and you cannot review your own MRs. You need to ask another person with the approve permission to approve your MRs. |
A repo administrator can force merge code |
The project creator and administrator roles have the permission to forcibly merge MRs. If the merging conditions are not met, these roles can click Force Merge to merge MRs. |
Allow code review and comment for merged or closed MRs |
After this parameter is selected, you can continue to review and comment on the merged MR. |
Mark the automatically merged MRs as Closed (If all commits in the B MR are included in the A MR, the B MR is automatically merged after the A MR is merged. By default, the B MR is marked as merged. You can use this parameter to mark the B MR as closed.) |
|
Cannot re-open a Closed MR |
If this option is selected, the branch merge request cannot be set back to Open after it is closed. Re-open in the upper right corner is hidden. This parameter is used for process control to prevent review history from being tampered with. |
Enable "Delete source branch after merged" when creating MRs |
After this parameter is selected, Delete source branch after merge is enabled for new MRs by default. When this function is enabled, the source branch is deleted after the merge.
|
Do not Squash |
After this parameter is selected, the Squash button is unavailable, and the entry for using this button is unavailable in the MR.
|
Enable Squash merge for new MRs |
When squash merge in Git, all changes from the branch being merged are "squashed" into a single commit, which is then appended to the current branch as a "merge commit". This can simplify the branch history. The only difference between squash merge and common merge lies in the commitment history. For common merge, the merge commitment on the current branch usually has two commit records, while squash merge has only one commit record. |
Configuring Project-Level Member Sync
On the project homepage, choose Code > Repo, and choose Settings > Security Settings > Member Sync.
After Sync Project Members is enabled, select the roles to be synced. Selected project members will be synced to the repo and repo group. The project manager will always be synced regardless of the toggle. Click the refresh button to sync all the current settings.
Adding, deleting, or modifying a project member will be automatically synced.
Sync Project Members is disabled for historical projects but enabled for new projects, and the Project manager, Committer, and Developer are selected by default.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot