mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-31 06:42:03 +00:00
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:
@@ -13,6 +13,9 @@ export {
|
||||
getImagesDir,
|
||||
getContextDir,
|
||||
getWorktreesDir,
|
||||
getValidationsDir,
|
||||
getValidationDir,
|
||||
getValidationPath,
|
||||
getAppSpecPath,
|
||||
getBranchTrackingPath,
|
||||
ensureAutomakerDir,
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user