I like to manually mark each line as checked during code reviews. This script allows that. Blog post about it: https://fully-faltoo.com/p/reviewing-each-line-of-code/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: | |
just --list | |
review: | |
#!/usr/bin/env bash | |
cd {{invocation_directory()}} | |
source_branch_name=$(git branch --show-current) | |
review_branch_name=review-${source_branch_name} | |
git merge main | |
git checkout -b $review_branch_name | |
git reset main | |
finish-review: | |
#!/usr/bin/env bash | |
cd {{invocation_directory()}} | |
review_branch_name=$(git branch --show-current) | |
# trim "review-" from starting for source branch name | |
source_branch_name=${review_branch_name:7} | |
messages=$(git log ...main --format=%B) | |
git checkout $source_branch_name | |
git checkout $review_branch_name . --no-overlay | |
echo $messages | git commit --file - | |
git branch -D $review_branch_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment