openmicroscopy/snoopycrimecop — pull request #145 by sbesson (2014-02-12 11:59:19+00:00)
Title: Refactor default filters and whitelisting logic

Following #143, this PR provides an additional round of filter refactoring in preparation of 0.5.0. Main changes are summarised below:

- all the whitelisting/blacklisting logic is now handled via the `user:USER` key value pair of the exclude/include filter.
- two special cases are defined: `user:org` and `user:all` to include organisation members and/or all users. This has consequences for the GitHub user and organization named `org` and `all`.
- whitelisting logic is refactored and unit tests are added (closes #127)
- all include/exclude filters are now appended to the default set of filters specified by the `--default/-D` option, i.e. the following should be truly equivalent

```
scc merge -D org -I label:mylabel - E org/repo#22 -E user:baduser
scc merge -D none -I user:org -I label:include -E label:breaking -E label:exclude -I label:my label - E org/repo#2 -E user:baduser
```
- unit tests for the filter input are reviewed to test these combinations of default, include and exclude filter
- the filtered command help and filter logging info are reviewed to account for all the changes above