UNPKG

@bobmatnyc/ai-code-review

Version:

A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter

94 lines (93 loc) 3.24 kB
/** * @fileoverview GitHub Projects API client for interacting with GitHub Projects. * * This module provides functionality for interacting with GitHub Projects (new version) * using the GitHub GraphQL API. It allows for reading and writing project data, * syncing PROJECT.md content with GitHub Projects, and managing project items. */ /** * GitHub Projects client configuration */ interface GitHubProjectsConfig { token: string; projectId?: string; projectNumber?: number; owner: string; } /** * Project item interface */ interface ProjectItem { id: string; title: string; body?: string; status?: string; } /** * Get GitHub Projects configuration from environment variables * @returns GitHub Projects configuration */ export declare function getGitHubProjectsConfig(): GitHubProjectsConfig; /** * Get project information by ID or number * @param config GitHub Projects configuration * @returns Project information */ export declare function getProjectInfo(config: GitHubProjectsConfig): Promise<any>; /** * Get project items * @param config GitHub Projects configuration * @returns Project items */ export declare function getProjectItems(config: GitHubProjectsConfig): Promise<ProjectItem[]>; /** * Create a new project item * @param config GitHub Projects configuration * @param title Item title * @param body Item body * @returns Created item */ export declare function createProjectItem(config: GitHubProjectsConfig, title: string, body: string): Promise<ProjectItem>; /** * Update a project item * @param config GitHub Projects configuration * @param itemId Item ID * @param title New title * @param body New body * @returns Updated item */ export declare function updateProjectItem(config: GitHubProjectsConfig, itemId: string, title: string, body: string): Promise<ProjectItem>; /** * Parse PROJECT.md content into sections * @param content PROJECT.md content * @returns Parsed sections */ export declare function parseProjectMd(content: string): { [key: string]: string; }; /** * Update GitHub Project readme with PROJECT.md content * @param projectMdPath Path to PROJECT.md file * @param config GitHub Projects configuration */ export declare function updateProjectDescription(projectMdPath: string, config: GitHubProjectsConfig): Promise<void>; /** * Sync PROJECT.md content with GitHub Projects * @param projectMdPath Path to PROJECT.md file * @param config GitHub Projects configuration * @param updateDescriptionOnly Whether to only update the project description */ export declare function syncProjectMdToGitHub(projectMdPath: string, config: GitHubProjectsConfig, updateDescriptionOnly?: boolean): Promise<void>; /** * Generate PROJECT.md content from GitHub Projects * @param config GitHub Projects configuration * @returns Generated PROJECT.md content */ export declare function generateProjectMdFromGitHub(config: GitHubProjectsConfig): Promise<string>; /** * Sync GitHub Projects content to PROJECT.md * @param projectMdPath Path to PROJECT.md file * @param config GitHub Projects configuration */ export declare function syncGitHubToProjectMd(projectMdPath: string, config: GitHubProjectsConfig): Promise<void>; export {};