Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>PR BudgetNew to Visual Studio Code? Get it now.
PR Budget

PR Budget

Tomas Shanahan

|
1 install
| (1) | Free
Estimate pull request size while you work.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PR Budget

PR Budget estimates how large the current branch's pull request will be before the PR exists.

The extension watches the active workspace, compares the branch with the likely PR base, and shows an S, M, L, or XL risk category in Source Control and the VS Code status bar.

Features

  • Live PR size estimate in Source Control and the status bar.
  • Risk score based on changed files, added/deleted lines, binary files, and source changes without matching test changes.
  • Notifications when the current PR grows into M, L, or XL.
  • Summary command with base branch, score, file count, additions, and deletions.
  • Configurable PR base branch and category thresholds.

How It Works

PR Budget detects the Git repository for the active workspace and resolves the base branch in this order:

  1. prBudget.baseBranch
  2. origin/HEAD
  3. origin/main
  4. origin/master
  5. main
  6. master

It then calculates the diff from the merge base to the current working tree. By default, staged, unstaged, and untracked files are included so the estimate reflects the PR you are building, not only committed changes.

Commands

  • PR Budget: Refresh
  • PR Budget: Show Summary

Extension Settings

  • prBudget.baseBranch: Optional base branch/ref used for the PR diff.
  • prBudget.includeUncommittedChanges: Include staged, unstaged, and untracked files. Defaults to true.
  • prBudget.refreshDebounceMs: Delay before recalculating after workspace changes. Defaults to 750.
  • prBudget.thresholds: Score thresholds for S, M, and L; scores above large are XL.

Default thresholds:

{
  "prBudget.thresholds": {
    "small": 250,
    "medium": 650,
    "large": 1200
  }
}

Development

npm install
npm run dev

Then open this folder in VS Code, press F5, and choose Run Extension. VS Code starts a new Extension Development Host window with PR Budget loaded from this workspace.

Use npm run package only to build the production bundle at dist/extension.js. It does not install, launch, or create a .vsix.

To create an installable extension package:

npm run package:vsix

For validation:

npm run check-types
npm run lint
npm test
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft