Adding commits over branch review after it is closed does not change its review status

We have a requirement that every commit must be reviewed before being integrated into master (Git). In order to facilitate this we use feature branches, with Upsource branch review. In our CI we query Upsource API to verify that a branch review exists for the branch and that all reviewers has accepted the changes and that the review is closed. Otherwise the CI job will fail with an appropriate error.

This works very well for us, except for a scenario where a developer adds additional commits on top of the feature branch after the reviewer has accepted the branch and closed the review. In that case we still see that the branch review is accepted or closed.

My question is how can I use the API - or workflows - in order to verify that no additional commits have been added on top of a branch with an accepted and closed review? Of course we should still allow adding more commits on a feature branch, for example if the developer would like an intermediate review on a commit but has more commits to add to the feature branch. Just make them have these commits reviewed as well. 

We use Upsource 3.5 (willing to upgrade to 2017.1 if it helps), Git and Jenkins.

Thanks,

Amit

1 comment
Comment actions Permalink

Hey Amit,

It's an interesting scenario. The most complex part (if we are speaking about implementation though API) is to define whether a commit is a part of the branch. Once you have such data, you can listen to all new commits via let say VCS hooks and reopen branch review when necessary.

Anyway, here is a feature request for a custom workflow - https://youtrack.jetbrains.com/issue/UP-8584 Please watch and/or upvote it, when you have a chance.

0

Please sign in to leave a comment.