|
| 1 | +--- |
| 2 | +title: Overview |
| 3 | +--- |
| 4 | + |
| 5 | +import ImageSection from "@/components/ImageSection" |
| 6 | +import { Callout } from "fumadocs-ui/components/callout" |
| 7 | + |
| 8 | +# Butler Review |
| 9 | + |
| 10 | +Butler Review is a new approach to code review that focuses on reviewing code |
| 11 | +as a series of evolving patches rather than a unified diff of a whole branch. |
| 12 | + |
| 13 | +<ImageSection |
| 14 | + alt="Butler Review" |
| 15 | + src="/review/branch.png" |
| 16 | + subtitle="A patch series in Butler Review" |
| 17 | +/> |
| 18 | + |
| 19 | +## Why Butler Review? |
| 20 | + |
| 21 | +Traditional code review tools like GitHub and GitLab show changes as a single |
| 22 | +diff of the entire branch. This makes it hard to review changes in a branch |
| 23 | +incrementally, especially when the branch is large. It also discourages creating |
| 24 | +good commit or commit messages, since they are all sqaushed in review and |
| 25 | +messages are difficult to find and unrelated to the code review UI. |
| 26 | + |
| 27 | +Butler Review approaches the problem differently, by making it easy to review |
| 28 | +individual commits as patches and tracking changes to the series when you rebase |
| 29 | +or amend the branch. |
| 30 | + |
| 31 | +This makes it easier to review changes incrementally and evolve a series rather |
| 32 | +than pushing poor commits to the branch to address feedback. |
| 33 | + |
| 34 | +## Enabling Butler Review |
| 35 | + |
| 36 | +To start using Butler Reviews, you need to enable the feature in your GitButler |
| 37 | +client in the project settings. Click the gear icon in the bottom left corner of |
| 38 | +the GitButler client and go to the Server tab. |
| 39 | + |
| 40 | +<ImageSection alt="Review Setting" src="/review/settings.png" subtitle="Turning on Butler Review" /> |
| 41 | + |
| 42 | +Once you enable Butler Review, you can start creating reviews for your branches. |
| 43 | + |
| 44 | +## Creating a Review |
| 45 | + |
| 46 | +Once you have enabled Butler Review for a project, you can create a review for |
| 47 | +a branch by clicking the new "Create Butler Review" button in the branch header card. |
| 48 | + |
| 49 | +<ImageSection |
| 50 | + alt="Create Review" |
| 51 | + src="/review/create-review.png" |
| 52 | + subtitle="Creating a Butler Review" |
| 53 | +/> |
| 54 | + |
| 55 | +Once you create a review, you will see a new card in the branch header that |
| 56 | +shows the status of the review. |
| 57 | + |
| 58 | +<ImageSection |
| 59 | + alt="Butler Review Card" |
| 60 | + src="/review/review-card.png" |
| 61 | + subtitle="Butler Review Card" |
| 62 | +/> |
| 63 | + |
| 64 | +If you have GitHub integration enabled, you will see a dropdown to let you choose |
| 65 | +to create a PR or a Butler Review. You can also create both, in either order and |
| 66 | +they will be linked together. |
| 67 | + |
| 68 | +<ImageSection |
| 69 | + alt="Butler Review Card" |
| 70 | + src="/review/review-card-both.png" |
| 71 | + subtitle="Branch header card with both PR and BR status" |
| 72 | +/> |
| 73 | + |
| 74 | +Once a Review has been opened, you will have a URL that you can share with your |
| 75 | +team to get feedback on your changes. |
| 76 | + |
| 77 | +## Reviewing a Series |
| 78 | + |
| 79 | +When a reviewer opens a review, they will see a list of patches that make up the branch. |
| 80 | + |
| 81 | +<ImageSection |
| 82 | + alt="Butler Review" |
| 83 | + src="/review/branch.png" |
| 84 | + subtitle="A patch series in Butler Review" |
| 85 | +/> |
| 86 | + |
| 87 | +<Callout type="warn"> |
| 88 | + Currently, all reviews are "unlisted", meaning that anyone with the URL can see the review. |
| 89 | + In the future, we will implement fully public and fully private reviews, but currently all reviews |
| 90 | + are unlisted. |
| 91 | + |
| 92 | +However, if someone has the URL, they will only be able to see the patch data, |
| 93 | +they will not have access to all of your source code, nor will they be able to make changes, |
| 94 | +only approve or request changes. |
| 95 | + |
| 96 | +</Callout> |
| 97 | + |
| 98 | +Now the reviewer can hit "Start Review" to start reviewing the patches in the series. |
| 99 | +It will start them at the "bottom", the first patch and they can work their way up. |
| 100 | +The reviewer can also click on a patch to go directly to it. |
| 101 | + |
| 102 | +## Reviewing a Patch |
| 103 | + |
| 104 | +Once a reviewer starts reviewing a patch, they will see the changes in the commit |
| 105 | +and a chat window to leave comments. |
| 106 | + |
| 107 | +<ImageSection alt="Reviewing a Patch" src="/review/patch2.png" subtitle="Reviewing a Patch" /> |
| 108 | + |
| 109 | +The reviewer can leave comments on the patch, approve the patch, or request changes. |
| 110 | +The chat discussion is real time, so reviewers can discuss the changes with the author |
| 111 | +as they review the patch. |
| 112 | + |
| 113 | +You can also select lines of code to comment on. This will highlight the line in the |
| 114 | +diff and show the comment in the chat window. |
| 115 | + |
| 116 | +Every patch needs to be approved before the branch is considered approved. |
| 117 | + |
| 118 | +## Requesting Changes |
| 119 | + |
| 120 | +A reviewer can either approve a patch or request changes. If they request changes, |
| 121 | +the author can amend that specific commit and publish the changes to the review. |
| 122 | + |
| 123 | +Reviewers will be able to see in the chat that a new version of the patch has been |
| 124 | +published and they can review the changes again. |
| 125 | + |
| 126 | +<Callout> |
| 127 | + Currently we don't have interdiffs, so reviewers will need to review the entire patch again. We |
| 128 | + plan to add interdiffs in the very near future. |
| 129 | +</Callout> |
| 130 | + |
| 131 | +## Approving a Patch |
| 132 | + |
| 133 | +Once a reviewer is happy with a patch, they can approve it. This will mark the patch |
| 134 | +as approved and move the reviewer to the next patch in the series. |
| 135 | + |
| 136 | +## Closing a Review |
| 137 | + |
| 138 | +Once the branch has been merged, it will automatically mark the review as closed. |
| 139 | +The author can also manually close the review if they decide to abandon the series. |
0 commit comments