V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
BigUncleLee
V2EX  ›  程序员

请问 gitlab 为什么不是 Assignee 也能 merge

  •  
  •   BigUncleLee · 2017-08-02 10:11:27 +08:00 · 7886 次点击
    这是一个创建于 2430 天前的主题,其中的信息可能已经有所发展或是发生改变。

    使用 gitlab 提交 merge request 后,指定了 Assignee
    本以为只有指定人才有权限 merge
    但提交了 merge request 后,竟跳转到了 review 的界面
    自己就可以点 merge -。-
    和其它同事确认了一下,每个人都能找到这次 request 并且 merge

    7 条回复    2017-08-02 11:59:30 +08:00
    exch4nge
        1
    exch4nge  
       2017-08-02 10:27:50 +08:00   ❤️ 1
    只要有对 被 merge 的分支 的提交权限的人应该都可以 merge

    所以一般,假设 dev 是开发分支的话,会对 dev 设置保护,只能由某一个或几个人有对 dev 的提交权限,然后这一个或几个人才能合并 将要 merge 到 dev 分支的 merge request。
    heww
        2
    heww  
       2017-08-02 10:37:51 +08:00
    设置分支保护,用 API 写个小程序,review 通过后自动 accept mr。

    Assignee 这个功能你把它想像成只是告诉被指派的人你可以 review 了。
    BigUncleLee
        3
    BigUncleLee  
    OP
       2017-08-02 11:19:49 +08:00
    @exch4nge
    对 branch 的 protect 控制
    merge 权限和 push 权限是分开的吧?
    BigUncleLee
        4
    BigUncleLee  
    OP
       2017-08-02 11:21:23 +08:00
    @heww
    这和我想象的不一样
    这个功能的设计应该是指定的 Assignee 才有权 merge
    别人包括自己 是没有办法 merge 的才合理吧
    timwei
        5
    timwei  
       2017-08-02 11:43:16 +08:00   ❤️ 1
    @BigUncleLee

    那是 Approvers

    Assignee 只是纪录谁正在负责这 PR

    Approver 没设定过,任何有 write 权限的用户都可以 merge PR
    timwei
        6
    timwei  
       2017-08-02 11:45:08 +08:00
    "If you set specific approvers, only they will be able to approve the merge request. If you do not, anyone with developer permission or higher will be able to approve the merge request."

    Ref:
    https://about.gitlab.com/2015/07/29/feature-highlight-merge-request-approvals/
    BigUncleLee
        7
    BigUncleLee  
    OP
       2017-08-02 11:59:30 +08:00
    @timwei
    [Introduced in GitLab Enterprise Edition 7.12, available in GitLab Enterprise Edition Starter.]
    我部署的是 GitLab Community Edition 9.3.8 T.T
    查了下 Enterprise Edition Starter (EES) 下面有一条 [Multiple approvals in code review ] T.T
    非常感谢!!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1013 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 19:40 · PVG 03:40 · LAX 12:40 · JFK 15:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.