Michael Müller
08 Nov, 2023

SemanticDiff GitHub Beta Now Supports Private Repos

Our SemanticDiff GitHub App got support for accessing private repositories, as well as review features like adding comments.

We are excited to announce that the public beta of our SemanticDiff GitHub App now supports private repositories and review features. Read on to find out how to review private pull requests with your team using a programming language aware diff.

SemanticDiff GitHup App in action
SemanticDiff GitHup App in action

What is SemanticDiff?

For those unfamiliar with our GitHub App, here is a short recap what SemanticDiff is and how it can support you.

The main part of reviewing a pull request is understanding how the code has changed. For this, Github displays which lines have been added and removed. While such a line based diff is great for unstructured text, it is far from perfect for comparing source code. For example, adding line breaks or replacing a decimal with an equivalent hex literal may change the text, but it doesn’t modify the meaning of the code. Such changes introduce visual noise that the reviewer must mentally filter out.

This is where SemanticDiff comes into play. Our approach takes the rules/grammar of the programming language into account to generate an enhanced diff. It hides many of these irrelevant changes and displays annotations for moved code blocks and other refactorings. For example, you can see how code was moved within a file and compare the old and new locations side-by-side to spot any changes. SemanticDiff supports C#, (S)CSS, Go, Java, JavaScript, Python, and TypeScript.

Private Repositories

We are happy to announce that our GitHub App now also supports private repositories. As part of this change we added a login system based on GitHub OAuth. This allows users to log in at app.semanticidff.com and immediately access all the repositories they are part of and that have our GitHub App installed. Since we are using the user’s OAuth token to talk to GitHub, there is no configuration required and all permissions checks are performed by GitHub.

From a user perspective, this means that you will now see a Login via GitHub button in the top right corner. This will take you to the GitHub OAuth authorization screen the first time you log in. Once authenticated, the button will be replaced with your avatar, which you can click to access your list of repositories:

User menu in GitHub App

From here you can browse your repositories, view the list of open the pull requests and open them with our diff viewer. Everything works the same way as it did before with public repositories, except that you can now also write review comments as explained in the next section.

Reviewing Code

When you’re reviewing a pull request with SemanticDiff and spot a mistake, you might want to add a comment. While it was already possible to view existing GitHub comments, it was not yet possible to add new ones or reply to them. With our latest update, you can do your review directly in our GitHub App.

To add a review comment, simply click on the gray marker next to the line numbers and drag your mouse to select all the relevant lines. Then click the plus sign to open a comment box, type your comment, and click Submit.

Add a comment with SemanticDiff

All new comments are added as part of a review. Once you’re satisfied with your comments, you can submit the review, similar to the way you would submit a review in the GitHub interface. Click the Finish Review button next to the pull request details, optionally enter a description, and click Submit review.

Finish a review with SemanticDiff

To give you and your team the most flexibility, all your review actions are instantly synchronized with GitHub. So no matter what interface someone is using, they can all see and respond to the same comments. You can even start a review in GitHub and finish it later in SemanticDiff.

Join Public Beta

Does this sound interesting? The SemanticDiff GitHub App is currently available as public beta with no strings attached. You can use it for free for both personal and commercial use with as many repositories as you like. Just check out our beta page to find out how to get started:

Join Public Beta

Even though feedback is not a requirement, we still love to hear what you think about it and whether you encountered any issues. You can reach us through our public issue tracker or via email at support@semanticdiff.com.

Recent Articles

SemanticDiff vs. Difftastic: How do they differ?
SemanticDiff vs. Difftastic: How do they differ?

Both tools aim to provide a better diff, but which one fits your needs? We compared their inner workings, features, and workflow integration to help you decide.

Read More
Unicode tricks in pull requests: Do review tools warn us?
Unicode tricks in pull requests: Do review tools warn us?

How well do GitHub, GitLab and Bitbucket support reviewers in finding malicious code changes in pull requests? Let’s give it a test.

Read More
SemanticDiff 0.8.8: Support For Rust And More
SemanticDiff 0.8.8: Support For Rust And More

The eight beta release of our VS Code extension / GitHub App SemanticDiff adds support for Rust, new invariances and other enhancements.

Read More