Space
The intelligent code collaboration platform
Space and SpaceCode will be discontinued on June 1, 2025. Learn more → →
Create Merge Requests, Code Reviews, and Other Space Updates in IntelliJ IDEA 2021.3
Merge requests and code reviews are central to the workflow of many development teams. Developers work on a feature or bug fix on a separate Git branch, and then open a merge request when it’s time to bring these changes back to the main branch. Good news! If you use Space and IntelliJ IDEA 2021.3, all of this can be done from within the IDE!
The updated Space plugin lets you create Merge Requests and Code Reviews from the IDE. You can also mark files as viewed/not viewed, so you can keep track of where you are in a code review. You can also add reactions in code review chats to communicate with your team more easily.
Want to learn more? In this blog post, we’ll cover all updates and how to use them.
Create a free Space organization
Merge requests and code reviews from the IDE
After making a change to your project’s code base, you can request a review from one or more team members to discuss the changes. You can now also do this from the IDE!
In the Code Reviews tool window, use the + icon on the top toolbar to create a merge request or code review:
Here are the differences between the two:
- A Code Review can be associated with one or more commits, or an entire branch. It lets you and your team comment on specific lines of code and discuss the code under review.
- A Merge Request is a special kind of code review that has the intent of merging changes into a branch after the review is completed. For example, a merge request can be created to review changes on a feature branch before it is merged back into the main branch.
Let’s create a Merge Request. By default, the currently checked out branch in your IDE is selected as the source branch, and the configured main branch as the target. Click any of the branch names at the top of the tool window to make changes.
The IDE displays the commits you want to merge and lets you enter a title for the merge request. Note that you can link a merge request or code review to an issue by including the issue number in the title. As a final step, you can add team members who will review the changes. When ready, press the Create Merge Request button to send this review to Space.
When you want your team to review commits on a branch without the goal of merging to another branch, you can create a Code Review. You can filter the commits in your Git repository by author, branch, commit hash or text, and more. Similar to creating a Merge Request, you can add a title and reviewers, and then press Create Code Review.
Once you have created an intellij merge request or a pycharm merge request for example, it will be visible in Space and in the IDE, and your team can inspect changes and add comments.
Mark files as viewed
Space tracks which files you have (and haven’t) reviewed. In larger code reviews, this is especially helpful so you don’t miss any files while reviewing, and to keep track of files you want to review later.
Files you haven’t reviewed yet are marked with blue dots that are cleared automatically after you open them for review. If you want to return to the changes later, you can use the option Mark as Not Viewed from the context menu.
The viewed/not viewed status is synchronized across Space clients, so you can continue reviewing code later in the Space web or desktop application from where you left off.
Reactions in code review chats in IDE
Sometimes you may want to quickly react with :eyes: to show you’re looking into something. And sometimes, a long-awaited change deserves a :partyparrot:. Whatever the reason for a given reaction in a code review, the Space plugin now lets you view and add reactions in code review chats.
Conclusion
The 2021.3 release of the Space plugin brings many improvements to reviewing code in the IDE. You can now create and review merge requests from within the IDE, add comments and reactions, and mark files as viewed/not viewed to keep track of where you are in a code review.
Space integration is bundled with IntelliJ IDEA and PyCharm, and you can install the Space plugin in any JetBrains IDE such as WebStorm, DataGrip, Rider, and so on. Try it out in your JetBrains IDE!
P.S.: You can create a Space organization for free, and easily mirror an existing Git repository to get all the benefits of Space Code Reviews in IntelliJ IDEA.