fix: resolve MarkiTect issue handling system integration problems (issue #120)

- Fix issue manager to properly read API token and repo info from main MarkiTect config
- Update Gitea plugin to use correct repository-specific API endpoints
- Correct domain model mapping to only include valid Issue model fields
- Fix presentation layer to safely access optional body attribute
- Enable full functionality for 'markitect issues show' and 'markitect issues list' commands

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-04 02:14:59 +02:00
parent b83dc14f7b
commit fb968dff34
4 changed files with 84 additions and 17 deletions

View File

@@ -20,6 +20,11 @@ class GiteaPlugin(IssueBackend):
"""Initialize Gitea plugin with configuration."""
super().__init__(config)
# Store repo info for API endpoints
self.repo_owner = config.get('repo_owner', 'coulomb')
self.repo_name = config.get('repo_name', 'markitect_project')
self.repo_full_name = f"{self.repo_owner}/{self.repo_name}"
# Create connection manager with configuration
datasource_config = DataSourceConfig(
gitea_base_url=config.get('url', 'http://92.205.130.254:32166'),
@@ -28,7 +33,9 @@ class GiteaPlugin(IssueBackend):
)
connection_manager = ConnectionManager(datasource_config)
# Create repository with repo info
self.repository = GiteaIssueRepository(connection_manager)
self.repository.set_repo_info(self.repo_owner, self.repo_name)
def list_issues(self, state: Optional[str] = None) -> List[Issue]:
"""List issues from Gitea."""