Commit Graph

4 Commits

Author SHA1 Message Date
meeks 21eefd9824 fix 5.4: return structured types from get_issue/get_pull_request/create_pull_request/update_pull_request
- IssueTools.get_issue now returns IssueModel instead of JSON string
- PRTools.get_pull_request now returns PullRequestModel instead of JSON string
- PRTools.create_pull_request now returns PullRequestModel instead of JSON string
- PRTools.update_pull_request now returns PullRequestModel instead of JSON string
- All methods have proper return type hints and raise exceptions on error
- Updated tests to verify model objects are returned directly
- Marked issue 5.4 as resolved in bad_code.md
2026-07-19 11:49:54 +02:00
meeks e91780169e refactor: extract focused clients from GiteaClient (Slices 1-6)
- Create gitea/issues_client.py with IssuesClient class (9 methods)
- Create gitea/prs_client.py with PullRequestsClient class (17 methods)
- Create gitea/files_client.py with FilesClient class (4 methods)
- Create gitea/notifications_client.py with NotificationsClient class (2 methods)
- Create gitea/repos_client.py with ReposClient class (2 methods)
- Create gitea/__init__.py to export all client classes
- Remove delegation methods from GiteaClient (now ~70 lines)
- Update all callers to use sub-clients (client.issues, client.prs, etc.)
- Update test files to mock sub-client attributes

GiteaClient is now a facade that provides access to focused sub-clients:
- repos: Repository operations (ReposClient)
- issues: Issue operations (IssuesClient)
- prs: Pull request operations (PullRequestsClient)
- files: File and git ref operations (FilesClient)
- notifications: Notification operations (NotificationsClient)

Refs: #godclass-refactor
2026-07-17 07:37:41 +02:00
meeks 3c94c3cfac refactor: remove duplicate add_comment and add_label methods from IssueTools
- Removed duplicate dd_comment method (kept dd_comment_to_issue)
- Removed duplicate dd_label method (kept dd_label_to_issue)
- Updated dispatcher.py to remove duplicate tool registrations
- Updated coding_prompt.py to reference only dd_comment_to_issue
- Removed corresponding duplicate tests from test_issue_tools.py

This addresses section 10.1 (Confusing Naming) in bad_code.md
2026-07-16 14:33:58 +02:00
mi222eh 5f35f56edc Refactor code structure for improved readability and maintainability 2026-07-06 21:37:20 +02:00