gitlab mr wip 怎么弄成,GitLab:有没有办法给分支分配状态/评论?

本文介绍了如何利用GitLab解决在管理多个Linux内核仓库时遇到的问题,如用户手动更新分支表格导致的遗漏。作者建议通过创建GitLab issue跟踪每个任务,并使用merge request(MR)进行工作流程,确保每个分支的状态、描述和相关信息都记录在MR中。这种方法有助于保持分支信息的更新,同时减少了手动操作的错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I'm planning to use GitLab to manage Git repositories (mainly Linux kernels from various hardware vendors).

Currently, I'm using Gitolite to manage users on Git server and MediaWiki to have what a call a "branch table"; in other words, a table where the single users report:

branch name (e.g. xboard-feat-i2c2)

branch maintainer

short branch description (e.g. "started from rev 2.0.0, feature branch to implement i2c2 driver on custom hostboard X")

branch status (WIP, testing, ready to merge, aborted)

branch longer informations (e.g. "to build this branch you have to change this and do that (in respect to the default instruction). We currently have a problem on this.." and so on). On this section I also usually write reference to the test bed/test suite used to test this specific software.

The main problem here is that the above table is created manually, and sometimes, users forget to add branches or rename them.

I'm wondering whether there's a place in GitLab (or a similar tool) to insert this piece of information.

I'm currently planning to force the user create a README (or a BRANCHREADME, to avoid conflicts) on the root of the repository as explained here with all the required information and I'm wondering whether there's a way to create a new page in GitLab project to show all the README informations for the various branches.

解决方案

My solution to my own problems, after working daily for a couple of year with GitLab to manage many project is as follows:

create an issue for everything (bug, new feature ecc). Describe the problem/idea and not how you're solving it

when start working create a new MR (this can be done with the button into the issue itself). This generate both a working branch and the MR (as WIP)

explain what you're doing into the MR

once the work is done, remove the WIP from the title and, either:

merge the MR and delete the branch

or: close the MR and delete the branch if it's not useful.

Please note that, even if you close the MR and delete the branch, the commit will stay there (even if not "directly" accessible via git), so you're not loosing anything of your work.

You can also use the same workflow when "reworking" a branch: I don't want to miss the original implementation (because I can add bugs/issue during the rework) so:

- create a new branch, with a suffix of revision (e.g. -v1, -v2 and so on)

- create a new MR for this branch, writing down what your rework/review

- comment the original MR or the new one (it doesn't really matters) with a reference to the other MR (so they are "linked")

- close the original MR and delete its branch

This allows me to both have a low number of open branch per project (usually are merged or closed) but have documentation about the work done and never loose a single commit

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值