In addition to aggregated pull request stats, GitClear also offers the ability to review individual pull requests that are being considered for merge. This functionality was beta launched in Q3 of 2023, and will continue to rapidly improve throughout 2023. This page will discuss the data that can be availed through GitClear's "Pull Request" tab => "Code Review" secondary tab.

link💬 Overview & Discussion

This tab frames is meant to act as the "title page" to a pull request.

Easy to toggle comparing this pull request to others

Top billing on the page goes to comparing this pull request to past PRs: either those A) in this repo B) in the entity or C) in the industry. The three dimensions compared are "Total Delta," "Open Days" and "Test Delta." The pull request being reviewed shows as a colored bar in the histogram for each graph. The bar may be colored yellow or green. The color is based largely on the Code Quality Targets you set up: if the pull request is less than target delta, has been open less than target days, and Diff Delta on tests is equal or greater than 10% of the PR's total Diff Delta.

Below the stats, you can view the author's description of the pull request that they wrote up when posting the pull request.

Finally, in the last section of the page, you will find a list of whatever comments have been left by pull request reviewers and not yet addressed by the PR's author. Below the list of unresolved comments, we also include a paginated list of pull request review comments that were already addressed.

link🎯 Quality Indicators

The second tab assess the quality of a pull request along several dimensions. Let's give them subsections.

linkQuality targets

First is whether the pull request meets the high-level goals that were set for the repo of the pull request:

How does the pull request stack up against code quality goals that were set?

The default values for these goals are described and substantiated on our Code Quality Targets help page.

linkCoupled files

Next on the page, we check whether any of the files changed by the pull request seem to be bound together:

If there are files in the PR that always get committed together, we'll show them in the "Couple files" section

As discussed at length in Software X-Rays, coupled files are suggestive that the abstraction being used within the files is insufficiently distinct. That is, if changing File A always requires an accompanying change in File B, that is very likely to become a future maintenance issue when developers join the product that may not be aware of the coupling between the two files. If possible, the purpose served by each file should be reconsidered so it becomes more distinct.

linkBiggest files and functions in pull request

In the aforementioned repo settings, you can set goals for the maximum size of a file and a function. In the tables at the bottom of the page, we'll show whether there are files or functions larger than the targets you have set:

What were the biggest functions added or changed within the pull request?

Along with an accounting of its size, and how that size changed, each function comes with links to view its contents before and after the pull request.

link💾 Commits

The commits tab matches the list of commits shown when opening a commit group in other contexts, like the Commit Activity Browser. If you want to see how the author described each commit, this is the tab to get that information.

link👨‍💻 Code Review

Finally, code! This tab shows the full change set associated with the pull request. If you have enabled sharing code lines with AI, then we'll also summarize in English what changes were made on a per-file and per-block basis.

Reviewing pull request code in the "Code" tab

Compared to other git viewers, the GitClear PR diff viewer has a number of advantages to expedite code review:

Summarization of every file, and every consequential code block. Assuming you have enabled OpenAI code sharing, our code review will include a brief synopsis of how each file changed. If there are individual change blocks in the file that are non-trivial, those too will be available to view as summaries.

More precise operation labeling. GitClear recognizes code operations that standard git viewers can't: Moved code (30% of all changes), Find & Replace code (5%) and Copy/Paste code (hopefully < 1% 🤞). Labeling moved code as such can save a great deal of time vs. reading a block of code marked as "deleted" by a traditional git viewer, that in fact was just moved to a different file.

Indicate relative volume of work per-file. The left file navigator suggests which files received the lion's share of attention during development. Files that are accompanied by a mostly- or fully-filled circle are files that had the greatest amount of Diff Delta accumulate within them. If you have a limited amount of time to review the pull request, start with the full-circle files.