Specifying include and exclude file/path patterns for pull request reviewers with Workzone makes sure that specialised teams only need to review ‘their’ code changes. This saves them time and reduces the pull request noise level.
Include and exclude path matches for reviewers and groups #
Workzone now offers to include and exclude file-paths in the reviewer configuration.
Let’s have a look at Team B first. They are responsible for every src module, except src/test.
The include path is defined as ‘src/**’ and the exclude path is ‘src/test/**’
With this configuration, a pull request changeset with changes in ‘src/test/**’ would not add Team B as reviewers.
Now we need to add a file path reviewer entry for Team A as they are responsible to review any changes to ‘src/test/**’
By adding a simple (inclusive) file path for Team A we make sure any changes to ‘src/test/**’ are reviewed by Team A and Team B is not involved.
Naturally, if the pull request changesets contain file changes in for example ‘src/main/**’ and changes in ‘src/test/js/**’ both Team A and Team B would be added as reviewers.
When the configuration is complete it can be viewed in the Workzone reviewers overview.