Android下的配置管理之道之gerrt自定义Review Labels

本文探讨了在Android开发中如何进行配置管理,特别是如何在gerrit中自定义Review Labels。通过示例展示了如何创建一个与Verified行为相同但具有不同名称的新标签,该操作涉及修改All-Projects仓库的project.config文件。
摘要由CSDN通过智能技术生成

gerrit 默认提供2个label。

 
Label: Code-Review
他的值可以是 -2  ~  +2 之间

-2表示 这个提交不应该被合入,
-1
0
+1
+2 只有+2了之后这个提交才能被合入,也就是submit那个按钮才会出现。 Any +2 enables submit

Label: Verified

 -1 Fails

    Tried to compile, but got a compile error, or tried to run tests, but one or more tests did not pass.

    Any -1 blocks submit.


0 No score

    Didn’t try to perform the verification tasks.


+1 Verified

    Compiled (and ran tests) successfully.

    Any +1 enables submit.



这2个标签都是在All-Projects仓库的refs/meta/config 下面的 project.config 文件中配置的。

[label "Code-Review"]
    function = MaxWithBlock
    copyMinScore = true
    value = -2 This shall not be merged
    value = -1 I would prefer this is not merged as is
    value =  0 No score
    value = +1 Looks good to me, but someone else must approve
    value = +2 Looks good to me, approved
[label "Verified"]
    value = -1 Fails
    value =  0 No score
    value = +1 Verified

当然我们可以自己添加 自定义的 标签


label.Label-Name

		The name for a label, consisting only of alphanumeric characters and -.

label.Label-Name.value

		A multi-valued key whose values are of the form "<#> Value description text". The <#> may be any positive or negative number with an optional leading +.


label.Label-Name.defaultValue

		The default value (or score) for the label. The defaultValue must be within the range of valid label values. It is an optional label setting, if not defined the defaultValue for the label will be 0. When a defaultValue is defined, 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值