import { GitHubBotComplete } from '../webhook'; /** * GitHub 平台特有的 API * 通过 bot.internal 调用 */ export declare class GitHubInternal { private bot; constructor(bot: GitHubBotComplete); /** * 检查静默模式 * @returns 如果处于静默模式返回 true */ private checkSilentMode; /** * 创建 Issue * @param owner 仓库所有者 * @param repo 仓库名称 * @param title Issue 标题 * @param body Issue 内容 * @param labels 标签列表 * @param assignees 分配给的用户列表 */ createIssue(owner: string, repo: string, title: string, body?: string, labels?: string[], assignees?: string[]): Promise<{ id: number; node_id: string; url: string; repository_url: string; labels_url: string; comments_url: string; events_url: string; html_url: string; number: number; state: string; state_reason?: "completed" | "reopened" | "not_planned" | "duplicate" | null; title: string; body?: string | null; user: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; labels: import("@octokit/openapi-types").OneOf<[string, { id?: number; node_id?: string; url?: string; name?: string; description?: string | null; color?: string | null; default?: boolean; }]>[]; assignee: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; assignees?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null; milestone: import("@octokit/openapi-types").components["schemas"]["nullable-milestone"]; locked: boolean; active_lock_reason?: string | null; comments: number; pull_request?: { merged_at?: string | null; diff_url: string | null; html_url: string | null; patch_url: string | null; url: string | null; }; closed_at: string | null; created_at: string; updated_at: string; draft?: boolean; closed_by?: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; body_html?: string; body_text?: string; timeline_url?: string; type?: import("@octokit/openapi-types").components["schemas"]["issue-type"]; repository?: import("@octokit/openapi-types").components["schemas"]["repository"]; performed_via_github_app?: import("@octokit/openapi-types").components["schemas"]["nullable-integration"]; author_association?: import("@octokit/openapi-types").components["schemas"]["author-association"]; reactions?: import("@octokit/openapi-types").components["schemas"]["reaction-rollup"]; sub_issues_summary?: import("@octokit/openapi-types").components["schemas"]["sub-issues-summary"]; parent_issue_url?: string | null; issue_dependencies_summary?: import("@octokit/openapi-types").components["schemas"]["issue-dependencies-summary"]; issue_field_values?: import("@octokit/openapi-types").components["schemas"]["issue-field-value"][]; }>; /** * 关闭 Issue * @param owner 仓库所有者 * @param repo 仓库名称 * @param issueNumber Issue 编号 */ closeIssue(owner: string, repo: string, issueNumber: number): Promise<{ id: number; node_id: string; url: string; repository_url: string; labels_url: string; comments_url: string; events_url: string; html_url: string; number: number; state: string; state_reason?: "completed" | "reopened" | "not_planned" | "duplicate" | null; title: string; body?: string | null; user: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; labels: import("@octokit/openapi-types").OneOf<[string, { id?: number; node_id?: string; url?: string; name?: string; description?: string | null; color?: string | null; default?: boolean; }]>[]; assignee: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; assignees?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null; milestone: import("@octokit/openapi-types").components["schemas"]["nullable-milestone"]; locked: boolean; active_lock_reason?: string | null; comments: number; pull_request?: { merged_at?: string | null; diff_url: string | null; html_url: string | null; patch_url: string | null; url: string | null; }; closed_at: string | null; created_at: string; updated_at: string; draft?: boolean; closed_by?: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; body_html?: string; body_text?: string; timeline_url?: string; type?: import("@octokit/openapi-types").components["schemas"]["issue-type"]; repository?: import("@octokit/openapi-types").components["schemas"]["repository"]; performed_via_github_app?: import("@octokit/openapi-types").components["schemas"]["nullable-integration"]; author_association?: import("@octokit/openapi-types").components["schemas"]["author-association"]; reactions?: import("@octokit/openapi-types").components["schemas"]["reaction-rollup"]; sub_issues_summary?: import("@octokit/openapi-types").components["schemas"]["sub-issues-summary"]; parent_issue_url?: string | null; issue_dependencies_summary?: import("@octokit/openapi-types").components["schemas"]["issue-dependencies-summary"]; issue_field_values?: import("@octokit/openapi-types").components["schemas"]["issue-field-value"][]; }>; /** * 重新打开 Issue * @param owner 仓库所有者 * @param repo 仓库名称 * @param issueNumber Issue 编号 */ reopenIssue(owner: string, repo: string, issueNumber: number): Promise<{ id: number; node_id: string; url: string; repository_url: string; labels_url: string; comments_url: string; events_url: string; html_url: string; number: number; state: string; state_reason?: "completed" | "reopened" | "not_planned" | "duplicate" | null; title: string; body?: string | null; user: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; labels: import("@octokit/openapi-types").OneOf<[string, { id?: number; node_id?: string; url?: string; name?: string; description?: string | null; color?: string | null; default?: boolean; }]>[]; assignee: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; assignees?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null; milestone: import("@octokit/openapi-types").components["schemas"]["nullable-milestone"]; locked: boolean; active_lock_reason?: string | null; comments: number; pull_request?: { merged_at?: string | null; diff_url: string | null; html_url: string | null; patch_url: string | null; url: string | null; }; closed_at: string | null; created_at: string; updated_at: string; draft?: boolean; closed_by?: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; body_html?: string; body_text?: string; timeline_url?: string; type?: import("@octokit/openapi-types").components["schemas"]["issue-type"]; repository?: import("@octokit/openapi-types").components["schemas"]["repository"]; performed_via_github_app?: import("@octokit/openapi-types").components["schemas"]["nullable-integration"]; author_association?: import("@octokit/openapi-types").components["schemas"]["author-association"]; reactions?: import("@octokit/openapi-types").components["schemas"]["reaction-rollup"]; sub_issues_summary?: import("@octokit/openapi-types").components["schemas"]["sub-issues-summary"]; parent_issue_url?: string | null; issue_dependencies_summary?: import("@octokit/openapi-types").components["schemas"]["issue-dependencies-summary"]; issue_field_values?: import("@octokit/openapi-types").components["schemas"]["issue-field-value"][]; }>; /** * 为 Issue 添加标签 * @param owner 仓库所有者 * @param repo 仓库名称 * @param issueNumber Issue 编号 * @param labels 标签列表 */ addIssueLabels(owner: string, repo: string, issueNumber: number, labels: string[]): Promise<{ id: number; node_id: string; url: string; name: string; description: string | null; color: string; default: boolean; }[]>; /** * 移除 Issue 的标签 * @param owner 仓库所有者 * @param repo 仓库名称 * @param issueNumber Issue 编号 * @param label 标签名称 */ removeIssueLabel(owner: string, repo: string, issueNumber: number, label: string): Promise; /** * 为 Issue 分配用户 * @param owner 仓库所有者 * @param repo 仓库名称 * @param issueNumber Issue 编号 * @param assignees 用户列表 */ addIssueAssignees(owner: string, repo: string, issueNumber: number, assignees: string[]): Promise<{ id: number; node_id: string; url: string; repository_url: string; labels_url: string; comments_url: string; events_url: string; html_url: string; number: number; state: string; state_reason?: "completed" | "reopened" | "not_planned" | "duplicate" | null; title: string; body?: string | null; user: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; labels: import("@octokit/openapi-types").OneOf<[string, { id?: number; node_id?: string; url?: string; name?: string; description?: string | null; color?: string | null; default?: boolean; }]>[]; assignee: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; assignees?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null; milestone: import("@octokit/openapi-types").components["schemas"]["nullable-milestone"]; locked: boolean; active_lock_reason?: string | null; comments: number; pull_request?: { merged_at?: string | null; diff_url: string | null; html_url: string | null; patch_url: string | null; url: string | null; }; closed_at: string | null; created_at: string; updated_at: string; draft?: boolean; closed_by?: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; body_html?: string; body_text?: string; timeline_url?: string; type?: import("@octokit/openapi-types").components["schemas"]["issue-type"]; repository?: import("@octokit/openapi-types").components["schemas"]["repository"]; performed_via_github_app?: import("@octokit/openapi-types").components["schemas"]["nullable-integration"]; author_association?: import("@octokit/openapi-types").components["schemas"]["author-association"]; reactions?: import("@octokit/openapi-types").components["schemas"]["reaction-rollup"]; sub_issues_summary?: import("@octokit/openapi-types").components["schemas"]["sub-issues-summary"]; parent_issue_url?: string | null; issue_dependencies_summary?: import("@octokit/openapi-types").components["schemas"]["issue-dependencies-summary"]; issue_field_values?: import("@octokit/openapi-types").components["schemas"]["issue-field-value"][]; }>; /** * 移除 Issue 的分配用户 * @param owner 仓库所有者 * @param repo 仓库名称 * @param issueNumber Issue 编号 * @param assignees 用户列表 */ removeIssueAssignees(owner: string, repo: string, issueNumber: number, assignees: string[]): Promise<{ id: number; node_id: string; url: string; repository_url: string; labels_url: string; comments_url: string; events_url: string; html_url: string; number: number; state: string; state_reason?: "completed" | "reopened" | "not_planned" | "duplicate" | null; title: string; body?: string | null; user: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; labels: import("@octokit/openapi-types").OneOf<[string, { id?: number; node_id?: string; url?: string; name?: string; description?: string | null; color?: string | null; default?: boolean; }]>[]; assignee: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; assignees?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null; milestone: import("@octokit/openapi-types").components["schemas"]["nullable-milestone"]; locked: boolean; active_lock_reason?: string | null; comments: number; pull_request?: { merged_at?: string | null; diff_url: string | null; html_url: string | null; patch_url: string | null; url: string | null; }; closed_at: string | null; created_at: string; updated_at: string; draft?: boolean; closed_by?: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; body_html?: string; body_text?: string; timeline_url?: string; type?: import("@octokit/openapi-types").components["schemas"]["issue-type"]; repository?: import("@octokit/openapi-types").components["schemas"]["repository"]; performed_via_github_app?: import("@octokit/openapi-types").components["schemas"]["nullable-integration"]; author_association?: import("@octokit/openapi-types").components["schemas"]["author-association"]; reactions?: import("@octokit/openapi-types").components["schemas"]["reaction-rollup"]; sub_issues_summary?: import("@octokit/openapi-types").components["schemas"]["sub-issues-summary"]; parent_issue_url?: string | null; issue_dependencies_summary?: import("@octokit/openapi-types").components["schemas"]["issue-dependencies-summary"]; issue_field_values?: import("@octokit/openapi-types").components["schemas"]["issue-field-value"][]; }>; /** * 创建 Pull Request * @param owner 仓库所有者 * @param repo 仓库名称 * @param title PR 标题 * @param head 源分支(格式:用户名:分支名 或 分支名) * @param base 目标分支 * @param body PR 内容 */ createPullRequest(owner: string, repo: string, title: string, head: string, base: string, body?: string): Promise<{ url: string; id: number; node_id: string; html_url: string; diff_url: string; patch_url: string; issue_url: string; commits_url: string; review_comments_url: string; review_comment_url: string; comments_url: string; statuses_url: string; number: number; state: "open" | "closed"; locked: boolean; title: string; user: import("@octokit/openapi-types").components["schemas"]["simple-user"]; body: string | null; labels: { id: number; node_id: string; url: string; name: string; description: string | null; color: string; default: boolean; }[]; milestone: import("@octokit/openapi-types").components["schemas"]["nullable-milestone"]; active_lock_reason?: string | null; created_at: string; updated_at: string; closed_at: string | null; merged_at: string | null; merge_commit_sha: string | null; assignee: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; assignees?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null; requested_reviewers?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null; requested_teams?: import("@octokit/openapi-types").components["schemas"]["team-simple"][] | null; head: { label: string; ref: string; repo: import("@octokit/openapi-types").components["schemas"]["repository"]; sha: string; user: import("@octokit/openapi-types").components["schemas"]["simple-user"]; }; base: { label: string; ref: string; repo: import("@octokit/openapi-types").components["schemas"]["repository"]; sha: string; user: import("@octokit/openapi-types").components["schemas"]["simple-user"]; }; _links: { comments: import("@octokit/openapi-types").components["schemas"]["link"]; commits: import("@octokit/openapi-types").components["schemas"]["link"]; statuses: import("@octokit/openapi-types").components["schemas"]["link"]; html: import("@octokit/openapi-types").components["schemas"]["link"]; issue: import("@octokit/openapi-types").components["schemas"]["link"]; review_comments: import("@octokit/openapi-types").components["schemas"]["link"]; review_comment: import("@octokit/openapi-types").components["schemas"]["link"]; self: import("@octokit/openapi-types").components["schemas"]["link"]; }; author_association: import("@octokit/openapi-types").components["schemas"]["author-association"]; auto_merge: import("@octokit/openapi-types").components["schemas"]["auto-merge"]; draft?: boolean; merged: boolean; mergeable: boolean | null; rebaseable?: boolean | null; mergeable_state: string; merged_by: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; comments: number; review_comments: number; maintainer_can_modify: boolean; commits: number; additions: number; deletions: number; changed_files: number; }>; /** * 关闭 Pull Request * @param owner 仓库所有者 * @param repo 仓库名称 * @param pullNumber PR 编号 */ closePullRequest(owner: string, repo: string, pullNumber: number): Promise<{ url: string; id: number; node_id: string; html_url: string; diff_url: string; patch_url: string; issue_url: string; commits_url: string; review_comments_url: string; review_comment_url: string; comments_url: string; statuses_url: string; number: number; state: "open" | "closed"; locked: boolean; title: string; user: import("@octokit/openapi-types").components["schemas"]["simple-user"]; body: string | null; labels: { id: number; node_id: string; url: string; name: string; description: string | null; color: string; default: boolean; }[]; milestone: import("@octokit/openapi-types").components["schemas"]["nullable-milestone"]; active_lock_reason?: string | null; created_at: string; updated_at: string; closed_at: string | null; merged_at: string | null; merge_commit_sha: string | null; assignee: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; assignees?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null; requested_reviewers?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null; requested_teams?: import("@octokit/openapi-types").components["schemas"]["team-simple"][] | null; head: { label: string; ref: string; repo: import("@octokit/openapi-types").components["schemas"]["repository"]; sha: string; user: import("@octokit/openapi-types").components["schemas"]["simple-user"]; }; base: { label: string; ref: string; repo: import("@octokit/openapi-types").components["schemas"]["repository"]; sha: string; user: import("@octokit/openapi-types").components["schemas"]["simple-user"]; }; _links: { comments: import("@octokit/openapi-types").components["schemas"]["link"]; commits: import("@octokit/openapi-types").components["schemas"]["link"]; statuses: import("@octokit/openapi-types").components["schemas"]["link"]; html: import("@octokit/openapi-types").components["schemas"]["link"]; issue: import("@octokit/openapi-types").components["schemas"]["link"]; review_comments: import("@octokit/openapi-types").components["schemas"]["link"]; review_comment: import("@octokit/openapi-types").components["schemas"]["link"]; self: import("@octokit/openapi-types").components["schemas"]["link"]; }; author_association: import("@octokit/openapi-types").components["schemas"]["author-association"]; auto_merge: import("@octokit/openapi-types").components["schemas"]["auto-merge"]; draft?: boolean; merged: boolean; mergeable: boolean | null; rebaseable?: boolean | null; mergeable_state: string; merged_by: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; comments: number; review_comments: number; maintainer_can_modify: boolean; commits: number; additions: number; deletions: number; changed_files: number; }>; /** * 合并 Pull Request * @param owner 仓库所有者 * @param repo 仓库名称 * @param pullNumber PR 编号 * @param commitTitle 合并提交标题 * @param commitMessage 合并提交消息 * @param mergeMethod 合并方式(merge/squash/rebase) */ mergePullRequest(owner: string, repo: string, pullNumber: number, commitTitle?: string, commitMessage?: string, mergeMethod?: 'merge' | 'squash' | 'rebase'): Promise<{ sha: string; merged: boolean; message: string; }>; /** * 为 Pull Request 添加标签 * @param owner 仓库所有者 * @param repo 仓库名称 * @param pullNumber PR 编号 * @param labels 标签列表 */ addPullRequestLabels(owner: string, repo: string, pullNumber: number, labels: string[]): Promise<{ id: number; node_id: string; url: string; name: string; description: string | null; color: string; default: boolean; }[]>; /** * 为 Pull Request 分配审查者 * @param owner 仓库所有者 * @param repo 仓库名称 * @param pullNumber PR 编号 * @param reviewers 审查者用户名列表 * @param teamReviewers 审查团队名称列表 */ requestPullRequestReviewers(owner: string, repo: string, pullNumber: number, reviewers?: string[], teamReviewers?: string[]): Promise<{ url: string; id: number; node_id: string; html_url: string; diff_url: string; patch_url: string; issue_url: string; commits_url: string; review_comments_url: string; review_comment_url: string; comments_url: string; statuses_url: string; number: number; state: string; locked: boolean; title: string; user: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; body: string | null; labels: { id: number; node_id: string; url: string; name: string; description: string; color: string; default: boolean; }[]; milestone: import("@octokit/openapi-types").components["schemas"]["nullable-milestone"]; active_lock_reason?: string | null; created_at: string; updated_at: string; closed_at: string | null; merged_at: string | null; merge_commit_sha: string | null; assignee: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; assignees?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null; requested_reviewers?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null; requested_teams?: import("@octokit/openapi-types").components["schemas"]["team"][] | null; head: { label: string; ref: string; repo: import("@octokit/openapi-types").components["schemas"]["repository"]; sha: string; user: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; }; base: { label: string; ref: string; repo: import("@octokit/openapi-types").components["schemas"]["repository"]; sha: string; user: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; }; _links: { comments: import("@octokit/openapi-types").components["schemas"]["link"]; commits: import("@octokit/openapi-types").components["schemas"]["link"]; statuses: import("@octokit/openapi-types").components["schemas"]["link"]; html: import("@octokit/openapi-types").components["schemas"]["link"]; issue: import("@octokit/openapi-types").components["schemas"]["link"]; review_comments: import("@octokit/openapi-types").components["schemas"]["link"]; review_comment: import("@octokit/openapi-types").components["schemas"]["link"]; self: import("@octokit/openapi-types").components["schemas"]["link"]; }; author_association: import("@octokit/openapi-types").components["schemas"]["author-association"]; auto_merge: import("@octokit/openapi-types").components["schemas"]["auto-merge"]; draft?: boolean; }>; /** * 为 Pull Request 分配用户 * @param owner 仓库所有者 * @param repo 仓库名称 * @param pullNumber PR 编号 * @param assignees 用户列表 */ addPullRequestAssignees(owner: string, repo: string, pullNumber: number, assignees: string[]): Promise<{ id: number; node_id: string; url: string; repository_url: string; labels_url: string; comments_url: string; events_url: string; html_url: string; number: number; state: string; state_reason?: "completed" | "reopened" | "not_planned" | "duplicate" | null; title: string; body?: string | null; user: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; labels: import("@octokit/openapi-types").OneOf<[string, { id?: number; node_id?: string; url?: string; name?: string; description?: string | null; color?: string | null; default?: boolean; }]>[]; assignee: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; assignees?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null; milestone: import("@octokit/openapi-types").components["schemas"]["nullable-milestone"]; locked: boolean; active_lock_reason?: string | null; comments: number; pull_request?: { merged_at?: string | null; diff_url: string | null; html_url: string | null; patch_url: string | null; url: string | null; }; closed_at: string | null; created_at: string; updated_at: string; draft?: boolean; closed_by?: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; body_html?: string; body_text?: string; timeline_url?: string; type?: import("@octokit/openapi-types").components["schemas"]["issue-type"]; repository?: import("@octokit/openapi-types").components["schemas"]["repository"]; performed_via_github_app?: import("@octokit/openapi-types").components["schemas"]["nullable-integration"]; author_association?: import("@octokit/openapi-types").components["schemas"]["author-association"]; reactions?: import("@octokit/openapi-types").components["schemas"]["reaction-rollup"]; sub_issues_summary?: import("@octokit/openapi-types").components["schemas"]["sub-issues-summary"]; parent_issue_url?: string | null; issue_dependencies_summary?: import("@octokit/openapi-types").components["schemas"]["issue-dependencies-summary"]; issue_field_values?: import("@octokit/openapi-types").components["schemas"]["issue-field-value"][]; }>; /** * 创建 Issue/PR 的反应 * @param owner 仓库所有者 * @param repo 仓库名称 * @param issueNumber Issue/PR 编号 * @param content 反应类型(+1/-1/laugh/confused/heart/hooray/rocket/eyes) * @returns 返回反应 ID */ createIssueReaction(owner: string, repo: string, issueNumber: number, content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes'): Promise; /** * 创建 Issue 评论的反应 * @param owner 仓库所有者 * @param repo 仓库名称 * @param commentId 评论 ID * @param content 反应类型(+1/-1/laugh/confused/heart/hooray/rocket/eyes) * @returns 返回反应 ID */ createIssueCommentReaction(owner: string, repo: string, commentId: number, content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes'): Promise; /** * 删除 Issue/PR 的反应 * 注意:只能删除当前认证用户自己创建的反应 * @param owner 仓库所有者 * @param repo 仓库名称 * @param issueNumber Issue/PR 编号 * @param reactionId 反应 ID */ deleteIssueReaction(owner: string, repo: string, issueNumber: number, reactionId: number): Promise; /** * 删除 Issue 评论的反应 * 注意:只能删除当前认证用户自己创建的反应 * @param owner 仓库所有者 * @param repo 仓库名称 * @param commentId 评论 ID * @param reactionId 反应 ID */ deleteIssueCommentReaction(owner: string, repo: string, commentId: number, reactionId: number): Promise; /** * 获取仓库的工作流列表 * @param owner 仓库所有者 * @param repo 仓库名称 */ listWorkflows(owner: string, repo: string): Promise<{ id: number; node_id: string; name: string; path: string; state: "active" | "deleted" | "disabled_fork" | "disabled_inactivity" | "disabled_manually"; created_at: string; updated_at: string; url: string; html_url: string; badge_url: string; deleted_at?: string; }[]>; /** * 获取工作流详情 * @param owner 仓库所有者 * @param repo 仓库名称 * @param workflowId 工作流 ID 或文件名 */ getWorkflow(owner: string, repo: string, workflowId: number | string): Promise<{ id: number; node_id: string; name: string; path: string; state: "active" | "deleted" | "disabled_fork" | "disabled_inactivity" | "disabled_manually"; created_at: string; updated_at: string; url: string; html_url: string; badge_url: string; deleted_at?: string; }>; /** * 触发工作流运行 * @param owner 仓库所有者 * @param repo 仓库名称 * @param workflowId 工作流 ID 或文件名 * @param ref 分支或标签名称 * @param inputs 工作流输入参数 */ triggerWorkflow(owner: string, repo: string, workflowId: number | string, ref: string, inputs?: Record): Promise; /** * 获取工作流运行列表 * @param owner 仓库所有者 * @param repo 仓库名称 * @param workflowId 工作流 ID(可选) * @param status 运行状态(可选) */ listWorkflowRuns(owner: string, repo: string, workflowId?: number | string, status?: 'completed' | 'action_required' | 'cancelled' | 'failure' | 'neutral' | 'skipped' | 'stale' | 'success' | 'timed_out' | 'in_progress' | 'queued' | 'requested' | 'waiting'): Promise<{ id: number; name?: string | null; node_id: string; check_suite_id?: number; check_suite_node_id?: string; head_branch: string | null; head_sha: string; path: string; run_number: number; run_attempt?: number; referenced_workflows?: import("@octokit/openapi-types").components["schemas"]["referenced-workflow"][] | null; event: string; status: string | null; conclusion: string | null; workflow_id: number; url: string; html_url: string; pull_requests: import("@octokit/openapi-types").components["schemas"]["pull-request-minimal"][] | null; created_at: string; updated_at: string; actor?: import("@octokit/openapi-types").components["schemas"]["simple-user"]; triggering_actor?: import("@octokit/openapi-types").components["schemas"]["simple-user"]; run_started_at?: string; jobs_url: string; logs_url: string; check_suite_url: string; artifacts_url: string; cancel_url: string; rerun_url: string; previous_attempt_url?: string | null; workflow_url: string; head_commit: import("@octokit/openapi-types").components["schemas"]["nullable-simple-commit"]; repository: import("@octokit/openapi-types").components["schemas"]["minimal-repository"]; head_repository: import("@octokit/openapi-types").components["schemas"]["minimal-repository"]; head_repository_id?: number; display_title: string; }[]>; /** * 获取工作流运行详情 * @param owner 仓库所有者 * @param repo 仓库名称 * @param runId 运行 ID */ getWorkflowRun(owner: string, repo: string, runId: number): Promise<{ id: number; name?: string | null; node_id: string; check_suite_id?: number; check_suite_node_id?: string; head_branch: string | null; head_sha: string; path: string; run_number: number; run_attempt?: number; referenced_workflows?: import("@octokit/openapi-types").components["schemas"]["referenced-workflow"][] | null; event: string; status: string | null; conclusion: string | null; workflow_id: number; url: string; html_url: string; pull_requests: import("@octokit/openapi-types").components["schemas"]["pull-request-minimal"][] | null; created_at: string; updated_at: string; actor?: import("@octokit/openapi-types").components["schemas"]["simple-user"]; triggering_actor?: import("@octokit/openapi-types").components["schemas"]["simple-user"]; run_started_at?: string; jobs_url: string; logs_url: string; check_suite_url: string; artifacts_url: string; cancel_url: string; rerun_url: string; previous_attempt_url?: string | null; workflow_url: string; head_commit: import("@octokit/openapi-types").components["schemas"]["nullable-simple-commit"]; repository: import("@octokit/openapi-types").components["schemas"]["minimal-repository"]; head_repository: import("@octokit/openapi-types").components["schemas"]["minimal-repository"]; head_repository_id?: number; display_title: string; }>; /** * 取消工作流运行 * @param owner 仓库所有者 * @param repo 仓库名称 * @param runId 运行 ID */ cancelWorkflowRun(owner: string, repo: string, runId: number): Promise; /** * 重新运行工作流 * @param owner 仓库所有者 * @param repo 仓库名称 * @param runId 运行 ID */ rerunWorkflow(owner: string, repo: string, runId: number): Promise; }