Skip to main content

Code reviews

info

HighFlux lets you directly create & merge pull requests on GitHub for performing code reviews.

If you haven't already, make sure you've enabled GitHub.

Typical Workflow

Working on a WIP with a GitHub code review (Pull Request) takes the following form:

Lines marked in bold indicate HighFlux operations.

  1. Create a WIP
  2. Implement the functionality
  3. Create a review (Pull Request)
  4. Do {
    1. Peers review your code and send you comments using GitHub
    2. You implement their changes
    3. Update the review with a description of what you changed
  5. } While there are no more comments from peers
  6. You merge your WIP

Sending your code for review

If your team allows non-reviewed code to be committed to trunk, and you just want to finish your task and move on to the next one, proceed to the Finish your task section now.

In addition, HighFlux contains specific support for the GitHub Pull Request flow, which is described in this section.

Creating a code review

You create a new code review using the GUI Create Review button.

Or through the CLI:

hf review create 

This will create a new PR, using the WIP's title as the description.

Shortcut: Rename your WIP while creating the PR
hf review create "my pr title"

Will create the PR with the given title, and change the WIP's title as well.

A new GitHub Pull Request will be created and linked to your WIP under a branch called "review/[WIP-ID]".

Applying code review feedback and sending for re-review

Once you implement the suggestion made by your reviewer and want to send an update for the code review, you can do so using the Update Review button, or using the CLI:

hf review update "description of update"

This will update your GitHub Pull Request with the changes made since the creation of the review, or the last time you updated the review.

Continue implementing the review changes, and updating them, until you get the approval.

Merging your Pull Request

Once your work is done, and you have gotten any optional necessary PR approvals from your peer(s), You can merge your Pull Request by issuing a CLI command:

hf review merge

or change the PR title while applying, with:

hf review merge "new title"

or using the MERGE button in the UI.

  • If no "new name for the PR" is supplied, the existing PR name will be used.

You can use the GUI to do this, by clicking on the button.

Renaming a Pull Request

Once you rename a PR, the WIP title will change and vice versa.

For instance, if your current WIP BG-123 is titled "Adding a new button", and you create a code review, the GitHub PR will have the same title.

Once you rename your WIP, either via the GUI or by hf title 'adding a new blue button', the PR's title will change as well.