Fix smaller API issues and add tests

This commit fixes two smaller issues:
1) When sending a PUT request to change the config we make sure we
return a fresh result from the cache to include all changes.
2) We do not initialize an emtpy Set for copyScores as this would
overwrite existing copyScores if no input is provided.

Tests are added to cover these cases.

Change-Id: I33ad2bc9c6993d2ee6cf380cbee25b81329c36bf
3 files changed
tree: 95f7c40f6f986966e1b78c5c1f813ef474115ccd
  1. .gitignore
  2. BUILD
  3. LICENSE
  4. README.md
  5. gr-simple-submit-rules-label-config/
  6. gr-simple-submit-rules-repo-config/
  7. plugin.html
  8. src/
  9. tests.html
README.md

Simple Submit Rules plugin

Gerrit plugin to provide simple submit rules and a rest API to configure them.

By simple, we mean any rule that can be described in one sentence. Or fits in a tweet.

Having a set of simple rules makes composition easier, thus allowing harder rules to be defined ... in a simple way :)

Of course, this plugin can't contain all the simple rules one can think of, and will only contain rules that seem popular or interesting to have.