Code Review, Discussions and Sharing
Upsource is great place for your team to communicate with the intent of improving your code base:
- Start discussions over parts of code to pinpoint possible issues
- Start more formal code reviews on branches or revisions, in the web UI or from your IDE
- Share links to pieces of code for a quick reference
You can start discussions in code or diff views, with or without creating a formal code review.
When viewing any revision of a file, you have access to all relevant discussions from prior revisions of this file, be it within code reviews or in standalone discussions that weren't parts of formal code reviews.
Essentially, knowledge about specific files in your code base is accumulated and made available for future reference.
Anyone can request or start post-commit code review on any revision or branch.
If you prefer to review individual revisions, feel free to create code reviews from the revision list.
If you use the increasingly popular workflow of reviewing entire branches, then as soon as you click Create branch review on a branch, Upsource puts all revisions in the branch under a single code review, and makes sure to automatically add any new revisions as they appear. Branch tracking stops when a code review is closed and resumes if it's reopened later.
The code review process in Upsource is relaxed, and it doesn't impose any strict workflow:
- If a developer who made a change wants their change to be reviewed, that's fine.
- If someone else on the team wants to raise a concern over a teammate's change, they can perfectly do that by starting a code review, too.
When starting a code review, you can add one or multiple reviewers, picking the teammate(s) most proficient in the part of code that you're modifying. Upsource can suggest reviewers to you based on history of files that are being changed, as well code review history.
Reviewers are expected to examine your changes, discuss them if they aren't clear, and finally accept the changes.
You can also add teammates as watchers in code reviews so that they become aware of important changes in your code base. Watchers aren't expected to take part in the code review process, but they are kept updated of your project's status whenever an important change is made.
Developers taking part in a code review can discuss specific lines in the diff view, or add general comments to the review as a whole.
You can add new revisions to a code review if a revision originally submitted for review required further changes stemming from the discussion. Upsource will add new revisions automatically if the subject of your review is the entire branch.
Upsource tracks which revisions were already seen and approved. When new revisions are added to the code review, a reviewer only sees the diff of those revisions, and they don't have to inspect previous changes once again. To show or hide any revisions within a code review, there's a revision selector that quickly toggles revisions on and off:
You can access code reviews that you are involved in as an author, reviewer or watcher from your project's home view. Alternatively, browse all code reviews in the project, or search code reviews by author, reviewer, state, or commit ID:
You can monitor status updates in a project via personalized e-mail notifications. Alternatively, you can track the News feed in the project's home view, which displays updates such as new comments addressing you, and recently opened and closed code reviews.
If you want to get a high-level overview of code review activities in your project, there's a set of code review reports that show the share of revisions that are covered with code reviews, how many open and closed code reviews you have in your project, and which project developers are most involved in the code review process.
Code review in the IDE
We know that most developers are best seated in their IDE and prefer not to switch between tools unless absolutely necessary. Knowing this, we offer a code review plug-in for IntelliJ IDEA and other JetBrains IDEs which allows you to participate in code discussions and manage code reviews from the comfort of your IDE.
The plug-in allows viewing and creating code review comments right from the text editor, and provides a Review tool window that lists code reviews in the current Upsource project and lets you manage them.
In addition, the plug-in integrates into the IDE's own controls such as Version Control tool window and Commit Changes dialog box.
The plug-in works across all IDEs based on the IntelliJ platform, namely:
- IntelliJ IDEA (14.1+)
- PhpStorm (9.0+)
- PyCharm (4.5+)
- RubyMine (7.1+)
- WebStorm (10+)
- AppCode (3.2+)
- CLion (1.0+)
- Google Android Studio (1.2+)
In Upsource, everything has a URL and can be shared with teammates. This includes code reviews, revision diffs, discussions on code and on revisions, reports or filters applied to commit graphs (for example, all commits by developer X in time span Y).
You can even share custom selections of code in any specific revision:
When you share a URL that Upsource generates for a selection, anyone you share it with can open it and have the selection highlighted like this:
In addition to being a code review tool, Upsource is also a repository browser. Learn how you can use Upsource to browse and monitor changes in code repositories based on Git, Mercurial, Subversion and/or Perforce.
If you're a Java developer, you might also be interested to know about additional code insight features in Java projects including code inspections and advanced navigation.
Free 10-user plan included