Code Review
Code reviews are a critical part of the feedback cycle in any developer workflow.
Aspect Workflows includes a bot, nicknamed "Marvin", who participates in the code review.
Marvin delivers build and test results directly from Bazel's Build Event Stream to pull requests, ensuring you receive immediate notifications when a build begins to fail. This reduces the "Time to Failure" metric, helping engineers remain in the flow when their work needs fixes.
Marvin also watches the results of Linting tasks. When a lint warning or error is reported, Marvin annotates the offending line of code using GitHub's "checks" API:
If the linter tool produces a suggested fix, Marvin presents the suggestion so that the author or reviewer can easily accept it.
Installing
Ensure you have set the Skip pull request builds for existing commits setting to false in your Pipeline settings or BuildKite will build the branch and skip the PR build.
- Install the Workflows GitHub App into the GitHub repository where code reviews take place.
Navigate to https://github.com/apps/aspect-workflows and choose "Configure". Enable it for the repository where Workflows runs.
- Update the Aspect Workflows configuration to enable notifications via GitHub, for example:
notifications:
github: {}
- Request an API secret from Aspect. Populate it into the secret named
aw_api_secret_*
in your Workflows deployment. Alternatively, if you use a tool like vault, you can wire in the secret value from the Workflows terraform module outputapi_secret_id
.
A comment from Aspect Workflows should appear on the review thread of the next Workflows run.
The Code Review workflow for other tools such as GitLab and Gerrit is not currently available.