Skip to content

GitLab (and other code hosting platform) Support #1

Description

@chbrown13

This project currently only evaluates GitHub repositories with the PyGithub library, however many open-source repositories are hosted on other platforms such as GitLab (gitlab.com or self-hosted).

TODO: add feature for GitLab support

Below is the proposed architecture and plan generated by AI (opencode 1.17.8, Big Pickle model)

Proposed design

  1. Define a RepoAdapter protocol/ABC that abstracts the methods used by
    the 9 eval functions (get_license, get_languages, get_contributors,
    get_contents, get_issues, has_wiki, etc.)
  2. Implement a GitLabAdapter using the python-gitlab library
  3. Detect the platform from the URL (github.com vs gitlab.com) and
    auto-select the adapter; support self-hosted GitLab instances via a
    config option
  4. Add GITLAB_TOKEN env var alongside GITHUB_TOKEN
  5. Update the agent instructions (project-evaluator.agent.md) with
    GitLab-specific API URLs for manual evaluation fallback
  6. Update README and config.example.yaml

API mapping notes

Criterion GitHub (PyGithub) GitLab (python-gitlab)
Licensing repo.get_license() project.license (dict attr)
Technology repo.get_languages() project.languages()
Activity repo.get_stats_commit_activity() No direct weekly stats – query commits by date range
Contributors repo.get_contributors() project.repository_members.list()
Product Size repo.get_languages() sum bytes project.languages()
Issue Tracker repo.get_issues() project.issues.list()
New Contributor repo.get_contents(path) project.files.get(file_path=...)
Community repo.get_contents(path) project.files.get(file_path=...)
User Base stars/forks/releases attrs project.star_count / forks_count / releases.list()

Future extensibility

The RepoAdapter pattern also makes it straightforward to add other
platforms later (Bitbucket, SourceForge, Codeberg, Gitea, etc.) — each
just needs a new adapter class implementing the same protocol.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions