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,
|
self,
|
||||||
config: Optional[Config] = None,
|
config: Optional[Config] = None,
|
||||||
ollama_client: Optional[OllamaClient] = None,
|
ollama_client: Optional[OllamaClient] = None,
|
||||||
|
git_utils: Optional[GitUtils] = None,
|
||||||
repo_path: Optional[str] = None,
|
repo_path: Optional[str] = None,
|
||||||
):
|
):
|
||||||
"""Initialize changelog generator."""
|
"""Initialize changelog generator."""
|
||||||
@@ -36,7 +37,7 @@ class ChangelogGenerator:
|
|||||||
host=self.config.ollama_host,
|
host=self.config.ollama_host,
|
||||||
model=self.config.ollama_model
|
model=self.config.ollama_model
|
||||||
)
|
)
|
||||||
self.git_utils = GitUtils(repo_path)
|
self.git_utils = git_utils or GitUtils(repo_path)
|
||||||
|
|
||||||
def generate(
|
def generate(
|
||||||
self,
|
self,
|
||||||
@@ -160,11 +161,13 @@ Group by type (feat, fix, docs, etc.) and format properly."""
|
|||||||
def get_changelog_generator(
|
def get_changelog_generator(
|
||||||
config: Optional[Config] = None,
|
config: Optional[Config] = None,
|
||||||
ollama_client: Optional[OllamaClient] = None,
|
ollama_client: Optional[OllamaClient] = None,
|
||||||
|
git_utils: Optional[GitUtils] = None,
|
||||||
repo_path: Optional[str] = None,
|
repo_path: Optional[str] = None,
|
||||||
) -> ChangelogGenerator:
|
) -> ChangelogGenerator:
|
||||||
"""Get ChangelogGenerator instance."""
|
"""Get ChangelogGenerator instance."""
|
||||||
return ChangelogGenerator(
|
return ChangelogGenerator(
|
||||||
config=config,
|
config=config,
|
||||||
ollama_client=ollama_client,
|
ollama_client=ollama_client,
|
||||||
|
git_utils=git_utils,
|
||||||
repo_path=repo_path,
|
repo_path=repo_path,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user