Skip to content

GitLab

Run AlphaBase from GitLab pipelines, issues, and merge requests.

AlphaBase can run in GitLab CI/CD to triage issues, review merge requests, and implement changes through controlled pipeline jobs.

  1. Store provider credentials in GitLab CI/CD variables (masked + protected).
  2. Install the alphabase CLI in the job image (npm i -g alphabase-ai).
  3. Run alphabase run non-interactively with the prompt/context for that job.

Example:

.gitlab-ci.yml
alphabase-review:
image: node:22
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
variables:
PROVIDER_API_KEY: $PROVIDER_API_KEY
script:
- npm i -g alphabase-ai
- alphabase run "Review this merge request for regression risks and summarize findings." --format json

Mention-Driven Workflow

Use a trigger phrase in issue/MR comments, for example:

@alphabase review this merge request

A pipeline job triggered by a webhook/bot can parse the comment, then invoke alphabase run with the relevant issue/MR context and post the result back to the thread via the GitLab API.

Security Checklist

  1. Mark sensitive variables as masked and protected.
  2. Use least-privilege service accounts/tokens.
  3. Protect default branch and require MR approvals.
  4. Restrict pipeline permissions for forked contributions.
  5. Log and retain pipeline audit trails.

Rollout Pattern

  1. Read-only analysis jobs first.
  2. Controlled write jobs in staging.
  3. Production write automation after launch-gate verification.

See Launch Gates and Enterprise.