Skip to content

Repository files navigation

🧠 Rust PR Reviewer (Phase 1)

This project watches GitHub PRs in a Rust repo, analyzes the changes using Tree-sitter, and lists the affected functions in each .rs file.

🚀 Phase 1 Features

  • Connects to GitHub and gets all open PRs
  • Clones the PR branch locally
  • Computes diffs to find added/changed lines
  • Parses changed Rust files and lists affected functions

🧰 Stack

  • Python (brew install python)
  • GitHub API (via PyGithub)
  • Tree-sitter for Rust

🔧 Setup

# Clone tree-sitter-rust
cd rust_analyzer
git clone https://github.com/tree-sitter/tree-sitter-rust.git
cd ..

# Create venv and install deps
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt

# Build tree-sitter library
python rust_analyzer/tree_sitter_setup.py

# Set environment variables
export GITHUB_TOKEN=your_token
export REPO_NAME=yourrepo
export REPO_OWNER=yourusername
# Run it
python main.py

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages