npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

copilot-pr-reviewer

v0.1.9

Published

AI-powered pull request code reviewer for Azure DevOps using GitHub Copilot SDK

Readme

Copilot PR Reviewer

AI-powered pull request code reviewer for Azure DevOps using GitHub Copilot SDK.

CI NPM Version License: MIT

Features

AI-Powered Reviews - Leverages GitHub Copilot SDK for intelligent code analysis
🎯 Multi-Language Support - Reviews .NET, Python, Frontend (JS/TS/React), and config files
📊 Batch Processing - Efficiently handles large PRs with smart batching
🔍 Severity Classification - Categorizes findings as Critical, Major, or Minor
💬 Azure DevOps Integration - Posts review comments directly to PRs
Parallel Processing - Reviews multiple batches concurrently
📋 Customizable Guidelines - Use custom review guidelines for your project

Installation

Using npx (Recommended)

No installation needed! Run directly:

npx copilot-pr-reviewer <PR_URL>

Global Installation

npm install -g copilot-pr-reviewer

Local Project Installation

npm install --save-dev copilot-pr-reviewer

Prerequisites

  1. GitHub Token - For Copilot API access

    • Set via environment variable: GITHUB_TOKEN=ghp_xxx
    • Or pass via CLI flag: --github-token ghp_xxx
  2. Azure DevOps PAT (Personal Access Token)

    • Set via environment variable: AZURE_DEVOPS_PAT=xxx
    • Or pass via CLI flag: --pat xxx

Usage

Basic Usage

# Using npx
npx copilot-pr-reviewer "https://dev.azure.com/org/project/_git/repo/pullrequest/123"

# With environment variables
export GITHUB_TOKEN="ghp_your_github_token"
export AZURE_DEVOPS_PAT="your_ado_pat"
npx copilot-pr-reviewer <PR_URL>

# With CLI flags
npx copilot-pr-reviewer <PR_URL> --github-token ghp_xxx --pat ado_xxx

Advanced Usage

# Dry run (no comments posted)
npx copilot-pr-reviewer <PR_URL> --no-comments

# Custom AI model
npx copilot-pr-reviewer <PR_URL> --model gpt-4

# Custom guidelines
npx copilot-pr-reviewer <PR_URL> --guidelines-path ./my-guidelines

# Adjust parallelism
npx copilot-pr-reviewer <PR_URL> --max-parallel 4

# Custom timeout
npx copilot-pr-reviewer <PR_URL> --timeout 300

Configuration File

Create appsettings.json in your project root:

{
  "copilot": {
    "model": "gpt-4o",
    "maxTokensPerBatch": 50000,
    "overheadTokens": 5000,
    "maxParallelBatches": 2,
    "timeoutSeconds": 120
  },
  "review": {
    "postComments": true,
    "guidelinesPath": "./guidelines"
  },
  "azureDevOps": {
    "baseUrl": "https://dev.azure.com",
    "authType": "bearer"
  }
}

CLI Options

| Option | Description | Default | |--------|-------------|---------| | --pat <pat> | Azure DevOps PAT | $AZURE_DEVOPS_PAT | | --auth-type <type> | Auth type: 'pat', 'oauth' | bearer | | --model <model> | AI model to use | gpt-4o | | --github-token <token> | GitHub token for Copilot | $GITHUB_TOKEN | | --guidelines-path <path> | Path to guidelines folder | Built-in guidelines | | --max-parallel <n> | Max parallel batch reviews | 2 | | --no-comments | Skip posting comments (dry run) | false | | --extend-review | Review full code files in addition to diffs (default: diff-only mode) | false | | --timeout <seconds> | Timeout in seconds | 120 |

Custom Guidelines

Create custom review guidelines for your tech stack:

guidelines/
  ├── dotnet-guidelines.md
  ├── frontend-guidelines.md
  └── python-guidelines.md

Then reference them:

npx copilot-pr-reviewer <PR_URL> --guidelines-path ./guidelines

CI/CD Integration

GitHub Actions

name: PR Review
on:
  pull_request:
    types: [opened, synchronize]

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - name: Review PR with Copilot
        run: |
          npx copilot-pr-reviewer "${{ secrets.ADO_PR_URL }}"
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          AZURE_DEVOPS_PAT: ${{ secrets.AZURE_DEVOPS_PAT }}

Azure Pipelines

trigger:
  branches:
    include:
      - main

pool:
  vmImage: 'ubuntu-latest'

steps:
  - task: NodeTool@0
    inputs:
      versionSpec: '20.x'

  - script: |
      npx copilot-pr-reviewer "$(System.PullRequest.SourceRepositoryURI)/pullrequest/$(System.PullRequest.PullRequestId)"
    env:
      GITHUB_TOKEN: $(GITHUB_TOKEN)
      AZURE_DEVOPS_PAT: $(AZURE_DEVOPS_PAT)
    displayName: 'Run Copilot PR Review'

Output Example

Reviewing PR #368461 in dnvgl-one/Engineering China/dapr-shop
PR: Add authentication feature (feature/auth → main)
Fetched 15 file changes
Created 3 batches, excluded 2 files
Reviewing batch 1 (Dotnet, 5 files, ~12500 tokens)
Batch 1 completed: 3 findings
Reviewing batch 2 (Frontend, 8 files, ~8200 tokens)
Batch 2 completed: 5 findings
Posting 8 comments to PR...

════════════════════════════════════════════════════════════
  Review Summary
════════════════════════════════════════════════════════════

  PR URL            https://dev.azure.com/...
  Title             Add authentication feature
  Total Files       15
  Reviewed Files    13
  Excluded Files    2
  Batches           3
  Total Findings    8
  Comments Posted   Yes
  Duration          45.2s

  Severity Breakdown:
    🔴 Critical: 2
    🟠 Major:    3
    🟡 Minor:    3

Supported File Types

  • .NET: .cs, .csproj, .sln, .razor, .cshtml
  • Frontend: .js, .jsx, .ts, .tsx, .vue, .html, .css, .scss
  • Python: .py, .pyi
  • Config: .json, .yaml, .yml, .http, .rest

Automatically excludes:

  • Lock files (package-lock.json, yarn.lock, etc.)
  • Minified files (.min.js, .min.css)
  • Generated files (.d.ts, .g.cs, .Designer.cs)

Development

Setup

git clone https://github.com/yourusername/copilot-pr-reviewer.git
cd copilot-pr-reviewer
npm install

Build

npm run build

Test

# Run all tests
npm test

# Run tests with UI
npm run test:ui

# Run with coverage
npm run test:coverage

Local Testing

npm run dev -- <PR_URL>

Publishing

This project uses GitHub Actions for automated npm publishing.

Setup NPM Token

  1. Create an npm token at npmjs.com
  2. Add it as NPM_TOKEN secret in your GitHub repository settings

Publish a Release

Option 1: GitHub Release (Recommended)

  1. Create a new release on GitHub
  2. Tag version (e.g., v0.2.0)
  3. The workflow automatically publishes to npm

Option 2: Manual Workflow Dispatch

  1. Go to Actions → Publish to NPM
  2. Click "Run workflow"
  3. Optionally specify version

Option 3: Manual Publish

# Update version
npm version patch  # or minor, major

# Publish
npm publish

Architecture

┌─────────────────┐
│   CLI Entry     │
│   (index.ts)    │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│  Orchestrator   │ ──┐
│ (runReview)     │   │
└────────┬────────┘   │
         │            │
         ▼            ▼
┌─────────────────┐  ┌──────────────┐
│  ADO Client     │  │ Batch Builder│
│ (fetch PR data) │  │ (classify)   │
└─────────────────┘  └──────┬───────┘
                            │
                            ▼
                     ┌──────────────┐
                     │Review Service│
                     │(Copilot SDK) │
                     └──────┬───────┘
                            │
                            ▼
                     ┌──────────────┐
                     │   Reporter   │
                     │  (summary)   │
                     └──────────────┘

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing)
  5. Open a Pull Request

License

MIT © Cuteribs


Made with ❤️ using GitHub Copilot SDK