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

# Post-Merge Actions

> Run automated follow-up work, including changelog updates, tickets, and notifications, after a pull request is merged.

GitHub Cloud (Post-Merge Actions are available on GitHub Cloud.) GitLab Cloud (Post-Merge Actions are available on GitLab Cloud.) Azure (Post-Merge Actions are available on Azure DevOps.) Bitbucket Cloud (Post-Merge Actions are available on Bitbucket Cloud.) | Team Plan (This feature is available on Team (formerly Pro+), Advanced, and Enterprise. Please refer to our pricing page for more information about our plans and features.)

Post-Merge Actions run automated follow-up work after a pull request is merged. Each action is a natural-language instruction that CodeRabbit executes agentically against the merged changes. It can open a follow-up pull request, post a report on the PR, or deliver output to a connected integration. Administrators configure actions at the organization or repository level. Post-Merge Actions are the merge-time counterpart to [Pre-Merge Checks](https://docs.coderabbit.ai/pr-reviews/pre-merge-checks.md): pre-merge checks gate a PR *before* it lands, while post-merge actions do work *after* it lands.

Post-Merge Actions run on GitHub Cloud, GitLab Cloud, Azure DevOps, and Bitbucket Cloud. Self-hosted GitHub and GitLab deployments and Bitbucket Data Center are not supported.

## Why use Post-Merge Actions?

* **Automate the busywork after merge:** Append changelog entries, bump docs, or open cleanup PRs without a human remembering to.
* **Close the loop with your tools:** File a Linear or Jira ticket, open a GitHub issue, or post a Slack summary the moment work lands.
* **Keep authors in control:** Every action is previewed as a checkbox in the PR walkthrough before merge, so authors and reviewers can skip actions that do not fit.
* **Scoped to what merged:** Actions receive the merged diff, PR summary, and objectives, so their instructions can target exactly the changes that landed.

## How Post-Merge Actions work

**1. Preview during review**

While CodeRabbit reviews an open PR, each enabled action appears as a checkbox in the **🚀 Post-Merge Actions** section of the walkthrough. A box is checked only when CodeRabbit determines that the action applies to this PR's changes. If it cannot determine applicability, the box remains unchecked.

**2. Skip actions (optional)**

The PR author or a reviewer can skip actions they do not want with a [skip command](#skipping-actions) before merging.

**3. Run on merge**

When the PR is merged into the default branch, CodeRabbit runs every action whose box is still checked. Each action executes agentically in a secure sandbox clone of the repository with access to the merged diff and PR context.

**4. Report results**

CodeRabbit posts a single result comment on the merged PR summarizing each action's outcome. If any action fails, the PR author is @mentioned so the failure surfaces to them.

> [!NOTE]
>
> Actions run only when a PR is merged into the repository's **default branch**. Merges into other branches do not trigger post-merge actions.

## Output modes

Each action picks the output mode that fits its instructions:

> [card] Code changes
>
> The agent edits, creates, or deletes files, such as appending to a changelog. The changes are opened as a **follow-up pull request** against the default branch.

> [card] Text report
>
> The agent produces a free-form report or summary, surfaced inline in the result comment on the merged PR.

> [card] Integration
>
> The agent delivers output through a connected [MCP tool](https://docs.coderabbit.ai/connections/mcp-servers.md), for example by creating a Linear or Jira ticket, opening a GitHub issue, or posting to Slack.

Each code-producing action creates its own follow-up pull request against the default branch. The branch name uses an action-specific suffix, so multiple actions do not share a branch name. Follow-up pull requests are titled with a `🔧 CodeRabbit Post-Merge Recipe:` prefix. Merging one of these follow-up PRs never triggers another round of post-merge actions, so actions cannot recurse.

## Configuration

Post-Merge Actions can be configured via the web interface or the `.coderabbit.yaml` file. Each action has:

* **Enabled:** Whether the action runs after merge. The default is `true`.
* **Name:** A display name, unique among configured actions without regard to case, up to 100 characters.
* **Prompt:** Deterministic natural-language instructions describing the action to perform, up to 10,000 characters.

You can configure up to **5** post-merge actions.

> [!NOTE]
>
> To create tickets, post Slack messages, or use other integrations, first configure and enable the relevant [MCP server](https://docs.coderabbit.ai/connections/mcp-servers.md).

> [tab] Web interface
>
> Configure Post-Merge Actions through the CodeRabbit dashboard:
>
> **1. Navigate to Settings**
>
> In CodeRabbit, open **Settings** and configure actions at the organization or repository level.
>
> **2. Add an action**
>
> Add an action with:
>
> * **Name** (≤ 100 chars, unique within the org)
> * **Prompt** (≤ 10,000 chars; natural language)
> * **Enabled** (on | off)
>
> **3. Apply changes**
>
> Click **Apply Changes** to save. The new actions apply to subsequent reviews and merges.

> [tab] Configuration file
>
> For version-controlled configuration, add actions to your `.coderabbit.yaml` file:
>
> ```yaml YAML icon=code wrap theme={null}
> reviews:
>   post_merge_actions:
>     - name: "Update changelog"
>       enabled: true
>       prompt: "If this PR contains user-facing changes, append a concise entry to CHANGELOG.md under the Unreleased section describing the change. Skip purely internal refactors, tests, and CI changes."
>     - name: "File follow-up ticket"
>       enabled: true
>       prompt: "If this PR references a known TODO or leaves follow-up work described in the PR description, create a Linear ticket summarizing the follow-up and link back to this PR."
>     - name: "Notify release channel"
>       enabled: false
>       prompt: "Post a one-paragraph summary of the merged changes to the #releases Slack channel."
> ```

The prompt can include filter conditions, such as labels, changed paths, or branch names. During review, CodeRabbit evaluates each enabled action against the pull request. Actions that do not apply, or whose applicability cannot be determined, remain unchecked and do not run after merge.

## Skipping actions

The PR author or a reviewer can opt out of actions before merging with a chat command.

### Skip all actions

```md theme={null}
@coderabbitai skip post-merge actions
```

### Skip specific actions

Pass one or more `--name` flags to skip only those actions (names are matched exactly, casing preserved):

```md theme={null}
@coderabbitai skip post-merge actions --name "Update changelog" --name "Notify release channel"
```

The skip command clears the selected action's checkbox in the **🚀 Post-Merge Actions** section. Only actions whose boxes are still checked at merge time run.

> [!NOTE]
>
> Skipping applies only to that PR. Future PRs still evaluate and offer actions as configured.

## Results comment

After a merged PR's actions run, CodeRabbit posts a single **🚀 Post-Merge Actions** result comment listing each action and its outcome:

* ✅ **Success:** A detail line includes a link to the follow-up PR, the text report, or a note that output was delivered through a connected integration.
* ❌ **Failure:** A short reason is included. When any action fails, the PR author is @mentioned at the top of the comment.

Re-triggering post-merge actions after they run is not supported; the result comment is a record of the single run.

> See [**Manage code reviews**](https://docs.coderabbit.ai/guides/commands.md) for more commands and behaviors.

## Examples

> [tab] Changelog entry
>
> Appends a changelog entry once the change is final. Running this post-merge avoids documenting in-progress work that may still change before the PR closes.
>
> ```yaml theme={null}
> reviews:
>   post_merge_actions:
>     - name: "Update changelog"
>       enabled: true
>       prompt: |
>         Review the PR title, description, and full diff.
>         Append a new entry to CHANGELOG.md at the top of the "Unreleased" section.
>
>         Format: `- <type>(<scope>): <short description> (#<PR number>)`
>         - Derive type from the changes: feat, fix, refactor, docs, chore
>         - Derive scope from the primary directory or package touched
>         - Keep the description under 80 characters in plain language
>
>         Only proceed if the PR is a notable user-facing or API change.
>         Skip for dependency bumps, typo fixes, and CI-only changes.
>         Do not modify anything else in the file.
> ```

> [tab] Update Notion page
>
> > [!NOTE]
> >
> > Enable the [Notion MCP server](https://docs.coderabbit.ai/connections/mcp-servers.md) first.
>
> Posts a plain-language ship summary to a Notion page when a PR merges. Post-merge is the natural trigger — "this shipped" is a merge-time signal.
>
> ```yaml theme={null}
>     - name: "Notify on ship"
>       enabled: true
>       prompt: |
>         Read the PR title, description, and CodeRabbit summary.
>         Write a 2-3 sentence plain-language summary of what this PR ships and why it matters.
>
>         Use the Notion MCP tool to append the summary as a new row or block to the
>         team's "What shipped this week" page. Include the PR URL and today's date.
> ```

> [tab] Sync docs
>
> Updates documentation to match the merged code. Post-merge timing ensures docs reflect the final implementation, not a draft.
>
> ```yaml theme={null}
>     - name: "Sync docs"
>       enabled: true
>       prompt: |
>         Check the diff for changes to any public API, configuration option, CLI flag,
>         or user-facing behavior.
>
>         For each change found, update the corresponding section in the docs/ directory:
>         - API changes → docs/api-reference/
>         - Config changes → docs/configuration.md
>         - CLI changes → docs/cli.md
>
>         If a relevant doc file does not exist, create a stub with the correct heading
>         and a one-paragraph description derived from the code and PR description.
>
>         Do not update docs for internal refactors, test changes, or CI changes.
> ```

> [tab] Update Linear
>
> > [!NOTE]
> >
> > Enable the [Linear MCP server](https://docs.coderabbit.ai/connections/mcp-servers.md) first.
>
> Closes the linked Linear issue and logs what shipped when the PR merges. Eliminates the manual step of updating ticket status after a merge.
>
> ```yaml theme={null}
>     - name: "Update Linear ticket on merge"
>       enabled: true
>       prompt: |
>         Extract the Linear ticket ID from the PR title or branch name.
>         Common patterns: ABC-123, ENG-456, PROJ-789.
>
>         If a ticket ID is found:
>         1. Use the Linear MCP tool to update the issue status to "Done".
>         2. Add a comment to the issue with:
>            - One sentence summarizing what was shipped, derived from the PR description
>              and CodeRabbit summary
>            - The PR URL
>            - Today's date
>
>         If no ticket ID is found, do nothing.
> ```

> [tab] Create tickets
>
> > [!NOTE]
> >
> > Enable the [Linear MCP server](https://docs.coderabbit.ai/connections/mcp-servers.md) first.
>
> Any CodeRabbit comment left unresolved at merge time becomes a tracked Linear issue, so review findings don't get lost. Only possible post-merge when the final unresolved state is known.
>
> ```yaml theme={null}
>     - name: "Track unresolved review comments"
>       enabled: true
>       prompt: |
>         Read all CodeRabbit inline review comments on this PR.
>         Identify comments that were left unresolved at the time of merge —
>         these are comments where the suggestion was not applied and the thread
>         was not marked resolved.
>
>         For each unresolved comment, use the Linear MCP tool to create a new issue with:
>         - Title: a concise summary of the finding (under 80 characters)
>         - Description: the full comment text, the file path and line number it refers to,
>           and the PR URL for context
>         - Priority: use the comment's severity as a signal — bugs or security findings
>           are High, style or improvement suggestions are Medium
>         - Label: "tech-debt" or "code-review-followup" if those labels exist in the workspace
>
>         Do not create tickets for comments that were resolved or for nitpicks
>         explicitly marked as non-blocking.
> ```

## What's next

> [card] [Pre-Merge Checks](https://docs.coderabbit.ai/pr-reviews/pre-merge-checks.md)
>
> Enforce quality gates and custom requirements before pull requests merge, the merge-time counterpart to post-merge actions.

> [card] [MCP servers](https://docs.coderabbit.ai/connections/mcp-servers.md)
>
> Connect the tools that integration actions use to file Linear or Jira tickets, open GitHub issues, or post to Slack.

> [card] [PR Walkthroughs](https://docs.coderabbit.ai/pr-reviews/walkthroughs.md)
>
> See how the walkthrough comment surfaces each action as a checkbox before merge.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.