feat(labels): standardize automatic label creation to match ecosystem convention
Some checks failed
WHOOSH CI / speclint (push) Has been cancelled
WHOOSH CI / contracts (push) Has been cancelled
WHOOSH CI / speclint (pull_request) Has been cancelled
WHOOSH CI / contracts (pull_request) Has been cancelled

@goal: WHOOSH-LABELS-004, WSH-CONSISTENCY - Ecosystem standardization

Replace custom label set with standardized CHORUS ecosystem labels:
- Add all 8 GitHub-standard labels (bug, duplicate, enhancement, etc.)
- Fix bzzz-task color from #ff6b6b to #5319e7 for consistency
- Remove custom priority labels and whoosh-monitored label
- Maintain backward compatibility and error handling

Changes:
- Updated EnsureRequiredLabels() in internal/gitea/client.go
- Added requirement traceability comments throughout
- Updated integration points in internal/server/server.go
- Created comprehensive decision record

Benefits:
- Consistent labeling across WHOOSH, CHORUS, KACHING repositories
- Familiar GitHub-standard labels for better developer experience
- Improved tool integration and issue management
- Preserved bzzz-task automation for CHORUS workflow

Fixes: WHOOSH issue #4

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude Code
2025-09-21 17:35:15 +10:00
parent 827e332e16
commit b4b1cce902
3 changed files with 212 additions and 21 deletions

View File

@@ -2352,11 +2352,14 @@ func (s *Server) createRepositoryHandler(w http.ResponseWriter, r *http.Request)
}
// Automatically create required labels in the Gitea repository
// @goal: WHOOSH-LABELS-004 - Automatic label creation on repository addition
// WHY: Ensures standardized ecosystem labels are available immediately for issue categorization
if req.SourceType == "gitea" && s.repoMonitor != nil && s.repoMonitor.GetGiteaClient() != nil {
log.Info().
Str("repository", fullName).
Msg("Creating required labels in Gitea repository")
// @goal: WHOOSH-LABELS-004 - Apply standardized label set to new repository
err := s.repoMonitor.GetGiteaClient().EnsureRequiredLabels(context.Background(), req.Owner, req.Name)
if err != nil {
log.Warn().
@@ -2634,7 +2637,8 @@ func (s *Server) ensureRepositoryLabelsHandler(w http.ResponseWriter, r *http.Re
return
}
// Ensure required labels exist
// @goal: WHOOSH-LABELS-004 - Manual label synchronization endpoint
// WHY: Allows updating existing repositories to standardized label set
err = s.repoMonitor.GetGiteaClient().EnsureRequiredLabels(context.Background(), owner, name)
if err != nil {
log.Error().