Configuring Protected Branch Rules
Protected Branch Rules Overview
CodeArts Repo makes a code branch 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.
Constraints
Project manager or project administrator can configure project-level protected branch rules. For details, see Configuring Project-Level Permissions.
Configuring Protected Branch Rules
The process is as follows:
If you want all repository groups and repositories in this project to use the preceding settings, select Force Inherit.
- On the CodeArts Repo homepage, access the Scrum_Test project, choose Settings > Policy Settings > Protected Branches, and click Create Protected Branch, as shown in the following figure.
Figure 1 Project-level protected branch page
- As shown in the following figure, Branch_* indicates that all branches starting with Branch_ are protected branches, and only codehub_mtest_022 can be pushed and merged.
If a branch contains a single slash (/), the branch cannot be matched using the wildcard * due to the fnmatch syntax rule.
Related Operations
When you commit a code file, if an error message indicating you have no permission to commit to the target protected branch (DEV-23-8040) is displayed, the branch you are committing is a protected branch and you need to contact an administrator to grant you the commit permission.
Video Tutorial
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