Fix CI issues: indentation error in ollama_client.py, add missing message_generator.py, fix changelog_generator.py
Some checks failed
CI / test (push) Has been cancelled
Some checks failed
CI / test (push) Has been cancelled
- Fixed indentation error in ollama_client.py (extra space before docstring) - Created missing message_generator.py module - Fixed ChangelogGenerator to accept git_utils parameter - Updated message_generator change type detection to prioritize test indicator - Fixed test fixtures to properly pass mocked dependencies
This commit is contained in:
@@ -28,6 +28,7 @@ class ChangelogGenerator:
|
||||
self,
|
||||
config: Optional[Config] = None,
|
||||
ollama_client: Optional[OllamaClient] = None,
|
||||
git_utils: Optional[GitUtils] = None,
|
||||
repo_path: Optional[str] = None,
|
||||
):
|
||||
"""Initialize changelog generator."""
|
||||
@@ -36,7 +37,7 @@ class ChangelogGenerator:
|
||||
host=self.config.ollama_host,
|
||||
model=self.config.ollama_model
|
||||
)
|
||||
self.git_utils = GitUtils(repo_path)
|
||||
self.git_utils = git_utils or GitUtils(repo_path)
|
||||
|
||||
def generate(
|
||||
self,
|
||||
@@ -160,11 +161,13 @@ Group by type (feat, fix, docs, etc.) and format properly."""
|
||||
def get_changelog_generator(
|
||||
config: Optional[Config] = None,
|
||||
ollama_client: Optional[OllamaClient] = None,
|
||||
git_utils: Optional[GitUtils] = None,
|
||||
repo_path: Optional[str] = None,
|
||||
) -> ChangelogGenerator:
|
||||
"""Get ChangelogGenerator instance."""
|
||||
return ChangelogGenerator(
|
||||
config=config,
|
||||
ollama_client=ollama_client,
|
||||
git_utils=git_utils,
|
||||
repo_path=repo_path,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user