# Control which pull requests EkLine reviews

import { Steps, Aside } from '@astrojs/starlight/components';

<Aside type="note" title="Request access">
  Docs Agent is available to all plans, but we grant access on request. Contact support@ekline.io to request access.
</Aside>

By default, [automatic PR review](/agent/automatic-pr-review/) assesses every pull request opened into your repository's default branch. Review rules let you narrow that scope per repository — so EkLine skips the pull requests you don't want reviewed and spends its attention on the ones that matter.

Use review rules to skip draft pull requests, add release branches, or ignore pull requests by title, author, label, or the files they change.

<Aside type="note">
This guide uses **pull request (PR)** throughout. On GitLab, EkLine shows the same rules for **merge requests (MRs)**, and the labels read "MR" instead of "PR". The steps are identical.
</Aside>

## Before you begin

You need:

- An EkLine account with Docs Agent enabled.
- The [EkLine GitHub App connected](/agent/github-app-setup/) — or [GitLab connected](/agent/gitlab-setup/) — to at least one repository.
- **Enable monitoring** turned on for the repository you want to configure. Review rules are only reachable for monitored repositories.

## Open the review rules for a repository

<Steps>
1. Log in to your [EkLine dashboard](https://ekline.io/dashboard).

2. Go to **Settings > Organization > GitHub Integration** (or **GitLab Integration**).

3. Find the repository in the list and confirm the **Enable monitoring** toggle is on.

4. Click the gear icon next to the repository. Its label reads **Configure review rules**.
</Steps>

<Aside type="tip">
The gear icon appears only when **Enable monitoring** is on. If you don't see it, switch monitoring on first, then reopen the repository row.
</Aside>

The review rules page opens with the repository name at the top and a back link to the integration page. The default rules review every pull request opened into your default branch.

## Choose which pull requests to review

The review rules page groups its controls into filters. Each filter narrows the set of pull requests EkLine reviews — a pull request is reviewed only when it passes every filter.

### Skip draft pull requests

The **Skip draft PRs** toggle is on by default, so EkLine ignores draft pull requests until you mark them ready for review. Turn it off to review drafts as well.

### Branch rules

| Field | What it does |
|-------|--------------|
| **Review PRs into these branches** | EkLine reviews pull requests that target any branch listed here. Your default branch is prepopulated. At least one branch is required. |
| **Skip PRs from these branches** | EkLine skips pull requests whose source (head) branch matches an entry. Leave it empty to review pull requests from any branch. |

Both fields match branch names with regular expressions. Patterns are **unanchored** unless you add `^` and `$`, and matching is **case-sensitive**. The prepopulated default branch is already anchored — for example, `^main$`.

To review release branches as well as your default branch, add a pattern such as `release/.*` to **Review PRs into these branches**. To skip documentation-only branches, add `^docs/` to **Skip PRs from these branches**.

### Pull request filters

| Field | What it does |
|-------|--------------|
| **Skip PRs whose title matches** | Skips pull requests whose title matches a regular expression — for example, `^chore:` to skip chore commits. |
| **Skip PRs from these authors** | Skips pull requests opened by the usernames listed. Match usernames exactly. Bot accounts include the `[bot]` suffix — for example, `dependabot[bot]`. |
| **Filter by label** | Type a label name to require it, so EkLine reviews only pull requests carrying that label. Prefix a label with `!` to skip pull requests that carry it — for example, `!wip`. |

Author matching is case-insensitive. Label matching is case-insensitive on GitHub and case-sensitive on GitLab.

### File filters

The **Skip PRs that only touch these files** field takes glob patterns. EkLine skips a pull request only when *every* changed file matches at least one pattern. A pull request that touches any non-matching file is still reviewed.

For example, `**/*.md` skips pull requests that change only Markdown files, but still reviews a pull request that changes a Markdown file alongside a source file.

<Aside type="note">
Each field holds up to 50 entries. A pattern can be up to 500 characters, and a username or label up to 100 characters.
</Aside>

## Save your rules

<Steps>
1. Add an entry to any field by typing a value and pressing **Enter** or a comma. Each entry appears as a chip. To remove the last chip, press **Backspace** in an empty field.

2. Click **Save changes**. EkLine validates your patterns and confirms with a **Review rules saved** message.
</Steps>

EkLine reads review rules when it assesses a pull request, so your changes apply to the next pull request opened against the repository.

<Aside type="tip">
To start over, click **Reset all rules to defaults**. This restores the default filters while leaving monitoring on.
</Aside>

## Verify your rules

Confirm the rules take effect on a real pull request:

<Steps>
1. Open a pull request that one of your rules should skip — for example, a draft pull request, or one whose title matches a skip pattern.

2. Wait about 30 seconds, then check the pull request. EkLine posts no automatic review comment, because the pull request was filtered out.

3. Open a pull request that your rules should review — for example, one into a reviewed branch with a documentation-impacting change. EkLine assesses it and comments when it detects documentation impact.
</Steps>

## Troubleshooting

| Issue | Solution |
|-------|----------|
| No gear icon next to the repository | Review rules open only for monitored repositories. Turn on **Enable monitoring** for the repository, then reopen the row. |
| Save is blocked with an error on a field | A pattern is invalid or an entry is uncommitted. Fix the highlighted regular expression, or press **Enter** to add a pending entry (or clear it), then save again. |
| Save is blocked asking for a branch | **Review PRs into these branches** requires at least one entry. Add your default branch — for example, `^main$` — before saving. |
| A pull request I expected to skip was still reviewed | Regular expressions are unanchored and case-sensitive. Confirm the pattern matches the exact branch, title, or author. For file filters, remember EkLine skips a pull request only when every changed file matches. |
| A pull request I expected to review was skipped | Check each filter in turn — a skip pattern for the branch, title, author, or label may be catching it. |

## Next steps

- [Automatic PR review](/agent/automatic-pr-review/) — Understand the confidence tiers that decide what EkLine does after a pull request passes your rules.
- [Prevent documentation drift](/agent/prevent-documentation-drift/) — Pair automatic PR review with a scheduled drift audit.
- [Connect GitHub](/agent/github-app-setup/) — Install the GitHub App and select repositories to monitor.