Skip to content

feat(autofix): Add GitLab repository support#1

Open
dnplkndll wants to merge 28 commits intomainfrom
feat/gitlab-repo-client
Open

feat(autofix): Add GitLab repository support#1
dnplkndll wants to merge 28 commits intomainfrom
feat/gitlab-repo-client

Conversation

@dnplkndll
Copy link
Copy Markdown

@dnplkndll dnplkndll commented Jan 28, 2026

Summary

  • Add GitLab as a supported repository provider for Autofix, enabling Merge Request creation for GitLab repositories alongside existing GitHub PR support
  • Create BaseRepoClient abstract base class defining the common interface for all repository providers
  • Implement GitLabRepoClient using the python-gitlab library with full MR creation capability
  • Add common return types (BranchRefResult, PullRequestResult) ensuring type consistency across providers
  • Add GitHub Actions workflow to build and push Docker images to GCP Artifact Registry
  • Add CodeRabbit configuration for automated code reviews

Changes

New Files

  • src/seer/automation/codebase/base_repo_client.py - Abstract base class with common interface
  • src/seer/automation/codebase/gitlab_repo_client.py - GitLab provider implementation
  • tests/automation/codebase/test_gitlab_repo_client.py - Comprehensive unit tests (40+ test cases)
  • .github/workflows/build-push-gcp.yml - CI workflow for GCP Artifact Registry
  • .coderabbit.yaml - CodeRabbit AI review configuration

Modified Files

  • src/seer/automation/codebase/repo_client.py - Refactored to GitHubRepoClient, inherits from base, adds factory function
  • src/seer/automation/autofix/autofix_context.py - Updated to use BaseRepoClient return type
  • src/seer/configuration.py - Added GITLAB_TOKEN and GITLAB_INSTANCE_URL config
  • src/seer/automation/codebase/models.py - Added GitLabMrReviewComment TypedDict
  • requirements-constraints.txt / requirements.txt - Added python-gitlab>=4.0.0

Architecture

                    BaseRepoClient (ABC)
                           |
          +----------------+----------------+
          |                                 |
    GitHubRepoClient                 GitLabRepoClient
    (refactored)                    (new)

CI/CD

New workflow builds AMD64 Docker images and pushes to:
us-central1-docker.pkg.dev/kencove-prod/kencove-docker-repo/seer

Triggers on:

  • Push to main
  • Merged PRs
  • Manual dispatch

Test plan

  • Run mypy type checking: make mypy
  • Run GitLab client unit tests: pytest tests/automation/codebase/test_gitlab_repo_client.py -v
  • Verify existing GitHub tests still pass: pytest tests/automation/codebase/test_repo_client.py -v
  • Verify Docker image builds and pushes to GCP after merge

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • GitLab support with a provider-agnostic repo client, Langfuse 3.x compatibility and context, and a new project AI configuration.
  • Bug Fixes / Improvements

    • More resilient CI and model-fetch flows with graceful fallbacks, multi-tag image publishing, longer build timeout, and faster dependency installs.
  • Chores

    • Large dependency upgrades, workflow/tooling refinements, and linting/Makefile improvements.
  • Tests

    • Expanded and updated test coverage for GitLab integration, model changes, and related workflows.

✏️ Tip: You can customize this high-level summary in your review settings.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant