Updated on 2024-11-22 GMT+08:00

Resolving Review Comments and Merging Code

Passing the Review Comment Gate

If the merge request gate is enabled for the target repository, the Only when all reviews and comments are resolved option is selected. The reviewers or approvers can move the cursor to the code line to which the review comment is to be added in Files Changed of the Merge Requests tab and click the icon to add reviews. Alternatively, the reviewers or approvers can directly add comments in Details > Comments of the Merge Requests.

After you resolve the review comments, on the Details > Review Comments page of the merge request, the review comment status changes from Unresolved to Resolved. Review comment gate: Passed is displayed, indicating that the merge request initiator has resolved all review comments and can merge the MR.

Pipeline Gate

If CodeArts Pipeline gates are enabled for the target repository, select Enable pipeline gate. Perform the following steps:

  1. Go to the target repo homepage. In the navigation pane on the left, choose CICD > Pipeline.
  2. Click Create Pipeline, enter the following information, click Next, and select the target template.

    • Name: Enter a custom name.
    • Pipeline Source: Select Repo.
    • Repository: Select the target code repository for which you want to create a merge request.

      Default Branch: Select the target branch of the merge request.

  3. After a task is created, the system automatically switches to the Task Orchestration tab page. Click More and select Execution Plan.
  4. Enable Merge Request and select one of the following trigger events based on your needs:

    • Create: triggered when an MR is created.
    • Update: triggered when the content or setting of an MR is updated.
    • Merge: triggered when an MR is merged. The code commit event will also be triggered.
    • Reopen: triggered upon MR reopening.

  5. Configure other information about the pipeline task and click Save and Execute.
  6. Return to CodeArts Repo and wait for the event selected in Execution Plan to be triggered for the repository to execute the CodeArts Pipeline task.

Go to the merge request details page. If the message Merge into pipeline gate: passed is displayed, the latest commit or pre-merge commit successfully starts the pipeline.

Associating Gate Control by E2E Ticket Number

If E2E ticket number association is enabled for the target repository, select Must be associated with CodeArts Req. Perform the following steps to associate the E2E ticket number:

  1. Go to the target repo, switch to the Merge Requests tab page, and click a target merge request name to access it.
  2. On the Details page, click the icon next to Associated Work Items to search for and select the target work item.
  3. Click OK. The E2E ticket number is associated.

When the merge request is successfully associated with a work item, E2E ticket number associated is displayed.

  • If the system displays a message indicating that the capacity of a single repository exceeds 2 GB and the merge is not allowed, check whether there are Git commit cache files submitted.
  • A maximum of 100 work items can be associated with an MR.