angular-cn/dev-infra/pullapprove
Andrew Scott 67e3ecc7e3 fix(dev-infra): Ensure conditions with groups do not fail verification (#37798)
There are a few changes in this PR to ensure conditions that are based
on groups (i.e. `- groups.pending.length == 0`) do not fail the verify
task:

* Remove the warning when a condition is encountered that depends on the
`groups` state. The warning will otherwise be printed once for every
file that triggers the execution of the condition (400,000+ times)
* Add an `unverifiable` flag to `GroupCondition` interface and set it to
true when an error is encountered due to attempting to get the state of
`groups` in a condition
* Ignore any unverifiable conditions when gathering unmatched
conditions. These should not be considered `unmatched` for verification
purposes.
* Print the unverifiable conditions by group in the results

Sample output:
```

┌──────────────────────────────────────────────────────────────────────────────┐
│                         PullApprove results by group                         │
└──────────────────────────────────────────────────────────────────────────────┘
Groups skipped (4 groups)
Matched conditions by Group (37 groups)
Unmatched conditions by Group (0 groups)
Unverifiable conditions by Group (3 groups)
  [public-api]
    len(groups.pending.exclude("required-minimum-review")...
    len(groups.rejected.exclude("required-minimum-review")...
  [size-tracking]
    len(groups.pending.exclude("required-minimum-review")...
    len(groups.rejected.exclude("required-minimum-review")...
  [circular-dependencies]
    len(groups.pending.exclude("required-minimum-review")...
    len(groups.rejected.exclude("required-minimum-review")...

```

PR Close #37798
2020-07-24 17:59:39 -07:00
..
BUILD.bazel refactor(dev-infra): Add support for groups in the conditions evaluator (#38164) 2020-07-23 11:05:42 -07:00
cli.ts fix(dev-infra): clean up usages within pullapprove tooling (#37338) 2020-06-04 12:43:44 -07:00
condition_evaluator.ts refactor(dev-infra): Add support for groups in the conditions evaluator (#38164) 2020-07-23 11:05:42 -07:00
group.ts fix(dev-infra): Ensure conditions with groups do not fail verification (#37798) 2020-07-24 17:59:39 -07:00
logging.ts fix(dev-infra): Ensure conditions with groups do not fail verification (#37798) 2020-07-24 17:59:39 -07:00
parse-yaml.ts refactor(dev-infra): Add support for groups in the conditions evaluator (#38164) 2020-07-23 11:05:42 -07:00
pullapprove_arrays.ts refactor(dev-infra): Add support for groups in the conditions evaluator (#38164) 2020-07-23 11:05:42 -07:00
utils.ts refactor(dev-infra): Add support for groups in the conditions evaluator (#38164) 2020-07-23 11:05:42 -07:00
verify.spec.ts refactor(dev-infra): Add support for groups in the conditions evaluator (#38164) 2020-07-23 11:05:42 -07:00
verify.ts fix(dev-infra): Ensure conditions with groups do not fail verification (#37798) 2020-07-24 17:59:39 -07:00