> ## 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 Title Requirements

> Enforce PR title standards across your organization.

## Demo

<Frame>
  <img src="https://mintcdn.com/sweetrdev/eFb8git0HDRlFHI6/images/automations/pr-title-check.webp?fit=max&auto=format&n=eFb8git0HDRlFHI6&q=85&s=e6c48b2617cf81e423516a921b7ba5de" width="698" height="334" data-path="images/automations/pr-title-check.webp" />
</Frame>

## How it works

Enable this automation in **Automations > PR Title Check** by defining a regular expression to validate Pull Request titles across your organization. When a PR is opened or updated, Sweetr posts a commit status check (`[Sweetr] PR Title Check`) with a **success** or **error** state.

By default the check is non-blocking. To make it required, add <a href="https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-status-checks-before-merging" target="_blank" rel="noreferrer">branch protection rules</a> in your repository that require the `[Sweetr] PR Title Check` status to pass before merging.

## Benefits

<Card horizontal title="Improves compliance" icon="gavel">
  Standardize Pull Request titles across the organization.
</Card>

## Popular Patterns

<CodeGroup>
  ```js [KEY-100] Foo theme={null}
  ^\[([A-Za-z]+-\d+)\]\s+.+$
  ```

  ```js feat: Foo theme={null}
  ^(feat|fix|chore|refactor|docs|test):\s+.+$
  ```

  ```js [KEY-100] feat: Foo theme={null}
  ^\[([A-Za-z]+-\d+)\]\s+(feat|fix|chore|refactor|docs|test):\s+.+$
  ```
</CodeGroup>
