Custom Workflows for semi-automated code review
At JetBrains, we make a lot of effort to help reduce the amount of boilerplate work that our users have to deal with. Even though code review is a process requiring human’s attention, there’s still room for automation. A brand new feature in the latest major release is aimed to take responsibility for routine tasks, which a code review process involves, and it’s called “Custom Workflows”.
Basically, a custom workflow is a list of triggers related to a specific action. Each trigger consists of criteria and properties. When the criteria are met, the action with the corresponding properties is performed automatically.
Since version 3.0, Upsource supports two different types of workflow – creation of reviews and assignment of review participants. Let’s see what each one is useful for.
Let’s say, we have a team where Ronald Whibley Jr. is a junior developer. He doesn’t have much experience, and the project lead Terrence Silverman wants to personally review all of his changes being made in the release branch. This is easy to set up by adding the first trigger of “create reviews automatically” workflow shown in the picture.
Also, there is a practice in this team to store release notes right in the repository, and a dedicated specialist Sofia Ivanova needs to proofread them when any changes are made to these notes. The second trigger of “create reviews automatically” workflow in the picture shows a way to automate such task.
Imagine a codebase having a module called “service-daemon”, where files are modified frequently. There’s no need to review every commit containing these files, and the team members tend to create reviews manually, on important revisions only. However, there are certain people in the project responsible for this specific module, so when a review is created it’s always a couple of them that are assigned. To eliminate the need to manually collect reviewers each time, the trigger of “assign review participants automatically” workflow shown in the picture may be added.
Triggers of both types also work well when combined. Thus, if you want to achieve a complex assignment scenario along with auto-creation of reviews, you are welcome to set it up.
There are plenty of use cases where custom workflows may help – it always depends on a team which ones are to be encountered. We continue working on this feature to provide you even more abilities of automating common things, as well as to make existing ones more flexible.
As of February 1, 2022, we will no longer sell new licenses or renewals for Upsource or Upsource user packs. We will continue to provide technical support and critical security updates until January 31, 2023. After this, no further updates or technical support will be provided. Why we are dis…
Orderly code reviews in Upsource
Code review like no other development practice relies on humans being efficient. And for most of us to achieve that, it's important to have our tasks well organized and our time well planned. Upsource takes care of a lot of things for you without any need to configure anything. For example, if y…
JIRA Workflows support in Upsource
If you're using JIRA workflows and have code review as a part of it, you'll be pleased to find out that Upsource 2017.2 can apply issue transitions automatically. Let's say you have a JIRA workflow set up that looks something like this. We won't go into detail on how to configure a JIRA workflow…
NPM support in Upsource 2017.2