- 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.
52 lines
1.7 KiB
TypeScript
52 lines
1.7 KiB
TypeScript
/**
|
|
* IssueProvider — Abstract interface for issue tracker operations.
|
|
*
|
|
* Implementations: GitHub (gh CLI), GitLab (glab CLI).
|
|
*/
|
|
|
|
/**
|
|
* StateLabel type — string for flexibility with custom workflows.
|
|
*/
|
|
export type StateLabel = string;
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// Issue types
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export type Issue = {
|
|
iid: number;
|
|
title: string;
|
|
description: string;
|
|
labels: string[];
|
|
state: string;
|
|
web_url: string;
|
|
};
|
|
|
|
export type IssueComment = {
|
|
author: string;
|
|
body: string;
|
|
created_at: string;
|
|
};
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// Provider interface
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export interface IssueProvider {
|
|
ensureLabel(name: string, color: string): Promise<void>;
|
|
ensureAllStateLabels(): Promise<void>;
|
|
createIssue(title: string, description: string, label: StateLabel, assignees?: string[]): Promise<Issue>;
|
|
listIssuesByLabel(label: StateLabel): Promise<Issue[]>;
|
|
getIssue(issueId: number): Promise<Issue>;
|
|
listComments(issueId: number): Promise<IssueComment[]>;
|
|
transitionLabel(issueId: number, from: StateLabel, to: StateLabel): Promise<void>;
|
|
closeIssue(issueId: number): Promise<void>;
|
|
reopenIssue(issueId: number): Promise<void>;
|
|
hasStateLabel(issue: Issue, expected: StateLabel): boolean;
|
|
getCurrentStateLabel(issue: Issue): StateLabel | null;
|
|
hasMergedMR(issueId: number): Promise<boolean>;
|
|
getMergedMRUrl(issueId: number): Promise<string | null>;
|
|
addComment(issueId: number, body: string): Promise<void>;
|
|
healthCheck(): Promise<boolean>;
|
|
}
|