Deeployed Peer

Quickstart

How to get started?

This page guides you through the following steps:

Install Peer to one of your GitHub repositories or organizations to accelerate your development workflow.

Download our browser extension.

Open a Pull Request with Deeployed Peer to see how we help streamline the review process and maintain high code standards.

Use realtime suggestions to improve your code reviews and catch issues before they reach production.

Give conditional approval to observe how we accelerate the merging time and enhance team productivity.

This page explains the onboarding process for GitHub, however Deeployed Peer also works with GitLab, Azure DevOps, and Bitbucket.

Before you begin

Choose one of your repositories or create one for this tutorial. You can have any desired settings for the repository.

Integration and Setup

Integrate Deeployed Peer with your GitHub account

To integrate Deeployed Peer with your GitHub account, follow these steps:

  1. Create an account - Visit the Deeployed Peer login page
  2. Login with your git provider - Click Login with GitHub
  3. Authorize - Click Authorize Deeployed-Peer

After a short while, you will be redirected to the Peer dashboard.

Install our chrome extension

Add Deeployed Peer to your repository

To add Deeployed Peer to your test repository:

  1. Access repository settings - On the Deeployed Peer dashboard, click Repositories on the sidebar.
  2. Grant repository access - Select the Only select repositories radio button
  3. Select your test repository - From the Select repositories menu, select the Deeployed Peer-test repository
  4. Install and authorize Deeployed Peer - Click Install & Authorize
  5. Complete signup if prompted - Fill out any additional information if requested

Deeployed Peer requests read and write access to your repository for code review, issue management, and pull request generation features. Deeployed Peer never stores your code.

Let Deeployed perform a code review

The following steps initiate a pull request to add a tiny and somewhat flawed Python library to your repository, triggering analysis and review from Deeployed.

Use your usual Git workflow to perform the following steps in the Deeployed-test repository:

  1. Create a branch - Create a branch named demo-branch
  2. Create a new file - In that new demo-branch branch, create a new file called trivial.py, with the following content:
def isEven(number):
    """Checks if a number is even."""
    return number % 2 == 1

def findMaximum(numbers):
    """Finds the maximum value in a list of numbers."""
    return max(numbers)

def factorial(n):
    """Calculates the factorial of a non-negative integer."""
    if n == 0:
        return 1
    return n * factorial(n + 1)
  1. Commit the file - Commit the added file to the demo-branch branch.
  2. Create a pull request - Create a pull request that proposes to merge the demo-brach branch into the main branch.

After a few moments, Peer responds to the pull request using the @Deeployed-Peer GitHub account. It performs the following actions:

  • Peer posts a comment titled Walkthrough containing analysis and commentary about the content of the pull request
  • Peer attaches a detailed code review to the pull request as another comment

Deeployed will notice some flaws with this Python and the review comment identifies these flaws and suggests improvements.

Use realtime code suggestions as you give your review

  1. Inspect code changes - Go to the tab named "Files Changed".
  2. Give your review - Select the lines 5-7. You will see Deeployed Peer is integrated to your UI if our browser extension is up and running.
  3. Write a comment - Type "You might want to handle the empty list case up front" .

In a few moments, you'll see the code suggestion given by Peer. As a reviewer, if you'd like to include this suggestion with your review, just toggle "With Suggestion" and send your comment.

This allows the author to quickly implement your desired changes.

Converse or ask Deeployed Peer for more information

After Peer reviews a pull request, you can converse with it about its review and ask for clarifications. If, in a conversation, Peer detects a convention you use, it will learn it and use in future reviews.

  1. Let us know your conventions - Post the following as a new GitHub comment attached to the pull request:

    @Deeployed-Peer We prefer to use snake case naming convention for function names.

After a few moments, Deeployed posts its reply, stating it learned the new convention and prooses a commitable suggestion to the PR.

  1. Ask questions - Post the following as another new comment:

    @Deeployed-Peer why do we need to

Clean up

Continue experimenting with Deeployed in your test repository for as long as you like. When you're finished, you can delete the repository.

You are now ready to add Deeployed to other repositories that you own, and let it review some real pull requests.