How haesleinhuepf/git-bob works
Main Components
• GitHub & GitLab CI Integration: Show the workflow files (in .github/workflows and .gitlab) that trigger git-bob. These workflows receive triggers (e.g., “git-bob comment”, “git-bob solve”) from issues and PR comments.
• Trigger and Issue Handling Module: Represent the module(s) that detect commands from GitHub issues/PRs (such as in tests and endpoints modules) and “orchestrate” the whole process.
• Core Business Logic (Python Package – src/git_bob): Emphasize the primary Python package that contains submodules:
• _github_utilities and _gitlab_utilities (for interacting with the respective platforms),
• _endpoints and _ai_github_utilities (for communicating with external LLM endpoints),
• _logger, _terminal, and _utilities (for internal system management and logging).
• Plugin / Extension Architecture: The system’s design allows for adding new trigger words and prompt handlers via the plugin system (configured via setup.cfg and entry points). Mark this as a separate component that interfaces with the core modules.
• Data Management & File Interactions: Show how the system accesses various file types (e.g., Jupyter notebooks, markdown, PowerPoint files inside the “data” folder) and logs interactions for reproducibility and traceability.
Relationships and Interactions
• A clear flow:
a. Trigger: GitHub/GitLab CI workflow (initiated by a user comment on an issue or PR) →
b. Workflow Execution: Calls the git-bob command line tool (or library) that internally calls modules in src/git_bob.
c. Processing: The core logic processes the request, using _github_utilities/_gitlab_utilities to fetch or comment on issues, and _endpoints to call the correct LLM endpoint.
d. Response: The response (e.g., a comment, a pull request modification, or creation) is sent back to the source platform.
Architectural Patterns and Design Principles
• Modularization: Clearly separate CI integration, core logic, external service communications, and plugin extensions.
• Plugin Architecture: Highlight the extensibility point where additional functionalities (trigger words or prompt handlers) can be added.
• Separation of Concerns: Distinguish between business logic (handling the AI interactions/conversation flow) and integration logic (platform communications using PyGithub and GitLab utilities).
Technologies, Frameworks, and Libraries
• Python 3.x (shown via setup.py, pyproject.toml, requirements.txt)
• GitHub Workflows & GitLab CI (via YAML files in .github/workflows and .gitlab)
• PyGithub library for GitHub interaction
• External LLM API integrations (with configurable API keys as environment variables)
• Testing frameworks (pytest integrated with the tests/ directory)
• Documentation (docs/) to assist with installation and usage tutorials