# Trello

> Connect Trello so MergeHarbor reviews each pull request against the card it implements, checks its acceptance-criteria checklist and can comment on the card.

When a pull request links to a Trello card, MergeHarbor reads the card and checks the change against its acceptance criteria, like it does for Jira, Linear and Asana issues.

## What it does in reviews

- **Finds the cards a pull request refers to.** Trello card links (`trello.com/c/<short link>`) in the pull request title, description and commit messages. Only linked cards are read.
- **Reads the card.** Name, description, labels, list and checklists. Acceptance criteria come from an "Acceptance criteria" or "Definition of done" section in the description and from checklists with those names.
- **Checks the change against it.** The review's requirements check reports each criterion as met, not met or unclear, with evidence from the diff. Text that looks like a secret is redacted before it reaches the model. No extra model call is made.
- **Optionally comments on the card.** With **Comment on linked issues** on, MergeHarbor keeps one comment on each linked card up to date after every review: findings, confidence and requirements met, with a link to the review.

## What is read and what is never read

- **Read:** the linked cards, your member name and the boards you belong to (to recognise their cards).
- **Never read:** cards nobody linked, other cards on the board, attachments, members' profiles and activity. MergeHarbor never searches your workspace. It writes only its own comment, and only with write-back on.

Card text is cached for a short time (10 minutes by default), deleted within 24 hours, and never written to logs. The key and token are sent in a request header, never in URLs, and encrypted at rest.

## Connect

1. Open [trello.com/power-ups/admin](https://trello.com/power-ups/admin), create a Power-Up for your workspace (name it MergeHarbor), open **API key** and copy the 32-character key.
2. On the same page, follow the **Token** link, allow access and copy the token Trello shows. The token acts as you, so MergeHarbor can read the cards you can see and, with write-back on, comment as you.
3. In the console, open **Integrations** and choose **Connect** on **Trello** (under **Issue tracking**). You need the `settings.manage` permission.
4. Paste the API key and the token, then choose **Test connection**.

Consider a dedicated Trello member that belongs only to the boards reviews need.

## Per-repository settings

In **Settings**, you can limit the integration to some repositories, and turn on **Comment on linked issues** for write-back.

## Limits

- Up to 3 linked cards are used per pull request by default.
- Card text counts toward the review's overall context limit for tickets.

## Disconnect

Open the integration in **Integrations** and choose **Disconnect**. MergeHarbor deletes the key, the token and cached cards. Comments it posted stay on the cards. Then revoke the token in Trello under **Account settings → Applications**.

## Self-hosted installations

Trello needs no OAuth application: customers paste their own API key and token.
