mirror of
https://github.com/johndoe6345789/AutoMetabuilder.git
synced 2026-05-04 10:44:55 +00:00
877ba64de8
- 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.
20 lines
682 B
Python
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
|