El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.
- What's New
- Function Overview
- Product Bulletin
- Service Overview
- Getting Started
-
User Guide
- Process of CodeArts Repo
- Purchasing CodeArts
- Accessing CodeArts Repo Homepage
- Environment and Personal Settings
- Migrating Code and Syncing a Repository
- Creating a Repository
- Viewing Activities
- Viewing Repository Statistics
- Configuring Repository Settings
- Hierarchical Repository Management
- Configuring a Repository
- Managing Repo Member Permissions
- Cloning or Downloading Code Repo to a Local PC
- Uploading Code Files to CodeArts Repo
- Developing a Workflow
- Creating and Configuring a CodeArts Project
- Committing Code to CodeArts Repo and Creating a Merge Request
- Managing Merge Requests
- Managing Code Files
- Security Management
- Best Practices
-
FAQs
- Authentication
- Member Permissions
-
Uploading and Downloading Code
- "Error: Deny by project hooks setting 'default': message of commit" Is Reported When Code Repository Is Pushed from the Local Host to CodeArts Repo
- Pushing Binary Files to CodeArts Repo Failed
- Error "'origin' does not appear to be a git repository..." Is Reported When the Git Push Command Is Executed
- Error "The requested URL returned error: 401" Is Reported When HTTPS Is Used to Clone Code in CentOS
- Error "Merge branch 'master' of https://test.com Please Enter a commit" Is Reported When Pulling Code Using the Git Pull Command
- Message "fatal: refusing to merge unrelated histories" Is Displayed
- How Do I Prevent Files Containing Secrets from Being Pushed to CodeArts Repo?
- Migrating Repositories
- Merge Request
- Fork Sync
- Repository Capacity
- FAQs
-
API Reference
- Before You Start
- API Overview
- Calling APIs
-
APIs
- SSH Key
-
Repository
- Obtaining Files in a Branch Directory
- Obtaining Repository Statistics
- Obtaining Image Files of a Specific Branch in a Repository
- Modifying the Status of a Repository Referenced by a Pipeline
- Checking Whether a User Has the Repository Administrator Permission
- Setting a Repository to Public or Private
- Obtaining the Content of a Specified File in a Specified Branch of a Repository
- Obtaining a Public Template List
- Creating a Repository
- Obtaining a Repository Short ID to Generate the Details Page URL
- Querying a Commit of a Branch by Repository or Repository Group Name
- Querying Branches of a Specified Repository
- Querying a Commit of a Repository Branch by the Repository ID
- Adding a Deploy Key
- Deleting a Deploy Key
- Obtaining the Last Commit Statistics of a Repository
- Repository Statistics
- Deleting a Repository
- Viewing a Repository Creation Status
- Querying the Tag List of a Repository
- Adding a Tag
- Querying Details About a Repository
- Obtaining the number of committed code lines
- Downloading a Repository
- Creating a Protected Branch
- Deleting a Protected Branch
- Deleting Protected Branches in Batches
- Creating a Protected Tag
- Deleting a Protected Tag
- Obtaining a Repository Branch List
- Obtaining the MR List of a Repository
- Obtaining MR Details of a Repository
- Obtaining the Repository IP Address Whitelist
- Adding the Repository IP Address Whitelist
- Modifying the Repository IP Address Whitelist
- Deleting the Repository IP Address Whitelist
- Obtaining the Changes of an MR
- Associating a Repository with a Member Group
- Locking a Repository Based on the Repository Short ID
- Unlocking a Repository Based on the Repository Short ID
- Approving an MR
- Obtaining Associated Work Item Information
- Obtaining Reviewer Information Based on the Repo Short ID and Merge Request Short ID
- Obtaining the List of Changed Files
- Tenant
- Group
- Project (V2)
- RepoMember
- Commit
- File
- User
- Webhook
- Project
- Repository Management (V2)
- Review
- Application Examples
- Appendix
- Videos
- General Reference
Show all
Copied.
Repository Settings
To configure repository settings, you can choose Settings > Repository Management > Repository Settings on the repository group details page.
The default branch is selected when you enter the current repository group or create an MR. Each new repository in a repository group has a default branch - master, which can be changed at any time.
The settings take effect only for the repository group configured.
All repository members can view this page. For details about whether a repository member has repository setting permissions, refer to the Permissions page. After the setting is complete, click Submit.
Parameter |
Description |
---|---|
Pre-merge |
By default, this option is not selected. After this option is selected, the server automatically generates MR pre-merging code. 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 |
All branch names must match the regular expression specified by this parameter. If this parameter is left empty, any branch name is allowed. The value must comply with the basic branch naming rules and contain a maximum of 500 characters. Example: ^feature-[0-9a-zA-Z]+
|
Tag name rule |
All tag names must match the regular expression specified by this parameter. If this parameter is left empty, any tag name is allowed. The tag name must comply with the basic tag naming rules and contain a maximum of 500 characters. Example: ^TAG*$
|
- Byte: a group of adjacent binary digits. It is an important data unit of computers and is usually represented by B. 1 B = 8 bits.
- Character: a letter, digit, or another symbol that represents data and information.
Configuring MR Pre-merge
After an MR is created, you can customize the scripts for downloading plug-ins such as WebHook and CodeArts Pipeline. That is, you can control the downloaded code content.
- If Pre-merge is selected, the server will generate a hidden branch, indicating that the MR code has been merged. You can directly download the code that already exists in the hidden branch.
- If Pre-merge is not selected, you need to perform pre-merge on the client. That is, download the code of the MR source branch and MR target branch and perform pre-merge on the build executor.
Commands
The pre-merge commands on the server are as follows:
git init git remote add origin ${repo_url clone or download URL} git fetch origin +refs/merge-requests/${repo_MR_iid}/merge:refs/${repo_MR_iid}merge
If this option is not selected, you can perform the pre-merge operation on the client and create a clean working directory on the local host. The command is as follows:
git init git remote add origin ${repo_url clone or download URL} git fetch origin +refs/heads/${repoTargetBranch}:refs/remotes/origin/${repoTargetBranch} git checkout ${repoTargetBranch} git fetch origin +refs/merge-requests/${repo_MR_iid}/head:refs/remotes/origin/${repo_MR_iid}/head git merge refs/remotes/origin/${repo_MR_iid}/head --no-edit
Advantages
In scenarios that have high requirements on real-time build, for example, one MR may start the build of dozens or hundreds of servers, and the pre-merging result generated by the local or client may be inconsistent with that generated by the server. As a result, the build code cannot be obtained accurately and the build result is inaccurate. Pre-merging on the server can solve this problem in real time. In addition, the script building command is simpler, and developers or CIEs can better use it.
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