{"id":49346292,"url":"https://github.com/microsoft/pullrequestquantifier","last_synced_at":"2026-04-27T08:01:02.199Z","repository":{"id":40376120,"uuid":"325643806","full_name":"microsoft/PullRequestQuantifier","owner":"microsoft","description":"A highly customizable framework to quantify a pull request within a repository context.","archived":false,"fork":false,"pushed_at":"2025-07-18T20:42:10.000Z","size":5006,"stargazers_count":60,"open_issues_count":30,"forks_count":36,"subscribers_count":9,"default_branch":"main","last_synced_at":"2026-04-27T06:33:52.378Z","etag":null,"topics":["pull","quantification","requests","size"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-12-30T20:39:41.000Z","updated_at":"2026-03-24T20:44:36.000Z","dependencies_parsed_at":"2023-10-15T16:59:00.046Z","dependency_job_id":"edc7debb-b39a-4c78-a5c2-e364abd1fcb4","html_url":"https://github.com/microsoft/PullRequestQuantifier","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/microsoft/PullRequestQuantifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FPullRequestQuantifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FPullRequestQuantifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FPullRequestQuantifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FPullRequestQuantifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/PullRequestQuantifier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FPullRequestQuantifier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32327701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pull","quantification","requests","size"],"created_at":"2026-04-27T08:00:30.863Z","updated_at":"2026-04-27T08:01:02.138Z","avatar_url":"https://github.com/microsoft.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Pull Request Quantifier\n![.NET Core Build](https://github.com/microsoft/PullRequestQuantifier/workflows/.NET%20Core%20Build/badge.svg)\n![Nuget](https://img.shields.io/nuget/v/PullRequestQuantifier.Client)\n[![codecov](https://codecov.io/gh/microsoft/PullRequestQuantifier/branch/main/graph/badge.svg?token=3YH6267UFS)](https://codecov.io/gh/microsoft/PullRequestQuantifier)\n\nA highly **customizable framework** to quantify a pull request within a repository\ncontext **to drive a optimal PR experience**.\n\n[Install our free GitHub App](https://github.com/marketplace/pull-request-quantifier)\n\n\u003cspan\u003e\u003ca href=\"https://github.com/marketplace/pull-request-quantifier\"\u003e\u003cimg src=\"./docs/images/client-github_2.png\" width=\"400\"/\u003e\u003c/a\u003e\u003c/span\u003e\n\n[VSCode extension](https://marketplace.visualstudio.com/items?itemName=ms-1es.pull-request-quantifier)\n\n### Highlights\n\n- Counts pull request changes with high accuracy\n- Uses git history to provide a repository level context to the pull request\n- Provides customizations through a yaml file for fine grained behavior control\n\n### Prerequisites\n\n- [.NET 7.0 runtime](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) is required for the framework to work properly.\n\n#\n\n\u003cdetails open\u003e\n  \u003csummary display=\"inline\"\u003e \u003cstrong\u003eWhy proper sizing of changes matters\u003c/strong\u003e \u003c/summary\u003e\n  \u003cp/\u003e\n  \u003cp/\u003e  \n\nOptimal pull request sizes drive a better predictable PR flow as they strike a\nbalance between between PR complexity and PR review overhead. PRs within the\noptimal size (typical small, or medium sized PRs) mean:\n\n- Fast and predictable releases to production: \n  - Optimal size changes are more likely to be reviewed faster with fewer\n  iterations. \n  - Similarity in low PR complexity drives similar review times. \n- Review quality is likely higher as complexity is lower:\n  - Bugs are more likely to be detected.\n  - Code inconsistencies are more likely to be detected.\n- Knowledge sharing is improved within the participants:\n  - Small portions can be assimilated better.\n- Better engineering practices are exercised:\n  - Solving big problems by dividing them in well contained, smaller problems.\n  - Exercising separation of concerns within the code changes.\n\n#### What can I do to optimize my changes\n\n- Use the PullRequestQuantifier to quantify your PR accurately\n  - Create a context profile for your repo using the [context generator](https://github.com/microsoft/PullRequestQuantifier/releases)\n  - Exclude files that are not necessary to be reviewed or do not increase the\n  review complexity. \n  Example: Autogenerated code, docs, project IDE setting files, binaries, etc.\n  Check out the `Excluded` section from your `prquantifier.yaml` context profile.\n  - Understand your typical change complexity, drive towards the desired complexity\n  by adjusting the label mapping in your `prquantifier.yaml` context profile. \n  - Only use the labels that matter to you, [see context specification](./docs/prquantifier-yaml.md)\n  to customize your `prquantifier.yaml` context profile.\n- Change your engineering behaviors\n  - For PRs that fall outside of the desired spectrum, review the details and check\n  if:\n    - Your PR could be split in smaller, self-contained PRs instead\n    - Your PR only solves one particular issue. (For example, don't refactor and\n    code new features in the same PR).\n\n#### How to interpret the change counts in git diff output\n\n- One line was added: `+1 -0`\n- One line was deleted: `+0 -1`\n- One line was modified: `+1 -1` (git diff doesn't know about modified, it will\ninterpret that line like one addition plus one deletion)\n- Change percentiles: Change characteristics (addition, deletion, modification)\nof this PR in relation to all other PRs within the repository.\n\n\u003c/details\u003e\n\n## \n\n\u003cdetails open\u003e\n  \u003csummary display=\"inline\"\u003e \u003cstrong\u003eClients\u003c/strong\u003e \u003c/summary\u003e\n\u003cp/\u003e\n  \u003cp/\u003e\n The following open source clients are supported:\n\n| - | Name | Example |\n|------|------|---------|\n| \u003ca href=\"./src/Clients/PullRequestQuantifier.Local.Client\"\u003e\u003cimg src=\"./docs/images/cli-icon.png\" width=\"50\"/\u003e\u003c/a\u003e  | [CLI](./src/Clients/PullRequestQuantifier.Local.Client) | ![](./docs/images/client-cli.png) |\n| \u003ca href=\"./src/Clients/PullRequestQuantifier.Vsix.Client\"\u003e\u003cimg src=\"./docs/images/visual-studio-icon.png\" width=\"50\"/\u003e\u003c/a\u003e  | [Visual Studio](./src/Clients/PullRequestQuantifier.Vsix.Client) | ![](./docs/images/client-vsix.png) |\n| \u003ca href=\"./src/Clients/PullRequestQuantifier.GitHub.Client\"\u003e\u003cimg src=\"./docs/images/github-icon.png\" width=\"50\"/\u003e\u003c/a\u003e  | [GitHub](./src/Clients/PullRequestQuantifier.GitHub.Client) | ![](./docs/images/client-github.png) |\n\n\n\u003c/details\u003e\n\n\n##\n\n\u003cdetails\u003e\n  \u003csummary display=\"inline\"\u003e \u003cstrong\u003eHow to develop new clients\u003c/strong\u003e \u003c/summary\u003e\n  \u003cp/\u003e\n  \u003cp/\u003e\nThree steps\n\n1. Load the context, if available\n1. Call Quantifier\n1. Output the results\n\n```c#\n// 1. point to the context file (with behavior specification)\nvar contextFile = \"path/to/context/file/prquantifier.yaml\";\n\n// 2. quantify local git repository\n\nvar quantifyClient = new QuantifyClient(contextFile);\nvar quantifierResult = await quantifyClient.Compute(\"path/to/local/git/repo\");\n\n// 3. output the results\nConsole.WriteLine(quantifierResult.Label);\nConsole.WriteLine(quantifierResult.QuantifiedLinesAdded);\nConsole.WriteLine(quantifierResult.QuantifiedLinesDeleted);\n```\n\n\u003c/details\u003e\n\n## \n\n\n\u003cdetails\u003e\n  \u003csummary display=\"inline\"\u003e \u003cstrong\u003eContext customization\u003c/strong\u003e \u003c/summary\u003e\n  \u003cp/\u003e\n  \u003cp/\u003e\n  \n  See [context specification](./docs/prquantifier-yaml.md) for details of the yaml-based customization.\n\n[Download latest version of context generator](https://github.com/microsoft/PullRequestQuantifier/releases) and run it from the command line inside a git repository.\n\n![](./docs/images/client_context_generator.png) \n\n\u003c/details\u003e\n\n## \n\n\u003cdetails\u003e\n  \u003csummary display=\"inline\"\u003e \u003cstrong\u003eDeveloping\u003c/strong\u003e \u003c/summary\u003e\n  \u003cp/\u003e\n  \u003cp/\u003e\n  PullRequestQuantifier uses `netstandard2.1` for the main library(PullRequestQuantifier.Client) and `net5.0` for the unit tests (Xunit).\n\n[Coding guidelines](./docs/CSharpCodingGuidelines.md)\n\u003c/details\u003e\n\n##\n\n\u003cdetails\u003e\n  \u003csummary display=\"inline\"\u003e \u003cstrong\u003eBuild\u003c/strong\u003e \u003c/summary\u003e\n  \u003cp/\u003e\n  \u003cp/\u003e\n  From the root directory\n\n```\ndotnet build .\\PullRequestQuantifier.sln\n```\n\u003c/details\u003e\n\n##\n\n\u003cdetails\u003e\n  \u003csummary display=\"inline\"\u003e \u003cstrong\u003eTest\u003c/strong\u003e \u003c/summary\u003e\n  \u003cp/\u003e\n  \u003cp/\u003e\n  From the root directory\n\n```\ndotnet test .\\PullRequestQuantifier.sln\n```\n\u003c/details\u003e\n\n## \n\n\u003cdetails\u003e\n  \u003csummary display=\"inline\"\u003e \u003cstrong\u003eContributing\u003c/strong\u003e \u003c/summary\u003e\n  \u003cp/\u003e\n  \u003cp/\u003e\n  This project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.\n\nWhen you submit a pull request, a CLA bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\u003c/details\u003e\n\n\n\n## \n\n\u003cdetails\u003e\n  \u003csummary display=\"inline\"\u003e \u003cstrong\u003eTrademarks\u003c/strong\u003e \u003c/summary\u003e\n  \u003cp/\u003e\n  \u003cp/\u003e\nThis project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft \ntrademarks or logos is subject to and must follow \n[Microsoft's Trademark \u0026 Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).\nUse of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.\nAny use of third-party trademarks or logos are subject to those third-party's policies.\n\u003c/details\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fpullrequestquantifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2Fpullrequestquantifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fpullrequestquantifier/lists"}