zoukankan      html  css  js  c++  java
  • Reviewboard管理员指南(5.4)—— Default Reviewers(重要)

    Default Reviewers

    The Default Reviewers list provides a way to automatically add certain users or groups to the reviewer lists on new review requests, depending on the paths of the files modified in the diff.

    This is most useful when particular review groups own parts of the tree.

    Adding Default Reviewers

    To add a new default reviewer, click the “Add” link next to the “Default reviewers” entry in the database section or theAdministrator Dashboard in the Administration UI.

    A form will appear with the following fields:

    • Name (required)

      A name describing this default reviewer. This won’t be shown to users.

    • File regex (required)

      A “regular expression” defining the file path. This is way of specifying patterns to match strings.

      See Regex Pattern Matching for more information.

    • Default groups (optional)

      One or more review groups that should be automatically added to a review request when the File regex matches a file in the diff.

      The list contains possible review groups to match. Selected entries are the groups you want to add. Hold downControl (on the PC) or Command (on the Mac) to select more than one.

      At least one group or one user should be selected for this default reviewer entry to be useful.

    • Default people (optional)

      One or more groups that should be automatically added to a review request when the File regex matches a file in the diff.

      The list contains possible users to match. Selected entries are the users you want to add. Hold down Control (on the PC) or Command (on the Mac) to select more than one.

      At least one group or one user should be selected for this default reviewer entry to be useful.

    • Repositories (optional)

      A default reviewer can be limited to one or more repositories. This is particularly useful when operating a Review Board server with many repositories ran by separate groups.

      Hold down Control (on the PC) or Command (on the Mac) to select more than one repository.

      If no repositories are selected, then this default reviewer will apply to every repository.

    Editing Default Reviewers

    To edit a default reviewer, click “Default reviewers” in the Administrator Dashboard or Database section of the Administration UI. You can then browse to the default reviewer you want to modify and click it.

    See Adding Default Reviewers for a description of each field.

    When done, click Save to save your changes.

    Deleting Default Reviewers

    To delete a default reviewer, follow the instructions in Editing Default Reviewers to find the default reviewer you want to get rid of. Then click Delete at the bottom of the page.

    Regex Pattern Matching

    Regular expressions (or “regexes”) provide a way to match potentially complex strings of text. In this case, file paths.

    A regular expression contains a mix of the text you want to match and special characters defining the pattern. Some of the more important concepts are described below:

    • Matching any number of characters

      To match any number of characters, you can use .* or .+. The period (.) means to match a single character. The asterisk (*) means to match zero or more characters. The plus (+) means to match one or more characters.

      This will often be used at the end of a directory hierarchy, if you want to match on every file or directory inside that directory.

      For example:

      /trunk/project1/src/.*
    • Matching multiple possible strings

      To match one or more possible strings (such as two possible directory names in a patch), you can place parenthesis around the text and separate the possible matches with a |.

      For example:

      /trunk/(project1|project2)/src/.*
    • Matching a period

      Periods are special characters in regular expressions. They match 1 single character, any character. To actually match a period, you can escape it with a backslash, as follows: \.

      For example:

      /trunk/project1/src/*\.c

    More operators can be found on About.com’s Python Regular Expressions guide. The above is all that’s generally needed for file paths, though.

    总结:

    很重要的特性,可以强制将Review请求发给特定人群。

  • 相关阅读:
    原创:搜索算法之两个数组取交集的算法
    原创:中文分词的逆向最大匹配算法
    搜索推荐系统根据用户搜索频率(热搜)排序
    原创:Solr Wiki 中关于Suggester(搜索推荐)的简单解读
    从海量文本中统计出前k个频率最高的词语
    原创:从海量数据中查找出前k个最小或最大值的算法(java)
    NOIWC2019 懵逼记
    BZOJ 4568: [Scoi2016]幸运数字(倍增+线性基)
    BZOJ 3207: 花神的嘲讽计划Ⅰ(莫队+哈希)
    BZOJ 3653: 谈笑风生(主席树)
  • 原文地址:https://www.cnblogs.com/zhangqingsh/p/3106514.html
Copyright © 2011-2022 走看看