Files
AutoMetabuilder/backend/autometabuilder/github_service.py
T
git 877ba64de8 Introduce AutoMetabuilder core components and workflow packages:
- Implement core components: CLI argument parsing, environment loading, GitHub service creation, and logging configuration.
- Add support for OpenAI client setup and model resolution.
- Develop SDLC context loader from GitHub and repository files.
- Implement workflow context and engine builders.
- Introduce major workflow packages: `game_tick_loop` and `contextual_iterative_loop`.
- Update localization files with new package descriptions and labels.
- Streamline web navigation by loading items from a dedicated JSON file.
2026-01-10 00:45:46 +00:00

20 lines
682 B
Python

"""GitHub integration builder."""
import logging
from .github_integration import GitHubIntegration, get_repo_name_from_env
logger = logging.getLogger("autometabuilder")
def create_github_integration(token: str, msgs: dict):
"""Create GitHub integration if possible."""
if not token:
return None
try:
repo_name = get_repo_name_from_env()
gh = GitHubIntegration(token, repo_name)
logger.info(msgs["info_integrated_repo"].format(repo_name=repo_name))
return gh
except Exception as error: # pylint: disable=broad-exception-caught
logger.warning(msgs["warn_github_init_failed"].format(error=error))
return None