---
title: "Automation Overview"
description: "Automate your workflow with webhooks and AI-powered triggers."
section: "automation"
url: "https://forkline.dev/docs/automation"
markdown: "https://forkline.dev/docs/automation.md"
source: "src/content/docs/automation.mdx"
---

# Automation

Forkline can automatically create AI-powered tasks in response to events from your git provider. The goal is to turn routine repository events into fast, reviewable follow-up work.

## Overview

Automation lets you:

- Respond to `@forkline` mentions in issues and pull requests
- Repair failed CI runs automatically
- Resolve merge conflicts after base-branch changes
- Review pull requests as they open
- Control who is allowed to trigger the workflows

> **Info**: Automation requires configured webhooks. GitHub App connectors install these automatically, while GitLab and Forgejo connectors need manual webhook setup.

![Automation settings in repository](https://forkline.dev/docs/screenshots/automation-settings.webp)

_Interactive figure (AutomationOverviewDiagram) — see the HTML version of this page._

## Automation Types

### Bot Mentions

Mention `@forkline` or `@forkline-bot` in an issue or pull request when you want Forkline to respond to the thread context.

- Best for: implementation requests, debugging help, summarization, and follow-up work
- Trigger shape: issue bodies, issue comments, pull request bodies, and pull request comments
- Learn more: [Bot Mentions](https://forkline.dev/docs/automation/bot-mentions)

### CI Auto-Fix

CI auto-fix watches for failing validation events and attempts a repair loop.

- Best for: lint failures, type errors, straightforward test failures, and simple build breakages
- Trigger shape: failed check runs, pipeline events, or status events
- Learn more: [CI Auto-Fix](https://forkline.dev/docs/automation/ci-auto-fix)

### Merge Conflict Auto-Fix

Merge conflict automation starts when an otherwise valid pull request or merge request stops being mergeable.

- Best for: base-branch drift after parallel development
- Trigger shape: PR or MR updates that indicate conflicts
- Learn more: [Merge Conflicts](https://forkline.dev/docs/automation/merge-conflicts)

### Auto PR Review

Auto PR review gives you a repeatable first-pass review when a pull request opens.

- Best for: security checks, performance review, documentation review, and consistent repo policy checks
- Trigger shape: newly opened pull requests or merge requests
- Learn more: [Auto PR Review](https://forkline.dev/docs/automation/auto-pr-review)

## Configuration

### Trigger Policies

Control who can trigger automation on your repositories:

| Policy | Who Can Trigger | Best For |
|--------|-----------------|----------|
| Owner only | Only you | Personal repositories |
| Collaborators | Users with write access | Shared repositories |
| Allowlist | Specific usernames | Controlled access |
| Anyone | All users | Open source |

[Learn more about Trigger Policies](https://forkline.dev/docs/automation/trigger-policies)

### Per-Repository Settings

Each repository can configure:

| Setting | Description |
|---------|-------------|
| CI Auto-Fix | Enable or disable automatic CI failure fixing |
| Merge Conflict Auto-Fix | Enable or disable automatic conflict resolution |
| Max Attempts | Limit fix attempts per PR to prevent runaway costs |
| Skip Labels | Add labels like `no-ci-auto-fix` to opt out |

## Prerequisites

1. Connect your GitHub, GitLab, or Forgejo account
2. Activate a repository in Forkline
3. Configure the required webhook events
4. Make sure you have enough balance for the resulting work

### Webhook Events

| Event Type | Required For |
|------------|--------------|
| Issues | Bot mentions in issues |
| Issue comments | Bot mentions in comments |
| Pull requests | CI auto-fix, merge conflicts, auto PR review |
| PR comments | Bot mentions in PRs |
| Check runs or pipeline events | CI auto-fix |

> **Tip**: See the [Webhooks](https://forkline.dev/docs/automation/webhooks) guide for provider-specific event names.

## Comparison

| Automation | Trigger | Task Type | Configurable |
|------------|---------|-----------|--------------|
| Bot Mentions | `@forkline` mention | IssueResponse, PrReview | No, always on when webhooks are configured |
| CI Auto-Fix | CI failure webhook | CiFix | Yes |
| Merge Conflict Fix | Pull request conflict detected | MergeConflictFix | Yes |
| Auto PR Review | Pull request opened | AutoPrReview | Yes |

## Next Steps

- [Configure webhooks](https://forkline.dev/docs/automation/webhooks)
- [Learn about bot mentions](https://forkline.dev/docs/automation/bot-mentions)
- [Set up CI auto-fix](https://forkline.dev/docs/automation/ci-auto-fix)
- [Configure trigger policies](https://forkline.dev/docs/automation/trigger-policies)
