refactor: migrate role handling from tiers to roles module
- Removed the deprecated tiers.ts file and migrated all related functionality to roles/index.js. - Updated tests and tools to reflect the new role structure, replacing references to "dev", "qa", and "architect" with "developer", "tester", and "architect". - Adjusted workflow configurations and state management to accommodate the new role naming conventions. - Enhanced project registration and health check tools to support dynamic role handling. - Updated task creation, update, and completion processes to align with the new role definitions. - Improved documentation and comments to clarify role responsibilities and usage.
This commit is contained in:
@@ -2,34 +2,13 @@
|
||||
* IssueProvider — Abstract interface for issue tracker operations.
|
||||
*
|
||||
* Implementations: GitHub (gh CLI), GitLab (glab CLI).
|
||||
*
|
||||
* Note: STATE_LABELS and LABEL_COLORS are kept for backward compatibility
|
||||
* but new code should use the workflow config via lib/workflow.ts.
|
||||
*/
|
||||
import { DEFAULT_WORKFLOW, getStateLabels, getLabelColors } from "../workflow.js";
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// State labels — derived from default workflow for backward compatibility
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @deprecated Use workflow.getStateLabels() instead.
|
||||
* Kept for backward compatibility with existing code.
|
||||
*/
|
||||
export const STATE_LABELS = getStateLabels(DEFAULT_WORKFLOW) as readonly string[];
|
||||
|
||||
/**
|
||||
* StateLabel type — union of all valid state labels.
|
||||
* This remains a string type for flexibility with custom workflows.
|
||||
* StateLabel type — string for flexibility with custom workflows.
|
||||
*/
|
||||
export type StateLabel = string;
|
||||
|
||||
/**
|
||||
* @deprecated Use workflow.getLabelColors() instead.
|
||||
* Kept for backward compatibility with existing code.
|
||||
*/
|
||||
export const LABEL_COLORS: Record<string, string> = getLabelColors(DEFAULT_WORKFLOW);
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Issue types
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -70,6 +49,3 @@ export interface IssueProvider {
|
||||
addComment(issueId: number, body: string): Promise<void>;
|
||||
healthCheck(): Promise<boolean>;
|
||||
}
|
||||
|
||||
/** @deprecated Use IssueProvider */
|
||||
export type TaskManager = IssueProvider;
|
||||
|
||||
Reference in New Issue
Block a user