> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sweetr.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# PR Size Labeler

> Automatically label a Pull Request with its size.

export const PrSize = ({size, label, color}) => <div className="flex gap-[10px] items-center" style={{
  marginBottom: 10
}}>
    <div style={{
  width: 72,
  borderRadius: 50,
  background: "#25262b",
  fontWeight: 700,
  textTransform: "uppercase",
  fontSize: 10,
  border: "1px solid #373a40",
  display: "flex",
  height: 20,
  justifyContent: "center",
  alignItems: "center",
  color
}}>
      {size}
    </div>
    <div>{label}</div>
  </div>;

## Demo

<Frame>
  <img src="https://mintcdn.com/sweetrdev/eFb8git0HDRlFHI6/images/automations/pr-size-labeler.webp?fit=max&auto=format&n=eFb8git0HDRlFHI6&q=85&s=3bc6fab96d7ba27fc5149e729e2c94f6" width="698" height="136" data-path="images/automations/pr-size-labeler.webp" />
</Frame>

## How it works

When enabled, Sweetr will automatically add a label indicating the size of the changes on every new Pull Request in GitHub. You can customize the labels and their colors.

Customize how PR size is calculated in your workspace settings.

## Benefits

<Card horizontal title="Improves cycle time" icon="clock">
  Encourage faster reviews on smaller PRs.
</Card>

<Card horizontal title="Improves failure rate" icon="bug">
  Mitigate reviewer fatigue with smaller PRs.
</Card>

## Default labels

<PrSize color="#69DB7C" size="Tiny" label="< 20 lines changed." />

<PrSize color="#69DB7C" size="Small" label="20~100 lines changed." />

<PrSize color="#A6A7AB" size="Medium" label="100~250 lines changed." />

<PrSize color="#ff8787" size="Large" label="250~500 lines changed." />

<PrSize color="#ff8787" size="Huge" label="> 500 lines changed." />
