
An API that conducts an AI review of a pull request. It can also post the review as a comment.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
- GET / - Health check endpoint that returns "Code Squeak API"
- POST / - Create a code analysis from a diff
- Analyzes code changes using AI models
- Accepts diff, prompt, model parameters, and metadata
- Returns analysis results immediately
- POST /pr - Analyze a pull request asynchronously
- Queues a pull request analysis job
- Requires owner, repo, and pull_number
- Returns job ID for tracking progress
- GET /:owner - List repositories for a GitHub user/organization
- Returns paginated list of repositories
- Supports page and per_page query parameters
- GET /:owner/:repo - Get pull requests for a specific repository
- Returns pull requests for the specified repository
- POST /:owner/:repo/:pull_number/comments - Create a comment on a pull request
- Adds a comment to the specified pull request
- Requires comment text in request body
- GET /:owner/:repo/:pull_number/diff - Get the diff for a pull request
- Returns the code changes (diff) for the specified pull request
- Diff is sanitized and truncated if too large (>10KB)
- All
/api/v1/*
endpoints require API key authentication - GitHub endpoints have additional rate limiting applied
- Root endpoint (
/
) is publicly accessible
- [![TypeScript][TypeScript.ts]][typescript-url]
- [![Node.js][Node.js]][Node-url]
- [![Redis][Redis]][Redis-url]
- [![Vitest][Vitest]][Vitest-url]
-
npm
npm install npm@latest -g
- pnpm
npm install pnpm@latest -g
- yarn
npm install yarn -g
- Get a free API Key at https://example.com
- Clone the repo
git clone https://github.com/moexu13/code-squeak-api.git
- Install NPM packages
npm install
- Enter your API in
config.js
const API_KEY = "ENTER YOUR API";
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
For more examples, please refer to the Documentation
- Feature 1
- Feature 2
- Feature 3
- Nested Feature
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Melissa Albarella - @bluesky - moe@melissa-albarella.dev
Project Link: https://github.com/moexu13/code-squeak-api