This tool is designed to streamline the code review process by integrating with GitHub's API. It checks out a pull request (PR) branch, generates patches, and inserts GNU patch(1)-style diff comments, indicating where previous reviewers have left comments. This allows a user to conveniently review a pull request without distractions of the review comments, enhancing the efficiency of the review process.
It is targeted to noobs to a project who wants to understand the project code base better by reviewing past and present pul request without comment distractions.
The project consists of a Rust-based CLI tool and a library that can also be compiled to WebAssembly (WASM), allowing for flexible use in various environments.
- Rust and Cargo (latest stable version): Install Rust
- Git (for cloning the repository)
-
Clone the Repository:
git clone https://github.com/Extheoisah/fresheyes-ref-impl.git cd fresheyes-ref-impl
-
Build the Project:
make build-all
This command compiles the project (server and client) and generates an executable in
target/release/
.
Upon first use, the tool will prompt you for your GitHub personal access token. This token will be stored in memory for the duration of the session and will be used for all subsequent GitHub API calls. If you prefer not to enter the token every time you start a new session, you can manually create a .fresheyes
file in your home directory and store your token there:
echo "your_github_token" > ~/.fresheyes/fresheyes
Replace "your_github_token" with your actual GitHub token. This step is optional but recommended for convenience.
Follow this guide to create your Personal Access Token.
Select "all repositories" if you intend to use this tool with future repositories or repositories you haven't forked yet
- Administration
- Contents
- Pull requests
After installation, you can run the CLI tool as follows:
cargo run -- owner repo pr_number
owner
: GitHub username or organization name owning the repository.repo
: Repository name.pr_number
: Pull request number.
Example:
cargo run -- bitcoin bitcoin 8149
The server and client can be run separately(independent of the CLI). The server is responsible for handling the GitHub API requests and the client(NextJS) is responsible for handling the user interface.
-
To run the server, use the following command:
-
copy the
.env.example
file to.env
and fill in the required environment variables.
make run-grpc
- The server will be running on
localhost:50051
to which the client will connect. - You will need to set up a client that can interact with the gRPC server for API requests.
- WIP
Contributions to this project are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or fix.
- Commit your changes.
- Push to the branch.
- Create a new Pull Request.
This tool is a product of the ideas by David Harding. The gist highlighting his thought process and idea development can be found here.