Co-reviewer is a tool that helps code owners review changes in pull requests efficiently. It provides a clear view of which changes need review and which have already been approved.
- View changed files in a pull request with side-by-side diff view
- Filter files by code owner
- Filter files by review status (reviewed/unreviewed)
- See code ownership information for each file
- Track review status across files
- Node.js 16.x or later
- pnpm
- A GitHub personal access token with repo scope
- Clone the repository and navigate to the co-reviewer directory:
cd core/tools/co-reviewer
- Install dependencies:
pnpm install
- Create a
.env
file based on.env.example
:
cp .env.example .env
- Edit the
.env
file with your GitHub configuration:
GITHUB_TOKEN=your_github_token_here
GITHUB_OWNER=your_org_or_username
GITHUB_REPO=your_repository_name
GITHUB_PR_NUMBER=your_pr_number
To start the development server:
pnpm run dev
The application will be available at http://localhost:3000.
-
The tool uses the GitHub API to fetch:
- Changed files in the PR
- Code owners for each file
- Review status for each file
-
It aggregates this information to show:
- Which files need review from which code owners
- Current review status of each file
- Diff view of the changes
-
Code owners can filter the view to:
- See only files they need to review
- Focus on unreviewed changes
- Track their review progress
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT