mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 22:32:04 +00:00
- Add comments section to issue detail panel with lazy loading - Fetch comments via GraphQL API with pagination (50 at a time) - Include comments in AI validation analysis when checkbox enabled - Pass linked PRs info to AI validation for context - Add "Work in Progress" badge in validation dialog for open PRs - Add debug logging for validation requests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
59 lines
2.1 KiB
TypeScript
59 lines
2.1 KiB
TypeScript
/**
|
|
* GitHub routes - HTTP API for GitHub integration
|
|
*/
|
|
|
|
import { Router } from 'express';
|
|
import type { EventEmitter } from '../../lib/events.js';
|
|
import { validatePathParams } from '../../middleware/validate-paths.js';
|
|
import { createCheckGitHubRemoteHandler } from './routes/check-github-remote.js';
|
|
import { createListIssuesHandler } from './routes/list-issues.js';
|
|
import { createListPRsHandler } from './routes/list-prs.js';
|
|
import { createListCommentsHandler } from './routes/list-comments.js';
|
|
import { createValidateIssueHandler } from './routes/validate-issue.js';
|
|
import {
|
|
createValidationStatusHandler,
|
|
createValidationStopHandler,
|
|
createGetValidationsHandler,
|
|
createDeleteValidationHandler,
|
|
createMarkViewedHandler,
|
|
} from './routes/validation-endpoints.js';
|
|
import type { SettingsService } from '../../services/settings-service.js';
|
|
|
|
export function createGitHubRoutes(
|
|
events: EventEmitter,
|
|
settingsService?: SettingsService
|
|
): Router {
|
|
const router = Router();
|
|
|
|
router.post('/check-remote', validatePathParams('projectPath'), createCheckGitHubRemoteHandler());
|
|
router.post('/issues', validatePathParams('projectPath'), createListIssuesHandler());
|
|
router.post('/prs', validatePathParams('projectPath'), createListPRsHandler());
|
|
router.post('/issue-comments', validatePathParams('projectPath'), createListCommentsHandler());
|
|
router.post(
|
|
'/validate-issue',
|
|
validatePathParams('projectPath'),
|
|
createValidateIssueHandler(events, settingsService)
|
|
);
|
|
|
|
// Validation management endpoints
|
|
router.post(
|
|
'/validation-status',
|
|
validatePathParams('projectPath'),
|
|
createValidationStatusHandler()
|
|
);
|
|
router.post('/validation-stop', validatePathParams('projectPath'), createValidationStopHandler());
|
|
router.post('/validations', validatePathParams('projectPath'), createGetValidationsHandler());
|
|
router.post(
|
|
'/validation-delete',
|
|
validatePathParams('projectPath'),
|
|
createDeleteValidationHandler()
|
|
);
|
|
router.post(
|
|
'/validation-mark-viewed',
|
|
validatePathParams('projectPath'),
|
|
createMarkViewedHandler(events)
|
|
);
|
|
|
|
return router;
|
|
}
|