)]}'
{
  "commit": "f3ee7e0796bdee9f2a4868417b933712aa7b7d41",
  "tree": "b59085fde1e0911774842bde6163ffe00d7622b3",
  "parents": [
    "d292d85a8899e03741c16a4d7b7da4880f24a40d"
  ],
  "author": {
    "name": "Hector Oswaldo Caballero",
    "email": "hector.caballero@ericsson.com",
    "time": "Sat Feb 10 07:39:37 2018 -0500"
  },
  "committer": {
    "name": "Hector Oswaldo Caballero",
    "email": "hector.caballero@ericsson.com",
    "time": "Mon Jun 11 06:18:42 2018 -0400"
  },
  "message": "RuleBase: Read rules also from project config\n\nSo far, the rules defining the conditions and the actions affecting an\nITS issue were defined globally in \u003cgerrit_site\u003e/etc/its folder and all\nthe projects were subject to the same rules.\n\nThis can become a limitation as the handling of ITS issues can be very\ndifferent from one project to another, even if they use the same ITS.\n\nAllow rules to be defined at the project level. As with the current\nglobal rules, two files can be defined: \u0027actions.config\u0027 to define\ngeneral rules at the project level and \u0027actions-\u003cits-name\u003e.config\u0027 to\ndefine rules specific to an ITS system. These files should be created in\nthe refs/meta/config branch and, similar with what happens now with the\nglobal rules, the set of rules to be applied to an ITS issue is the sum\nof the rules defined in the two files.\n\nOnce rules are defined at the project level, the global rules, i.e.,\nthose defined in \u003cgerrit_site\u003e/etc/its, no longer have effect in the\nproject; this means, the more specific rules take precedence.\n\nAs with other project defined configurations, inheritance is honored so\nrules can be defined in a parent project. This inheritance, however, is\ncapped at the closest level, i.e., if a project defines at least one the\nrules files, the presence of these files is not evaluated for any of the\nproject\u0027s parents.\n\nReading the project configuration to look up for rules every time an\nissue is evaluated does not scale. Even if the ProjectLevelConfiguration\nis already cached to avoid re-reading the repository, caching the rules\nby project avoid re-parsing the configuration files and checking the\nproject inheritance for rules.\n\nChange-Id: I2bb00a6c2687d41c9f4d8f73a0c0387ab3cb8834\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "530e45dfdb59daefe339c85c74c189edadcd34e2",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/its/base/ItsHookModule.java",
      "new_id": "cfb616848175522b4aa35ded19b9e06e7feeb6ac",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/its/base/ItsHookModule.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "265032bc27ce40a0edc2dbbfd808bd2c575a0d30",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/ItsRulesProjectCache.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "7e37397d4c4ffa541e74b91fb503a66cbb3b8eb5",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/ItsRulesProjectCacheImpl.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "cd119a46b39812aeb7caa02ac4778b9583f89c45",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/ItsRulesProjectCacheRefresher.java"
    },
    {
      "type": "modify",
      "old_id": "fffb7a022d1706ec2d68632a93fd21f9c2cb8b5d",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBase.java",
      "new_id": "b6e4ad64e2f7287909aa52dc29168df6dc459a44",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBase.java"
    },
    {
      "type": "modify",
      "old_id": "eacc1efce8bfb3fd3d23c02d2eb65a3328826abf",
      "old_mode": 33188,
      "old_path": "src/main/resources/Documentation/config-rulebase-common.md",
      "new_id": "128dac57fac1b2d45b13d30c78db4f8ad92a5bfd",
      "new_mode": 33188,
      "new_path": "src/main/resources/Documentation/config-rulebase-common.md"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3b33b4146a1127c237b9cfcf665b5d6f72e64e3d",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/ItsRulesProjectCacheTest.java"
    },
    {
      "type": "modify",
      "old_id": "367d2b38bcb1fe860379a95899e577dc7d9974b1",
      "old_mode": 33188,
      "old_path": "src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBaseTest.java",
      "new_id": "305e8d1541bf81990f60eb6aeb04c897c848627b",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBaseTest.java"
    }
  ]
}
