Hey there!

You can find the GitHub app here :D

Code Review Quantifier

This app helps you visualise and keep track of your pull request sizes better by labeling pull request with configurable size labels. In general smaller pull requests are easier to review and results in a higher code quality as review quality drops with each file within a pull request.

Adds a label to the pull requests based on their size and the config:

labeled pull request

Comments on the pull requests based on the config:

pull request comment

Note: yes, comments are reused to not flood your pull requests with lots of comments ;)

State of this app

This app is still in early development, more information coming soon!

Please only install it for repositories you want to use the app with, this improves the performance for all of us. Thank you!

Supported languages

Note: all other file types will be counted like on GitHub by default

Example config:

The config file should be named .quantifier.json and placed in the root directory of the repository for the app to recognize it.

{
  "exclude": {
    "files": [
      "**/*.yml",
      "**/*.yaml",
      "**/*.json",
      "**/*.md",
      "**/*.lock",
      "**/*.test.ts",
      "**/*.fixtures.ts"
    ],
    "lines": {
      "blank": true,
      "comments": true,
      "imports": true
    }
  },
  "labels": [
    {
      "name": "Extra Small",
      "maxChanges": 16,
      "comment": "## This pull request seems to have `${changes}` changes! 🥳\nYou are AMAZING and know that it is best to aim for `256` or less to keep pull requests easy and quick to review!\n\n<details>\n<summary><h3>Detailed stats</h3></summary>\n\n${codeblock.stats}\n\n![celebration gif](https://media.tenor.com/kxzr3-r6XoIAAAAM/lets-get-this-party-started-yeah.gif)\n\n</details>"
    },
    {
      "name": "Small",
      "maxChanges": 64
    },
    {
      "name": "Medium",
      "maxChanges": 256
    },
    {
      "name": "Large",
      "maxChanges": 512,
      "gif": "![](https://media.tenor.com/WxsVrj5SehYAAAAM/you-are-fat-face.gif)"
    },
    {
      "name": "Extra Large",
      "comment": "",
      "gif": "![](https://i.giphy.com/media/RvY1c24WC8jV6/giphy.webp)"

    }
  ],
  "comment": "## This pull request seems to have `${changes}` changes!\nGenerally speaking it is best to aim for `256` or less to keep pull requests easy and quick to review!\n\n<details>\n<summary><h3>Detailed stats</h3></summary>\n\n${codeblock.stats}\n\n${label.gif}\n\n</details>"
}