Claude Code on GitLab vs GitHub: Thinner Integration and a Fifth of the Free CI Minutes
If you run Claude Code against your repos, the host you pick decides how much plumbing you build yourself. On GitHub it’s mostly done for you. On GitLab it works, but it’s a beta someone else maintains, and you’ll write part of the wiring. Then there’s the CI bill. Every Claude run in a pipeline is a CI job, and GitLab’s free tier gives you far fewer minutes to spend on it.
Short version: GitHub is the first-class home for Claude automation right now. GitLab is a workable second, and it gets cheaper only when you bring your own runners.
GitHub: one command and a mention
Anthropic maintains the GitHub side itself. The Claude Code GitHub Action (anthropics/claude-code-action@v1) runs Claude inside your workflows. Mention @claude in an issue or a pull request and it reads the thread, works on a branch, pushes commits and answers in a comment.
Setup is one slash command. Run /install-github-app inside Claude Code and it installs the Claude GitHub App, saves your credential as a repository secret and opens a pull request with the workflow files. Merge it and @claude works. The workflow itself is small:
on:
issue_comment:
types: [created]
jobs:
claude:
if: contains(github.event.comment.body, '@claude')
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
steps:
- uses: actions/checkout@v6
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
Two more things tip it. First, auth. Besides an API key, the action takes a CLAUDE_CODE_OAUTH_TOKEN made with claude setup-token, which bills runs to your Pro, Max, Team or Enterprise subscription instead of per-token API pricing. For a solo developer that changes the math a lot. Second, the same GitHub App also powers Claude’s automatic Code Review and auto-fix for pull requests in cloud sessions. Repo access in the Claude app goes through GitHub too. One install, several features.
The command won’t touch GitLab, by the way. If your git remote points at gitlab.com, /install-github-app prints a notice and exits.
GitLab: a beta you finish yourself
The GitLab integration is real and documented. It’s in beta, and GitLab maintains it, not Anthropic. It runs Claude Code as a job in .gitlab-ci.yml, with ANTHROPIC_API_KEY stored as a masked CI/CD variable. Claude works on a branch and opens a merge request, so your branch protection and approvals still apply. You can route inference through the Claude API, Amazon Bedrock or Google Cloud.
The gap is the trigger. On GitHub the @claude mention is built in. On GitLab the quick setup runs the job manually or on merge request events. Mention-driven runs are optional, and you build them: add a project webhook for comment events, point it at a listener of your own, and have that listener call GitLab’s pipeline trigger API with the comment text whenever it contains @claude. That’s a small service you now host and keep alive.
The GitLab docs also only describe API key and cloud-provider auth. There’s no subscription-token path written up there, so plan on API billing.
None of this is hard for a team with a platform engineer. For one person running a dozen repos, it’s the difference between ten minutes of setup and an afternoon, plus a webhook listener to babysit.
The minutes problem
Claude doesn’t run for free on either host. It runs inside a CI job, and the job eats compute minutes while Claude reads files, thinks and edits. Agent runs aren’t quick builds. Several minutes per run is normal.
GitHub’s free plan includes 2,000 minutes a month for private repos, and public repos run on standard hosted runners for free. GitHub also cut hosted runner prices by up to 39% on January 1, 2026. A planned $0.002-per-minute charge on self-hosted runners was postponed in December 2025 and has no new date.
GitLab’s Free tier gives 400 compute minutes a month on GitLab-hosted runners, counted per top-level group, not per user. Premium is $29 per user per month with 10,000 minutes. Ultimate is a custom quote with 50,000. Extra minutes cost $10 per 1,000. New accounts are capped at three top-level groups, so you can’t split work across many groups to stack allowances.
Run the arithmetic. At five minutes per Claude run, 400 minutes buys about 80 runs a month, and that’s before your normal tests and builds take their share. If you also schedule pipelines, the way k4i.com publishes posts unattended on GitHub Actions, GitLab’s free pool is gone in the first week.
Where GitLab still makes sense
Self-hosted runners. On GitLab they consume no compute minutes on any plan, Free included. A spare box or a small VPS running gitlab-runner turns the 400-minute cap into a non-issue, and the Claude job doesn’t care where it runs. If your company already lives on GitLab, especially self-managed GitLab, that’s the sane path: keep your host, run your own runners, accept the beta and build the webhook listener once.
Don’t move to GitLab to save on CI, though. The free tier is smaller, the Claude integration needs more of your time, and the features that make GitHub pleasant with Claude, like subscription auth, built-in mentions and Code Review, don’t come along.
Pick the host for your team. Then budget the minutes.