GitCafe
Connect GitCafe so the Sazabi agent can search your code, work on it in sandboxes, open pull requests, and review them.
Supported capabilities
- Core integration: GitCafe — Connect GitCafe so the Sazabi agent can search your code, work on it in sandboxes, open pull requests, and review them.
Each connection method has its own setup and permissions. Connecting one method does not enable the others.
Core integration
About
Connecting GitCafe gives the Sazabi agent access to the repositories a dedicated GitCafe account can see. GitCafe is a forge integration: the agent can search and read code, clone and push in sandboxes, open pull requests, and review pull requests.
Limited release
GitCafe is in limited release and is not yet enabled for every organization. Contact support to request access.
Prerequisites
- A dedicated GitCafe account for Sazabi, added to your GitCafe organization with access to the repositories Sazabi should see. Sazabi acts as this account, so its name is what people see on Sazabi's comments and reviews.
- A personal access token from that account with these permissions:
- Code: read and write
- Repository metadata: read
- Pull requests, reviews, and comments: write
- Attachments: write
- Repository webhooks: write
- Credentials: delegate-write
- Organization admin access in Sazabi.
Credential delegate-write lets Sazabi give each sandbox its own one-hour token limited to the project's GitCafe repositories, so the stored token never enters a sandbox.
Set up in the dashboard
Create the token in GitCafe
Sign in to GitCafe as the dedicated account and create a personal access token with the permissions above. Copy it; GitCafe shows it once.
Open the GitCafe integration
In the dashboard, go to Settings > Integrations > GitCafe.
Paste the token
Paste the Personal access token and connect. Sazabi checks the token against the GitCafe API and records which account it belongs to before saving.
Link repositories
Under Settings > Code, link the GitCafe repositories the project should use. Linking a repository registers a webhook on it, so pushes, pull requests, reviews, and CI runs reach Sazabi as they happen.
Set up with the CLI
You can also connect GitCafe with the Sazabi CLI. GitCafe is an API-key provider with one credential field, apiToken. Read the token from an environment variable rather than pasting it inline:
export GITCAFE_TOKEN=... # the dedicated account's personal access token
sazabi integrations connect gitcafe \
--credentials "{\"apiToken\":\"$GITCAFE_TOKEN\"}"Automated code review
Sazabi can review GitCafe pull requests with inline comments and a verdict. Enable it with the per-project switch under Settings > Code. Request a review on demand by adding the dedicated account as a reviewer, or by commenting @<account handle> review on a pull request.
When a GitCafe repository syncs both ways with a GitHub repository that Sazabi already reviews for the same project, Sazabi reviews the pull request once, on GitHub.
Mentions and personal accounts
Mention the dedicated account on a pull request, for example @<account handle> why does this test fail?, and Sazabi answers in the same conversation. Inline comments get a reply in their review thread.
Sazabi acts only on mentions from organization members who connected a personal GitCafe account under Settings > Connected accounts > GitCafe. Anyone else gets a reply explaining how to connect. When you have a personal account connected, pull requests and comments Sazabi writes for you are authored as you; cloning and code search always use the organization integration.
Verify
Open Settings > Integrations > GitCafe and confirm the connection reads connected. Then ask the agent, in a thread for a project with a linked GitCafe repository, to find a file you know exists there.
Troubleshooting
Token rejected on connect: confirm the token belongs to the dedicated account and has the permissions above.
Connection shows needs attention: the token expired or was revoked in GitCafe. Create a new token and reconnect.
A mention gets "Sazabi couldn't act on this mention": connect your personal GitCafe account under Settings > Connected accounts > GitCafe, then mention the account again.
Pushes or pull requests are not picked up: relink the repository under Settings > Code, which registers its webhook again.