Upgrade to use ECA validation service for business logic
Instead of replicating validation logic in multiple locations, a new ECA validation service was created in an earlier quarter. This endpoint accepts a list of formatted commits, along with a project URL/location (in the case of Gerrit) and Provider type (Gitlab, GitHub, Gerrit).
After this upgrade, Gerrit will format commit information to match the expected data for the API, and react to the response accordingly. This will strip current business logic from the plugin to match the standard validation process.
I've started this implementation locally and will be testing the output as much as possible. I have a question about the current functionality to use RevWalking to check the previous patchset authors for the current commit against the current author. This allows authors of previous patches of a commit that have been committed by someone with commit access to commit code. The new central API doesn't care about patch sets, just the current commit, so it doesn't have a way to pass previously allowed patch authors in currently. Do we need to carry this forward?
For additional context, GitLab commits with similar situations would fail in main repositories (but not forks). This would include the case of the closest analogous situation, of an amended commit that had previously been pushed. I realize there are differences in the 2 platforms and am scratching my head while I wrap it around the issue. We can look at adding support for this case to the main validation endpoint if it's needed.