feat: Implement GitHub issue validation management and UI enhancements

- Introduced CRUD operations for GitHub issue validation results, including storage and retrieval.
- Added new endpoints for checking validation status, stopping validations, and deleting stored validations.
- Enhanced the GitHub routes to support validation management features.
- Updated the UI to display validation results and manage validation states for GitHub issues.
- Integrated event handling for validation progress and completion notifications.
This commit is contained in:
Kacper
2025-12-23 18:15:30 +01:00
parent 5f0ecc8dd6
commit 6acb751eb3
19 changed files with 1279 additions and 137 deletions

View File

@@ -13,6 +13,9 @@ export {
getImagesDir,
getContextDir,
getWorktreesDir,
getValidationsDir,
getValidationDir,
getValidationPath,
getAppSpecPath,
getBranchTrackingPath,
ensureAutomakerDir,

View File

@@ -111,6 +111,44 @@ export function getWorktreesDir(projectPath: string): string {
return path.join(getAutomakerDir(projectPath), 'worktrees');
}
/**
* Get the validations directory for a project
*
* Stores GitHub issue validation results, organized by issue number.
*
* @param projectPath - Absolute path to project directory
* @returns Absolute path to {projectPath}/.automaker/validations
*/
export function getValidationsDir(projectPath: string): string {
return path.join(getAutomakerDir(projectPath), 'validations');
}
/**
* Get the directory for a specific issue validation
*
* Contains validation result and metadata for a GitHub issue.
*
* @param projectPath - Absolute path to project directory
* @param issueNumber - GitHub issue number
* @returns Absolute path to {projectPath}/.automaker/validations/{issueNumber}
*/
export function getValidationDir(projectPath: string, issueNumber: number): string {
return path.join(getValidationsDir(projectPath), String(issueNumber));
}
/**
* Get the validation result file path for a GitHub issue
*
* Stores the JSON validation result including verdict, analysis, and metadata.
*
* @param projectPath - Absolute path to project directory
* @param issueNumber - GitHub issue number
* @returns Absolute path to {projectPath}/.automaker/validations/{issueNumber}/validation.json
*/
export function getValidationPath(projectPath: string, issueNumber: number): string {
return path.join(getValidationDir(projectPath, issueNumber), 'validation.json');
}
/**
* Get the app spec file path for a project
*