1 Download and Upgrade to 15.0+ Series
2 New Features of ZenTao 15 Series
3 Interface Changes of 15 Series
4 Update to the Latest Version
5 Quick Start of 15 Series
6. Basic Application of Version 15
6.1 Beginner
6.2 Add Integrally
6.3 API Library
7. Base On The Roles
7.1. Admin
7.1.1 Edit Departments and Team Members
7.1.2 Edit Users
7.1.3 Edit Privilege
7.2. Program Leader
7.2.1 Create a Program
7.2.2 Link to Products
7.2.3 Create a Project
7.2.4 Manage Staffs
7.2.5 Add a Program Stakeholder
7.3. Product Owner
7.3.1 Create a Product
7.3.2 Edit Modules
7.3.3 Product Multi-branch/Platform Management
7.3.4 Edit Plans
7.3.5 Edit Stories
7.3.6 Review a Story
7.3.7 Create a Release
7.3.8 Tracking Progress
7.4. Project Manager
7.4.1 Edit Projects and Execution
7.4.2 Edit Teams
7.4.3 Link to Stories
7.4.4 Split Tasks
7.4.5 Tracking Progress
7.4.6 Waterfall Project
7.4.7 Kanban Project
7.5. Development Team
7.5.1 Apply for Tasks and Bugs
7.5.2 Update Status
7.5.3 Complete Tasks and Bugs
7.5.4 Submit Codes
7.5.5 The General Kanban, Story Kanban, Bug Kanban, and Task Kanban
7.6. Test Team
7.6.1 Edit Users' Case
7.6.2 Execute Users' Case
7.6.3 Submit a Bug
7.6.4 Test and Close a Bug
8. DevOps Features
8.1 Git/SVN Repository Management and Viewing Code
8.2. Integrate GitLab
8.2.1 Integrate GitLab, Bind Users, Link to Issues and Create a Build
8.2.2 Integrate GitLab and Submit the Merge Requests
8.2.3 GitLab Privilege in ZenTao
8.3 Integrate Jenkins and Create a Build
8.4 Integrate SonarQube
9 General Kanban
10. Backstage Settings of Version 15
10.1 Desktop
10.2 Model
10.3 Custom
10.4. Message
10.4.1 Mail
10.4.2 Webhook
10.4.3 Browser
10.4.4 Settings
10.5 Extension
10.6 Secondary Development
10.7 System
10.8 Import Jira Data
10.9 Registration Menu and Privilege
11. Privileges Management and Access Control of Version 15
11.1 Privileges Management and Access Control for Programs
11.2 Privileges Management and Access Control for Products
11.3 Privileges Management and Access Control for Projects
11.4 Privileges Management and Access Control for Executions
11.5 Access Control and Data Relationships for Projects and Executions

Integrate GitLab and Submit the Merge Requests

2022-01-28 15:20:36
Hongyan
1914
Last edited by Hongyan on 2022-02-08 16:12:14
Share links

Integrate GitLab and Submit the Merge Requests

ZenTao Open Source Version 15.5 has added the function of creating Merge Requests in GitLab.

 

Merge Requests (MR) are the foundation of GitLab as code collaboration and version control, as well as a way to check source code changes into branches, allowing visualization and collaboration on code changes before merging.

  • When working on a Git-based platform, you can use branching strategies to collaborate on code.
  • Branching is especially important when collaborating with others, it can help avoid pushing changes directly to the default branch without prior review, testing, and approval.
  • When creating new feature branches, changing files, and pushing them to GitLab, you can optionally create an MR to merge one branch into another.
  • The branch to which you add changes is called the source branch, and the branch to which you request to merge the changes is called the target branch.
  • The target branch can be the default branch or any other branch, depending on the branching strategy you choose.
  • Assign MR to colleagues for review.
  • Select Assignee to designate someone to be responsible for the first review of the merge request.

Next, we introduce the specific use of integrating GitLab and submitting merge requests in ZenTao.

 

Before creating a Merge Request, you need to make sure that the GitLab server is added under the GitLab of DevOps, and the zenTao user and GitLab user have been bonded together.

1. Create a Merge Request

Click on the DevOps -- Merge Request page, and the Create button in the top right corner. 

In the Create Merge Request page:

  • GitLab: Choose a GitLab server address.
  • Source project and source branch: Fill in the name of the project and branch whose code needs to be merged.
  • Target project and target branch: Fill in the project name and branch name of the project to which the merged code is to be merged.
  • Assignee: A list of ZenTao users who have bound GitLab accounts. If no user is assigned to the list, you need to go to the GitLab list for user binding. 

Successfully created MR can be viewed in the merge request list. 

2. Edit and delete an MR

MR can be edited and deleted through the Edit and Delete buttons to the right of the merge request list.

When editing a merge request, you can only edit the branch name of the Target Project, Name, Description, and Assignee. 

3. Details of the merge request

After an MR is created, its status can be viewed in the merge request list.

 

Merge status is all open after an MR is successfully created. Merge status includes "can be merged", "can't be merged", ''merged', ''checking'', and "closed".

 

When the merge status in ZenTao is not the same as the status in GitLab, you can manually refresh the merge request list page or wait for the background synchronization. The background is synchronized every 5 minutes. 


3.1 Can be merged

When you click to view the details of the MR, the button Accept Merge request is displayed, and you can directly click to complete the merge request. 

 3.2 Can't be merged

When there are no new commits or there are conflicts, it is displayed as "can't be merged automatically".

 

If there is a conflict, you can manually merge through the prompt command, and the merge request will be automatically passed after the manual merge. 

3.3 Merged

Merged successfully. 

3.4 Checking

After the merge request is submitted, GitLab will compare the differences between the two branches to check whether it can be merged, so there will be a temporary state of "checking", and you can refresh the current page to view the GitLab check result.

4. Create a backlog of merge requests for assignees

After the merge request is created successfully, a to-do of the merge request is created by default for the assignee. 


The assignee can view the merge request in GitLab by clicking the link in the backlog of the merge request. 


View the merge requests in GitLab and make a response. 

Write a Comment
Comment will be posted after it is reviewed.