Associate Gitlab code change events with TAPD business objects (requirements, defects, tasks) [Nanny-level tutorial]

First, the purpose

After configuration, records of modifications to business objects (requirements, defects, tasks) are left, so that the same business can trace the specific code< a change record of i=2>.

In fact, many automated tasks can be completedInsert image description here

2. Principle

Gitlab association is implemented through Webhook, by configuring the Gitlab code base and monitoring specific code< /span>
Notify TAPD via HTTP POST (with a timeout of 5 seconds). TAPD will match the source code keyword sent by this webhook to the corresponding business object. change event.
Insert image description here

3. Configuration

Correspond to the project leader

TAPD end

The webhook of each project is different, and the prerequisite is that 管理员 permissions are provided.

Step 1:设置-应用设置-源码设置 (if you don’t see 设置Menu, but there is no permission)

If not enabled, click 启用.
Insert image description here

启用Then enter here to operate

Insert image description here
This may also be the caseDevOps!

Second step: Enter 【项目设置】 > 【应用设置】 > 【源码配置】.

Insert image description here

OR:进入【项目设置】>【DevOps配置】>【代码关联】 ,Choose Gitlab.

[External link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly (img-MKGmIDmw-1691560373075)(http://tmpbbs.ztc.ztccloud.com.cn:6875/developers-server /rest/file/group1/2023/08/09/B9D0C8AE6330C06377E8B1B7B2AE012E.png)]

3. Copy the obtained Webhook configuration information.

Gitlab side

1. Open Gitlab, and in "Code Project Settings", select Webhooks Settings a>, and fill in the configuration information.
Insert image description here

About推送事件/合并请求 can be checked.
Insert image description here

You can test it after adding it, but because the specification is unqualified, TAPD will not record this request.
Insert image description here

4. Instructions for use

(used by developers)

Step 1: Copy the source code submission keyword.
Insert image description here

Step 2: Paste the source code submission keyword into the Gitlab code submission message.
Insert image description here

Step 3: After the association is successful, you can see the associated source code submission information on the "Gitlab Submit" tab page in the TAPD requirements.
Insert image description here
If you accidentally fill in the wrong form and it is not automatically associated, you can also search to associate it .
Insert image description here

ordisassociate
Insert image description here

5. Statistics

  • Submission trend statistics
    Used in conjunction with the project "Gitlab/Github/Tencent Worker Bee SVN" application, you can instantly learn the team's code submission trend.
  • Member contribution statistics
    Used with the "Gitlab/Github/Tencent Worker Bee/SVN" application under the project, you can instantly learn the statistics of individual member submissions.
    Insert image description here

6. Advanced Chapter (Expansion)

Restrict people who submit substandard information
Is this the case?
Insert image description here

Demonstrate random submission and do not follow the rules and standards. Insert image description hereThe submission has been restricted by the servergitlabInsert image description here
This configuration will restrict all projects in the GITLAB warehouse, and submissions must meet the standards. For the time being, Not consistent with the situation.

If you are interested in this, you can refer to the detailed tutorial reference link: https://blog.51cto.com/riverxyz/5414756

Supongo que te gusta

Origin blog.csdn.net/m0_37680500/article/details/132186561
Recomendado
Clasificación