[kimi] Break up _dispatch_via_gitea() into helper functions (#1136) #1183

Merged
kimi merged 1 commits from kimi/issue-1136 into main 2026-03-23 21:40:18 +00:00

1 Commits

Author SHA1 Message Date
kimi
0865354930 refactor: Break up _dispatch_via_gitea() into helper functions (#1136)
Some checks failed
Tests / lint (pull_request) Successful in 18s
Tests / test (pull_request) Failing after 25m30s
Extract helper functions from the 110-line _dispatch_via_gitea():

- _format_assignment_comment() — builds markdown comment body with task details,
  acceptance criteria, and footer
- _select_label() — returns Gitea label for an agent based on AGENT_REGISTRY

Main function now orchestrates: validate → select label → apply label →
format comment → post comment → return result.

Also fixes pre-existing lint issues in test files:
- Remove unused variables in test_config.py
- Fix E402 import order in test_sovereignty_metrics.py

Fixes #1136
2026-03-23 17:39:29 -04:00