@candriajs/git-neko-kit 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-B5x_z1xR.mjs +1 -0
- package/dist/app-COIyIlZp.mjs +1 -0
- package/dist/app-DcXcrOHH.cjs +1 -0
- package/dist/app-eOPQ8Dot.cjs +1 -0
- package/dist/auth-Ccs3QgLP.cjs +1 -0
- package/dist/auth-Db-FCcPo.mjs +1 -0
- package/dist/auth-cHpwbr3m.mjs +1 -0
- package/dist/auth-r8LRtyYY.cjs +1 -0
- package/dist/base-BqtGg502.mjs +0 -0
- package/dist/base-CUzfuEjq.cjs +0 -0
- package/dist/chunk-B9dir_RE.mjs +1 -0
- package/dist/client-Bmkb1ges.cjs +1 -0
- package/dist/client-sGV7POG-.mjs +1 -0
- package/dist/commit-BcWQkCJR.cjs +1 -0
- package/dist/commit-D9L4p6A4.mjs +5 -0
- package/dist/commit-DUYHx6WQ.mjs +1 -0
- package/dist/commit-Dns-Df6e.cjs +5 -0
- package/dist/exports/axios.cjs +1 -1
- package/dist/exports/axios.d.mts +3 -0
- package/dist/exports/axios.mjs +1 -1
- package/dist/exports/chunk-CUT6urMc.cjs +1 -0
- package/dist/exports/dayjs.cjs +1 -1
- package/dist/exports/dayjs.d.mts +2 -0
- package/dist/exports/dayjs.mjs +1 -1
- package/dist/exports/exec.cjs +1 -1
- package/dist/exports/exec.d.mts +1 -0
- package/dist/exports/exec.mjs +1 -1
- package/dist/exports/markdown.cjs +1 -1
- package/dist/exports/markdown.d.mts +2 -0
- package/dist/exports/markdown.mjs +1 -1
- package/dist/exports/simple-git.cjs +1 -1
- package/dist/exports/simple-git.d.mts +3 -0
- package/dist/exports/simple-git.mjs +1 -1
- package/dist/index.cjs +1 -6
- package/dist/index.d.mts +4232 -0
- package/dist/index.mjs +1 -6
- package/dist/issue-BFS72RBD.mjs +1 -0
- package/dist/issue-DWeE5P0Y.mjs +1 -0
- package/dist/issue-D_dZXgBG.cjs +1 -0
- package/dist/issue-DgiPQKQ2.cjs +1 -0
- package/dist/org-BDE4cv_c.cjs +1 -0
- package/dist/org-C-sgE96B.cjs +1 -0
- package/dist/org-DGNhfEZK.mjs +1 -0
- package/dist/org-DUBwi6B4.mjs +1 -0
- package/dist/pull_request-C2kirVoE.mjs +1 -0
- package/dist/pull_request-CfU8bWD3.mjs +1 -0
- package/dist/pull_request-FH9SDPpy.cjs +1 -0
- package/dist/pull_request-YYuNBRfz.cjs +1 -0
- package/dist/repo-BovlwNiC.mjs +1 -0
- package/dist/repo-C3bmC1kp.mjs +1 -0
- package/dist/repo-CCp3AF4M.cjs +1 -0
- package/dist/repo-CUJpctL3.cjs +1 -0
- package/dist/root--c209M1Y.mjs +1 -0
- package/dist/root-s6IKP4Xz.cjs +1 -0
- package/dist/root.cjs +1 -1
- package/dist/root.d.mts +5 -0
- package/dist/root.mjs +1 -1
- package/dist/search-D_6p-na8.cjs +1 -0
- package/dist/search-DxL-o1yv.mjs +1 -0
- package/dist/search-VShiQDs8.cjs +1 -0
- package/dist/search-bcPx7a6C.mjs +1 -0
- package/dist/user-3KZ4a1kT.cjs +1 -0
- package/dist/user-CkLZNCr4.mjs +1 -0
- package/dist/user-CsxfQJk2.mjs +1 -0
- package/dist/user-DTkgxY1i.cjs +1 -0
- package/dist/webhook-BRAZACxU.cjs +1 -0
- package/dist/webhook-DDN2SS97.mjs +1 -0
- package/dist/webhook-Dqf-QKIA.cjs +1 -0
- package/dist/webhook-at9Unv7b.mjs +1 -0
- package/dist/workflow-6BNjelIP.mjs +1 -0
- package/dist/workflow-D5aU6i5t.cjs +1 -0
- package/dist/workflow-DfSZx8u4.cjs +1 -0
- package/dist/workflow-vxjTvuWu.mjs +1 -0
- package/package.json +14 -9
- package/dist/exports/axios.d.ts +0 -7
- package/dist/exports/dayjs.d.ts +0 -1
- package/dist/exports/exec.d.ts +0 -1
- package/dist/exports/lodash.cjs +0 -1
- package/dist/exports/lodash.d.ts +0 -3
- package/dist/exports/lodash.mjs +0 -1
- package/dist/exports/markdown.d.ts +0 -1
- package/dist/exports/simple-git.d.ts +0 -2
- package/dist/index.d.ts +0 -4165
- package/dist/root.d.ts +0 -4
package/dist/index.d.ts
DELETED
@@ -1,4165 +0,0 @@
|
|
1
|
-
import { RawAxiosResponseHeaders, AxiosResponseHeaders } from 'axios';
|
2
|
-
|
3
|
-
/** 代理地址类型 */
|
4
|
-
type ProxyUrlType = string;
|
5
|
-
/**
|
6
|
-
* 代理类型:
|
7
|
-
* - reverse: 反向代理
|
8
|
-
* - original: 原始代理
|
9
|
-
* - common: 通用代理
|
10
|
-
*/
|
11
|
-
declare enum ProxyType {
|
12
|
-
/** 反向代理 */
|
13
|
-
Reverse = "reverse",
|
14
|
-
/** 原始代理 */
|
15
|
-
Original = "original",
|
16
|
-
/** 通用代理 */
|
17
|
-
Common = "common"
|
18
|
-
}
|
19
|
-
/** Git类型 */
|
20
|
-
type GitType = 'github' | 'gitee' | 'gitcode';
|
21
|
-
/** 代理协议类型 */
|
22
|
-
declare enum ProxyProtocol {
|
23
|
-
/** HTTP */
|
24
|
-
HTTP = "http",
|
25
|
-
/** HTTPS */
|
26
|
-
HTTPS = "https",
|
27
|
-
/** SOCKS */
|
28
|
-
SOCKS = "socks"
|
29
|
-
}
|
30
|
-
/**
|
31
|
-
* 基本代理配置
|
32
|
-
* @typeparam T - 代理类型或协议类型
|
33
|
-
*/
|
34
|
-
interface BaseProxyType<T extends ProxyType | ProxyProtocol> {
|
35
|
-
type: T;
|
36
|
-
address: ProxyUrlType;
|
37
|
-
}
|
38
|
-
/** 代理配置参数类型 */
|
39
|
-
type ProxyParamsType = BaseProxyType<ProxyProtocol.HTTP> | BaseProxyType<ProxyProtocol.HTTPS> | BaseProxyType<ProxyProtocol.SOCKS> | BaseProxyType<ProxyType.Common> | BaseProxyType<ProxyType.Reverse>;
|
40
|
-
|
41
|
-
/** 本地Git仓库信息 */
|
42
|
-
interface GitRepoInfoType {
|
43
|
-
/** 文件夹名称 */
|
44
|
-
name: string;
|
45
|
-
/** 文件夹路径 */
|
46
|
-
path: string;
|
47
|
-
/**
|
48
|
-
* git地址,原始地址可能是反代的地址
|
49
|
-
* */
|
50
|
-
url: string;
|
51
|
-
/**
|
52
|
-
* 仓库地址, 这个是经过处理的,保证是不经过任何代理地址的地址
|
53
|
-
* */
|
54
|
-
html_url: string;
|
55
|
-
/** 仓库名称 */
|
56
|
-
owner: string;
|
57
|
-
/** 仓库名称 */
|
58
|
-
repo: string;
|
59
|
-
/** 仓库的默认分支 */
|
60
|
-
default_branch: string | null;
|
61
|
-
}
|
62
|
-
/** 获取本地路径的Git仓库信息列表 */
|
63
|
-
interface GitInfoListType {
|
64
|
-
/** 总数 */
|
65
|
-
total: number;
|
66
|
-
items: Array<GitRepoInfoType>;
|
67
|
-
}
|
68
|
-
interface GitRepoInfoListOptionsType {
|
69
|
-
/** 是否递归查找 */
|
70
|
-
loop?: boolean;
|
71
|
-
/** 递归最大深度 */
|
72
|
-
maxDepth?: number;
|
73
|
-
/** 忽略目录 */
|
74
|
-
dir?: string[];
|
75
|
-
}
|
76
|
-
|
77
|
-
/** Npm包信息 */
|
78
|
-
interface NpmPackageInfoType {
|
79
|
-
/** 包名 */
|
80
|
-
name: string;
|
81
|
-
/** 文件夹路径 */
|
82
|
-
path: string;
|
83
|
-
/** 仓库地址 */
|
84
|
-
html_url: string;
|
85
|
-
/** 仓库名称 */
|
86
|
-
owner: string;
|
87
|
-
/** 仓库名称 */
|
88
|
-
repo: string;
|
89
|
-
/** 默认分支 */
|
90
|
-
default_branch: string;
|
91
|
-
}
|
92
|
-
interface NpmPackageInfoListOptionsType {
|
93
|
-
/** 忽略的包名 */
|
94
|
-
packageName: string[];
|
95
|
-
/** 包名前缀 */
|
96
|
-
prefix: string;
|
97
|
-
}
|
98
|
-
interface NpmPackageInfoListType {
|
99
|
-
/** 总数 */
|
100
|
-
total: number;
|
101
|
-
/** 包列表 */
|
102
|
-
items: Array<NpmPackageInfoType>;
|
103
|
-
}
|
104
|
-
|
105
|
-
interface PkgInfoType {
|
106
|
-
/** 包名 */
|
107
|
-
name: string;
|
108
|
-
/** 包版本 */
|
109
|
-
version: string;
|
110
|
-
/** 描述 */
|
111
|
-
description?: string;
|
112
|
-
/** 主入口文件 */
|
113
|
-
main?: string;
|
114
|
-
/** 关键字 */
|
115
|
-
keywords?: string[];
|
116
|
-
dependencies?: Record<string, string>;
|
117
|
-
/** 作者信息 */
|
118
|
-
author?: string | {
|
119
|
-
name: string;
|
120
|
-
email?: string;
|
121
|
-
url?: string;
|
122
|
-
};
|
123
|
-
/** 许可证 */
|
124
|
-
license?: string;
|
125
|
-
/** 仓库信息 */
|
126
|
-
repository?: string | {
|
127
|
-
type: string;
|
128
|
-
url: string;
|
129
|
-
};
|
130
|
-
/** 问题追踪 */
|
131
|
-
bugs?: {
|
132
|
-
url?: string;
|
133
|
-
email?: string;
|
134
|
-
};
|
135
|
-
/** 主页 */
|
136
|
-
homepage?: string;
|
137
|
-
}
|
138
|
-
|
139
|
-
/** 请求令牌的类型 */
|
140
|
-
type RequestTokenType = 'Bearer' | 'Basic';
|
141
|
-
/** 请求配置类型 */
|
142
|
-
interface RequestConfigType {
|
143
|
-
/** 请求地址 */
|
144
|
-
url?: string;
|
145
|
-
/** 访问令牌令牌 */
|
146
|
-
token?: string | null;
|
147
|
-
/** 令牌类型,默认为 Bearer,即使用 Bearer 令牌 */
|
148
|
-
tokenType?: RequestTokenType;
|
149
|
-
}
|
150
|
-
|
151
|
-
/** 是否响应成功类型 */
|
152
|
-
type ResponseSuccessType = boolean;
|
153
|
-
/** 状态码响应类型 */
|
154
|
-
type ResponseStatusCodeType = number;
|
155
|
-
/** 消息响应类型 */
|
156
|
-
type ResponseMsgType = string;
|
157
|
-
/** 响应头类型 */
|
158
|
-
type ResponseHeadersType = RawAxiosResponseHeaders | AxiosResponseHeaders;
|
159
|
-
/** 响应类型 */
|
160
|
-
interface ResponseType<D = any> {
|
161
|
-
success: ResponseSuccessType;
|
162
|
-
statusCode: ResponseStatusCodeType;
|
163
|
-
headers: ResponseHeadersType;
|
164
|
-
msg: ResponseMsgType;
|
165
|
-
data: D;
|
166
|
-
}
|
167
|
-
/** API响应类型 */
|
168
|
-
interface ApiResponseType<D = any> extends Omit<ResponseType<D>, 'headers'> {
|
169
|
-
status: 'ok' | 'error';
|
170
|
-
}
|
171
|
-
|
172
|
-
interface GitRepoType {
|
173
|
-
/** 仓库的地址 */
|
174
|
-
html_url: string;
|
175
|
-
/** 仓库的拥有者 */
|
176
|
-
owner: string;
|
177
|
-
/** 仓库的名称 */
|
178
|
-
repo: string;
|
179
|
-
}
|
180
|
-
/**
|
181
|
-
* 单日贡献数据
|
182
|
-
*/
|
183
|
-
interface ContributionData {
|
184
|
-
/** 日期字符串,格式为YYYY-MM-DD */
|
185
|
-
date: string;
|
186
|
-
/** 当日的贡献次数 */
|
187
|
-
count: number;
|
188
|
-
}
|
189
|
-
/**
|
190
|
-
* 贡献统计结果
|
191
|
-
*/
|
192
|
-
interface ContributionResult {
|
193
|
-
/** 总贡献次数 */
|
194
|
-
total: number;
|
195
|
-
/**
|
196
|
-
* 二维数组结构的贡献数据
|
197
|
-
* 第一维通常表示周数,第二维表示每周的贡献数据
|
198
|
-
*/
|
199
|
-
contributions: ContributionData[][];
|
200
|
-
}
|
201
|
-
|
202
|
-
interface AccessTokenType {
|
203
|
-
/** 访问令牌 */
|
204
|
-
access_token: string;
|
205
|
-
}
|
206
|
-
interface AccessCodeType {
|
207
|
-
/** 授权码 */
|
208
|
-
code: string;
|
209
|
-
}
|
210
|
-
interface RefreshTokenType {
|
211
|
-
/** 刷新令牌 */
|
212
|
-
refresh_token: string;
|
213
|
-
}
|
214
|
-
interface UserNameParamType {
|
215
|
-
/** 用户名 */
|
216
|
-
username: string;
|
217
|
-
}
|
218
|
-
interface OrgNameParamType {
|
219
|
-
/** 组织登录名 */
|
220
|
-
org: string;
|
221
|
-
}
|
222
|
-
interface UserIdParamType {
|
223
|
-
/** 用户id */
|
224
|
-
user_id: number;
|
225
|
-
}
|
226
|
-
interface RepoOwnerParamType {
|
227
|
-
/** 仓库的拥有者 */
|
228
|
-
owner: string;
|
229
|
-
}
|
230
|
-
interface RepoNameParamType {
|
231
|
-
/** 仓库的名称 */
|
232
|
-
repo: string;
|
233
|
-
}
|
234
|
-
interface RepoUrlParamType {
|
235
|
-
/** 仓库地址 */
|
236
|
-
url: string;
|
237
|
-
}
|
238
|
-
interface ShaParamType {
|
239
|
-
/** 仓库的SHA值 */
|
240
|
-
sha: string;
|
241
|
-
}
|
242
|
-
interface formatParamType {
|
243
|
-
/** 是否格式化 */
|
244
|
-
format: boolean;
|
245
|
-
}
|
246
|
-
/**
|
247
|
-
* 一个仓库基本参数
|
248
|
-
* 包含:
|
249
|
-
* - owner: 仓库拥有者
|
250
|
-
* - repo: 仓库名称
|
251
|
-
*/
|
252
|
-
type RepoBaseParamType = RepoOwnerParamType & RepoNameParamType;
|
253
|
-
/**
|
254
|
-
* 一个仓库参数, 可以是基本参数,也可以是仓库地址
|
255
|
-
* 包含:
|
256
|
-
* - owner: 仓库拥有者
|
257
|
-
* - repo: 仓库名称
|
258
|
-
* - url: 仓库地址
|
259
|
-
*/
|
260
|
-
type RepoParamType = RepoBaseParamType | RepoUrlParamType;
|
261
|
-
/**
|
262
|
-
* 议题参数
|
263
|
-
*/
|
264
|
-
interface IssueNumberParamType {
|
265
|
-
/** 问题id */
|
266
|
-
issue_number: number | string;
|
267
|
-
}
|
268
|
-
/**
|
269
|
-
* 拉取请求ID参数
|
270
|
-
*/
|
271
|
-
interface PullRequestNumberParamType {
|
272
|
-
/** 拉取请求id */
|
273
|
-
pr_number: number;
|
274
|
-
}
|
275
|
-
/**
|
276
|
-
* 工作流参数
|
277
|
-
*/
|
278
|
-
interface workflowIdParamType {
|
279
|
-
/** 工作流id */
|
280
|
-
workflow_id: number | string;
|
281
|
-
}
|
282
|
-
/**
|
283
|
-
* 角色名称参数
|
284
|
-
* - 角色名称
|
285
|
-
* @default 'member'
|
286
|
-
* - admin 管理员
|
287
|
-
* - member 成员
|
288
|
-
*/
|
289
|
-
interface RoleNameType {
|
290
|
-
role: 'admin' | 'member';
|
291
|
-
}
|
292
|
-
interface CommentIdParamType {
|
293
|
-
/** 评论id */
|
294
|
-
comment_id: number | string;
|
295
|
-
}
|
296
|
-
/** App 客户端类型 */
|
297
|
-
interface AppClientType {
|
298
|
-
/** App Client ID */
|
299
|
-
Client_ID?: string | null;
|
300
|
-
/** App Client Secret */
|
301
|
-
Client_Secret?: string | null;
|
302
|
-
/** 私钥内容 */
|
303
|
-
Private_Key?: string | null;
|
304
|
-
/** WebHook Secret */
|
305
|
-
WebHook_Secret?: string | null;
|
306
|
-
}
|
307
|
-
/** 访问令牌客户端类型 */
|
308
|
-
interface AccessTokenClentTYpe {
|
309
|
-
/** 访问令牌 */
|
310
|
-
access_token?: string | null;
|
311
|
-
}
|
312
|
-
|
313
|
-
/** GitHub客户端类型 */
|
314
|
-
type GitHubBaseClient = AppClientType | AccessTokenClentTYpe;
|
315
|
-
type GitHubClientType = GitHubBaseClient & {
|
316
|
-
/** 是否格式化 */
|
317
|
-
readonly format?: formatParamType['format'];
|
318
|
-
};
|
319
|
-
/** 客户端类型 */
|
320
|
-
interface ClientType {
|
321
|
-
/** GitHub客户端 */
|
322
|
-
github: GitHubClientType;
|
323
|
-
}
|
324
|
-
|
325
|
-
/** 用户信息参数类型 */
|
326
|
-
type UserInfoParamType = UserNameParamType;
|
327
|
-
/** 通过用户ID 获取用户信息参数类型 */
|
328
|
-
type UserInfoByIdParamType = UserIdParamType;
|
329
|
-
/** 用户信息响应类型 */
|
330
|
-
interface UserInfoResponseType {
|
331
|
-
/** 账号ID */
|
332
|
-
id: number;
|
333
|
-
/** 账号登录名 */
|
334
|
-
login: string;
|
335
|
-
/** 用户全名 */
|
336
|
-
name: string | null;
|
337
|
-
/** 邮箱 */
|
338
|
-
email: string | null;
|
339
|
-
/**
|
340
|
-
* 账号类型
|
341
|
-
* User: 用户
|
342
|
-
* Organization: 组织
|
343
|
-
*/
|
344
|
-
type: string;
|
345
|
-
/** 账号主页URL */
|
346
|
-
html_url: string;
|
347
|
-
/** 账号头像URL */
|
348
|
-
avatar_url: string;
|
349
|
-
/** 个人简介 */
|
350
|
-
bio: string | null;
|
351
|
-
/** 博客URL */
|
352
|
-
blog: string | null;
|
353
|
-
/** 公开仓库数量 */
|
354
|
-
public_repos: number;
|
355
|
-
/** 粉丝数 */
|
356
|
-
followers: number;
|
357
|
-
/** 关注数 */
|
358
|
-
following: number;
|
359
|
-
}
|
360
|
-
|
361
|
-
interface CommitInfoCommonParamType {
|
362
|
-
/** 提交SHA */
|
363
|
-
sha?: ShaParamType['sha'];
|
364
|
-
}
|
365
|
-
/** Git提交用户信息 */
|
366
|
-
interface GitUser extends Omit<UserInfoResponseType, 'bio' | 'blog' | 'followers' | 'following' | 'public_repos'> {
|
367
|
-
/** 日期字符串 */
|
368
|
-
date: string;
|
369
|
-
}
|
370
|
-
interface Commit$1 {
|
371
|
-
/** 提交的URL */
|
372
|
-
url: string;
|
373
|
-
/** 提交作者信息 */
|
374
|
-
author: GitUser;
|
375
|
-
/** 提交者信息 */
|
376
|
-
committer: GitUser;
|
377
|
-
/** 提交信息 */
|
378
|
-
message: string;
|
379
|
-
/**
|
380
|
-
* 提交标题
|
381
|
-
* 仅在开启格式化消息时返回
|
382
|
-
* @example "feat: add new feature"
|
383
|
-
*/
|
384
|
-
title?: string;
|
385
|
-
/** 提交正文
|
386
|
-
* 仅在开启格式化消息时返回
|
387
|
-
* @example "- add new feature"
|
388
|
-
*/
|
389
|
-
body?: string | null;
|
390
|
-
/** 提交树信息 */
|
391
|
-
tree: {
|
392
|
-
/** 树对象的SHA */
|
393
|
-
sha: string;
|
394
|
-
/** 树对象的URL */
|
395
|
-
url: string;
|
396
|
-
};
|
397
|
-
}
|
398
|
-
interface DiffEntry {
|
399
|
-
/** 文件SHA */
|
400
|
-
sha: string;
|
401
|
-
/** 文件名 */
|
402
|
-
filename: string;
|
403
|
-
/** 文件状态 */
|
404
|
-
status: 'added' | 'removed' | 'modified' | 'renamed' | 'copied' | 'changed' | 'unchanged';
|
405
|
-
/** 新增行数 */
|
406
|
-
additions: number;
|
407
|
-
/** 删除行数 */
|
408
|
-
deletions: number;
|
409
|
-
/** 总变更行数 */
|
410
|
-
changes: number;
|
411
|
-
/** 文件blob URL */
|
412
|
-
blob_url: string;
|
413
|
-
/** 文件原始URL */
|
414
|
-
raw_url: string;
|
415
|
-
}
|
416
|
-
interface CommitStats {
|
417
|
-
/** 新增行数 */
|
418
|
-
additions: number;
|
419
|
-
/** 删除行数 */
|
420
|
-
deletions: number;
|
421
|
-
/** 总变更行数 */
|
422
|
-
total: number;
|
423
|
-
}
|
424
|
-
interface ParentCommit {
|
425
|
-
/** 父提交SHA */
|
426
|
-
sha: string;
|
427
|
-
/** 父提交URL */
|
428
|
-
url: string;
|
429
|
-
}
|
430
|
-
/** 提交参数类型 */
|
431
|
-
type CommitInfoParamType = RepoParamType & CommitInfoCommonParamType;
|
432
|
-
/** 提交信息响应类型 */
|
433
|
-
interface CommitInfoResponseType {
|
434
|
-
/** HTML URL */
|
435
|
-
html_url: string;
|
436
|
-
/** 提交SHA */
|
437
|
-
sha: string;
|
438
|
-
/** 评论URL */
|
439
|
-
comments_url: string;
|
440
|
-
/** 提交信息 */
|
441
|
-
commit: Commit$1;
|
442
|
-
/** 父提交列表 */
|
443
|
-
parents: ParentCommit[];
|
444
|
-
/** 提交统计信息 */
|
445
|
-
stats: CommitStats;
|
446
|
-
/** 变更文件列表 */
|
447
|
-
files: DiffEntry[];
|
448
|
-
}
|
449
|
-
/** 提交列表参数类型 */
|
450
|
-
type CommitListParamType = RepoParamType & {
|
451
|
-
/** SHA 或分支名称,用于指定从哪里开始列出提交 */
|
452
|
-
sha?: ShaParamType['sha'];
|
453
|
-
/** 仅返回包含此文件路径的提交 */
|
454
|
-
path?: string;
|
455
|
-
/** GitHub 用户名或电子邮件地址,用于按提交作者筛选 */
|
456
|
-
author?: string;
|
457
|
-
/** ISO 8601 格式的时间戳 (YYYY-MM-DDTHH:MM:SSZ),仅显示此时间之后更新的结果 */
|
458
|
-
since?: string;
|
459
|
-
/** ISO 8601 格式的时间戳 (YYYY-MM-DDTHH:MM:SSZ),仅返回此时间之前的提交 */
|
460
|
-
until?: string;
|
461
|
-
/** 每页的结果数(最多 100),默认: 30 */
|
462
|
-
per_page?: number;
|
463
|
-
/** 要获取的结果页码,默认: 1 */
|
464
|
-
page?: number;
|
465
|
-
};
|
466
|
-
/** 提交列表响应类型 */
|
467
|
-
type CommitListResponseType = CommitInfoResponseType[];
|
468
|
-
|
469
|
-
/** 仓库所有者参数类型 */
|
470
|
-
type RepoUser = Omit<UserInfoResponseType, 'followers' | 'following' | 'blog' | 'bio' | 'public_repos' | 'email'>;
|
471
|
-
/** 仓库列表参数类型 */
|
472
|
-
interface RepoListBaseParamType {
|
473
|
-
/** 排序方式,可选created, updated, pushed, full_name, 默认为 full_name */
|
474
|
-
sort?: 'created' | 'updated' | 'pushed' | 'full_name';
|
475
|
-
/** 排序方式,可选asc, desc, 默认为 desc */
|
476
|
-
direction?: 'asc' | 'desc';
|
477
|
-
/** 每页数量 */
|
478
|
-
per_page?: number;
|
479
|
-
/** 页码 */
|
480
|
-
page?: number;
|
481
|
-
}
|
482
|
-
interface UserByTokenRepoListParamType extends RepoListBaseParamType {
|
483
|
-
/** 仓库的可见性,可选all, public, private, 默认为 all */
|
484
|
-
visibility?: 'all' | 'public' | 'private';
|
485
|
-
/** 仓库的状态,可选all, public, private, 默认为 all */
|
486
|
-
affiliation?: 'owner' | 'collaborator' | 'organization_member';
|
487
|
-
/** 类型,可选all, owner, member, 默认为 all */
|
488
|
-
type?: 'all' | 'owner' | 'member';
|
489
|
-
}
|
490
|
-
/** 仓库信息请求参数 */
|
491
|
-
type RepoInfoParamType = RepoBaseParamType;
|
492
|
-
/** * 仓库信息 */
|
493
|
-
interface RepoInfoResponseType {
|
494
|
-
/** * 仓库的唯一 ID */
|
495
|
-
id: number;
|
496
|
-
/** * 仓库的名称 */
|
497
|
-
name: string;
|
498
|
-
/** * 仓库的完整名称,包含用户名或组织名 */
|
499
|
-
full_name: string;
|
500
|
-
/** * 仓库拥有者的信息 */
|
501
|
-
owner: RepoUser;
|
502
|
-
/** 仓库是否公开 */
|
503
|
-
public: boolean;
|
504
|
-
/** * 仓库是否私有 */
|
505
|
-
private: boolean;
|
506
|
-
/** * 仓库的可见性 */
|
507
|
-
visibility: 'public' | 'private';
|
508
|
-
/** * 仓库是否是 fork 仓库 */
|
509
|
-
fork: boolean;
|
510
|
-
/** * 仓库是否已归档 */
|
511
|
-
archived: boolean;
|
512
|
-
/** * 仓库是否被禁用 */
|
513
|
-
disabled: boolean;
|
514
|
-
/** * 仓库的 HTML 页面 URL */
|
515
|
-
html_url: string;
|
516
|
-
/** * 仓库的描述信息 */
|
517
|
-
description: string | null;
|
518
|
-
/** * 仓库的 Stargazer 数量 */
|
519
|
-
stargazers_count: number;
|
520
|
-
/** * 仓库的 Watcher 数量 */
|
521
|
-
watchers_count: number;
|
522
|
-
/** * 仓库的主编程语言 */
|
523
|
-
language: string | null;
|
524
|
-
/** * 仓库的 fork 数量 */
|
525
|
-
forks_count: number;
|
526
|
-
/** * 开放的 issue 数量 */
|
527
|
-
open_issues_count: number;
|
528
|
-
/** * 仓库的默认分支 */
|
529
|
-
default_branch: string;
|
530
|
-
/** * 仓库的创建时间 */
|
531
|
-
created_at: string;
|
532
|
-
/** * 仓库的更新时间 */
|
533
|
-
updated_at: string;
|
534
|
-
/** * 仓库的推送时间 */
|
535
|
-
pushed_at: string;
|
536
|
-
}
|
537
|
-
/** 组织仓库列表参数类型 */
|
538
|
-
interface OrgRepoListParmType extends RepoListBaseParamType {
|
539
|
-
/** 组织名称 */
|
540
|
-
org: string;
|
541
|
-
/** 类型,可选all, public, private 默认为 all */
|
542
|
-
type?: 'all' | 'public' | 'private';
|
543
|
-
}
|
544
|
-
/**
|
545
|
-
* 组织仓库列表响应类型
|
546
|
-
* 该类型包含了多个仓库的信息,每个仓库都有自己的详细信息。
|
547
|
-
*/
|
548
|
-
type OrgRepoListResponseType = RepoInfoResponseType[];
|
549
|
-
/** 创建组织仓库请求参数 */
|
550
|
-
interface OrgRepoCreateParamType extends OrgNameParamType {
|
551
|
-
/** 仓库名称 */
|
552
|
-
name: string;
|
553
|
-
/** 仓库描述 */
|
554
|
-
description?: string;
|
555
|
-
/** 仓库主页 */
|
556
|
-
homepage?: string;
|
557
|
-
/** 仓库可见性 */
|
558
|
-
visibility?: 'public' | 'private';
|
559
|
-
/** 是否开启议题issue */
|
560
|
-
has_issues?: boolean;
|
561
|
-
/** 是否开启wiki */
|
562
|
-
has_wiki?: boolean;
|
563
|
-
/** 仓库自动初始化 */
|
564
|
-
auto_init?: boolean;
|
565
|
-
}
|
566
|
-
/** 创建组织仓库响应类型 */
|
567
|
-
type OrgRepoCreateResponseType = RepoInfoResponseType;
|
568
|
-
/** 创建用户仓库参数类型 */
|
569
|
-
type UserRepoCreateParamType = Omit<OrgRepoCreateParamType, 'org'> & RepoOwnerParamType;
|
570
|
-
/** 创建用户仓库响应类型 */
|
571
|
-
type UserRepoCreateResponseType = RepoInfoResponseType;
|
572
|
-
/** 用户仓库列表参数类型 */
|
573
|
-
interface UserRepoListParamType extends RepoListBaseParamType {
|
574
|
-
/** 用户名 */
|
575
|
-
username: string;
|
576
|
-
/** 类型,可选all, owner, member, 默认为 all */
|
577
|
-
type?: 'all' | 'owner' | 'member';
|
578
|
-
}
|
579
|
-
/** 用户仓库列表类型 */
|
580
|
-
type UserRepoListType = Array<RepoInfoResponseType & {
|
581
|
-
/** * 仓库的角色名称 */
|
582
|
-
role_name?: string;
|
583
|
-
}>;
|
584
|
-
/** 仓库语言信息类型 */
|
585
|
-
interface LanguageInfo {
|
586
|
-
/** 编程语言名称 */
|
587
|
-
language: string;
|
588
|
-
/** 语言对应的颜色 */
|
589
|
-
color: string;
|
590
|
-
/** 在仓库中的占比(百分比) */
|
591
|
-
percent: number;
|
592
|
-
/** 该语言的代码字节数 */
|
593
|
-
bytes: number;
|
594
|
-
}
|
595
|
-
/** 仓库语言列表参数类型 */
|
596
|
-
type RepoLanguagesListParamType = RepoBaseParamType;
|
597
|
-
/** 仓库语言列表类型 */
|
598
|
-
interface RepoLanguagesListResponseType {
|
599
|
-
/** 仓库的语言统计信息列表 */
|
600
|
-
languages: LanguageInfo[];
|
601
|
-
}
|
602
|
-
/** 获取仓库可见性参数类型 */
|
603
|
-
type GetRepoVisibilityParamType = RepoBaseParamType;
|
604
|
-
/** 获取仓库可见性响应类型 */
|
605
|
-
type GetRepoVisibilityResponseType = RepoInfoResponseType['visibility'];
|
606
|
-
/** 获取仓库默认分支参数类型 */
|
607
|
-
type GetRepoDefaultBranchParamType = RepoBaseParamType;
|
608
|
-
/** 获取仓库默认分支响应类型 */
|
609
|
-
type GetRepoDefaultBranchResponseType = RepoInfoResponseType['default_branch'];
|
610
|
-
/** 获取仓库主要语言参数类型 */
|
611
|
-
type GetRepoMainLanguageParamType = RepoBaseParamType;
|
612
|
-
/** 仓库主要语言响应类型 */
|
613
|
-
type GetRepoMainLanguageResponseType = RepoInfoResponseType['language'];
|
614
|
-
/**
|
615
|
-
* 协作者权限 ,可选 pull,triage, push, maintain, admin,默认pull
|
616
|
-
* pull - 只读访问,协作者可以查看仓库内容。
|
617
|
-
* push - 允许推送代码到仓库分支,同时拥有 pull 权限。
|
618
|
-
* admin - 拥有仓库的完全控制权,包括更改设置和删除仓库。
|
619
|
-
*/
|
620
|
-
type CollaboratorPermissionType = 'pull' | 'push' | 'admin';
|
621
|
-
/** 协作者参数类型 */
|
622
|
-
type CollaboratorParamType = RepoInfoParamType & UserNameParamType & {
|
623
|
-
/** 邀请的权限 */
|
624
|
-
permission?: CollaboratorPermissionType;
|
625
|
-
};
|
626
|
-
/** 邀请协作者响应类型 */
|
627
|
-
interface AddCollaboratorResponseType {
|
628
|
-
/** 被邀请者ID */
|
629
|
-
id: number;
|
630
|
-
/** 被邀请者用户名 */
|
631
|
-
login: string;
|
632
|
-
/** 被邀请者的别名 */
|
633
|
-
name: string | null;
|
634
|
-
/** 仓库的地址 */
|
635
|
-
html_url: string;
|
636
|
-
/** 被邀请者的权限 */
|
637
|
-
permissions: string;
|
638
|
-
}
|
639
|
-
/** 协作者列表参数类型 */
|
640
|
-
type GetCollaboratorListParamType = RepoInfoParamType & {
|
641
|
-
/**
|
642
|
-
* 筛选按隶属关系返回的协作者
|
643
|
-
* outside - 列出所有外部协作者,包括仓库成员和外部 collaborator。
|
644
|
-
* direct - 列出仓库成员。
|
645
|
-
* all - 列出仓库成员和外部 collaborator。
|
646
|
-
*/
|
647
|
-
affiliation?: 'outside' | 'direct' | 'all';
|
648
|
-
/** 权限 */
|
649
|
-
permission?: CollaboratorPermissionType;
|
650
|
-
/** 每页数量 */
|
651
|
-
per_page?: number;
|
652
|
-
/** 页码 */
|
653
|
-
page?: number;
|
654
|
-
};
|
655
|
-
/** 协作者信息类型 */
|
656
|
-
interface CollaboratorInfoResponseType {
|
657
|
-
/** 协作者id */
|
658
|
-
id: number;
|
659
|
-
/** 协作者登录名 */
|
660
|
-
login: string;
|
661
|
-
/** 头像URL */
|
662
|
-
avatar_url: string;
|
663
|
-
/** 协作者邮箱 */
|
664
|
-
email: string | null;
|
665
|
-
/** 协作者姓名 */
|
666
|
-
name: string | null;
|
667
|
-
/** 权限设置 */
|
668
|
-
permissions: {
|
669
|
-
/** 拉取权限 */
|
670
|
-
pull: boolean;
|
671
|
-
/** 分类权限 */
|
672
|
-
triage: boolean;
|
673
|
-
/** 推送权限 */
|
674
|
-
push: boolean;
|
675
|
-
/** 维护权限 */
|
676
|
-
maintain: boolean;
|
677
|
-
/** 管理权限 */
|
678
|
-
admin: boolean;
|
679
|
-
};
|
680
|
-
}
|
681
|
-
/** 协作者列表响应类型 */
|
682
|
-
type GetCollaboratorListResponseType = CollaboratorInfoResponseType[];
|
683
|
-
/** 移除协作者参数类型 */
|
684
|
-
type RemoveCollaboratorParamType = RepoBaseParamType & UserNameParamType;
|
685
|
-
/** 移除协作者响应类型 */
|
686
|
-
interface RemoveCollaboratorResponseType {
|
687
|
-
/** 是否移除成功 */
|
688
|
-
success: boolean;
|
689
|
-
/** 状态信息 */
|
690
|
-
message: string;
|
691
|
-
}
|
692
|
-
|
693
|
-
type AppUser = Omit<UserInfoResponseType, 'bio' | 'blog' | 'followers' | 'following' | 'public_repos'>;
|
694
|
-
/**
|
695
|
-
* 定义 Base 应用所需的权限
|
696
|
-
*/
|
697
|
-
interface AppPermissions {
|
698
|
-
/** 对仓库内容的权限(例如读取、写入) */
|
699
|
-
contents: string;
|
700
|
-
/** 对部署的权限(例如读取、写入) */
|
701
|
-
deployments: string;
|
702
|
-
/** 对议题的权限(例如写) */
|
703
|
-
issues: string;
|
704
|
-
/** 对检查的权限 */
|
705
|
-
checks: string;
|
706
|
-
/** 对元数据的权限(例如读取) */
|
707
|
-
metadata: string;
|
708
|
-
}
|
709
|
-
interface AppInfoParamType {
|
710
|
-
/**
|
711
|
-
* 应用的标识符
|
712
|
-
* 是https://github.com/settings/apps/:app_slug的
|
713
|
-
* */
|
714
|
-
app_slug: string;
|
715
|
-
}
|
716
|
-
/**
|
717
|
-
* 应用的详细信息
|
718
|
-
*/
|
719
|
-
interface AppInfoResponseType {
|
720
|
-
/** 应用的唯一 ID */
|
721
|
-
id: number;
|
722
|
-
/** 应用的名称 */
|
723
|
-
name: string;
|
724
|
-
/** 应用的 Client ID */
|
725
|
-
client_id: string;
|
726
|
-
/** 应用的标识符(slug) */
|
727
|
-
slug: string;
|
728
|
-
/** 应用所有者的信息 */
|
729
|
-
owner: AppUser;
|
730
|
-
/** 应用的描述 */
|
731
|
-
description: string;
|
732
|
-
/** 应用的外部 URL */
|
733
|
-
external_url: string;
|
734
|
-
/** 应用的 Base 页面 URL */
|
735
|
-
html_url: string;
|
736
|
-
/** 应用所需的权限 */
|
737
|
-
permissions: AppPermissions;
|
738
|
-
/** 应用监听的事件列表 */
|
739
|
-
events: string[];
|
740
|
-
/** 应用创建时间的时间戳 */
|
741
|
-
created_at: string;
|
742
|
-
/** 应用最后更新时间的时间戳 */
|
743
|
-
updated_at: string;
|
744
|
-
}
|
745
|
-
/** GitHub应用安装仓库信息响应类型 */
|
746
|
-
interface AppRepoInfoResponseType {
|
747
|
-
/** 安装的唯一ID */
|
748
|
-
id: number;
|
749
|
-
/** 安装页面URL */
|
750
|
-
html_url: string;
|
751
|
-
/** 应用ID */
|
752
|
-
app_id: number;
|
753
|
-
/** 应用标识符 */
|
754
|
-
app_slug: string;
|
755
|
-
/** 目标ID(用户或组织的ID) */
|
756
|
-
target_id: number;
|
757
|
-
/** 目标类型(如'Organization') */
|
758
|
-
target_type: string;
|
759
|
-
/** 安装的账户信息,可以是用户或企业 */
|
760
|
-
account: AppUser;
|
761
|
-
/** 仓库选择类型 */
|
762
|
-
repository_selection: 'all' | 'selected';
|
763
|
-
/** 访问令牌URL */
|
764
|
-
access_tokens_url: string;
|
765
|
-
/** 仓库列表URL */
|
766
|
-
repositories_url: string;
|
767
|
-
/** 权限配置 */
|
768
|
-
permissions: AppPermissions;
|
769
|
-
/** 事件列表 */
|
770
|
-
events: string[];
|
771
|
-
/** 创建时间 */
|
772
|
-
created_at: string;
|
773
|
-
/** 更新时间 */
|
774
|
-
updated_at: string;
|
775
|
-
}
|
776
|
-
/** 通过仓库信息获取应用信息参数类型 */
|
777
|
-
type GetAppInfoByRepoParamType = RepoInfoParamType;
|
778
|
-
/** 通过仓库信息获取应用信息响应类型 */
|
779
|
-
type GetAppInfoByRepoResponseType = AppRepoInfoResponseType;
|
780
|
-
/** 通过用户信息获取应用信息参数 */
|
781
|
-
type GetAppInfoByUserParamType = UserNameParamType;
|
782
|
-
/** 通过用户信息获取应用信息响应类型 */
|
783
|
-
type GetAppInfoByUserResponseType = AppRepoInfoResponseType;
|
784
|
-
/** 通过用户信息获取应用信息参数 */
|
785
|
-
type GetAppInfoByOrgParamType = OrgNameParamType;
|
786
|
-
/** 通过用户信息获取应用信息响应类型 */
|
787
|
-
type GetAppInfoByOrgResponseType = AppRepoInfoResponseType;
|
788
|
-
/** 访问令牌权限 */
|
789
|
-
interface AccessTokenPermissionsType {
|
790
|
-
/** GitHub Actions 工作流、工作流运行和工件的权限 */
|
791
|
-
actions: 'read' | 'write';
|
792
|
-
/** 存储库创建、删除、设置、团队和协作者创建的权限 */
|
793
|
-
administration: 'read' | 'write';
|
794
|
-
/** 代码检查的权限 */
|
795
|
-
checks: 'read' | 'write';
|
796
|
-
/** 创建、编辑、删除和列出 GitHub Codespaces 的权限 */
|
797
|
-
codespaces: 'read' | 'write';
|
798
|
-
/** 存储库内容、提交、分支、下载、发布和合并的权限 */
|
799
|
-
contents: 'read' | 'write';
|
800
|
-
/** 管理 Dependabot 密钥的权限 */
|
801
|
-
dependabot_secrets: 'read' | 'write';
|
802
|
-
/** 部署和部署状态的权限 */
|
803
|
-
deployments: 'read' | 'write';
|
804
|
-
/** 管理存储库环境的权限 */
|
805
|
-
environments: 'read' | 'write';
|
806
|
-
/** 问题和相关评论、指派、标签和里程碑的权限 */
|
807
|
-
issues: 'read' | 'write';
|
808
|
-
/** 搜索存储库、列出协作者和访问存储库元数据的权限 */
|
809
|
-
metadata: 'read' | 'write';
|
810
|
-
/** 管理 GitHub Packages 发布的包的权限 */
|
811
|
-
packages: 'read' | 'write';
|
812
|
-
/** 获取 Pages 状态、配置和构建的权限,并创建新的构建 */
|
813
|
-
pages: 'read' | 'write';
|
814
|
-
/** 管理拉取请求及相关评论、指派、标签、里程碑和合并的权限 */
|
815
|
-
pull_requests: 'read' | 'write';
|
816
|
-
/** 查看和编辑存储库自定义属性的权限 */
|
817
|
-
repository_custom_properties: 'read' | 'write';
|
818
|
-
/** 管理存储库的 post-receive 钩子的权限 */
|
819
|
-
repository_hooks: 'read' | 'write';
|
820
|
-
/** 管理存储库项目、列和卡片的权限 */
|
821
|
-
repository_projects: 'read' | 'write' | 'admin';
|
822
|
-
/** 查看和管理秘密扫描警报的权限 */
|
823
|
-
secret_scanning_alerts: 'read' | 'write';
|
824
|
-
/** 管理存储库秘密的权限 */
|
825
|
-
secrets: 'read' | 'write';
|
826
|
-
/** 查看和管理安全事件的权限,比如代码扫描警报 */
|
827
|
-
security_events: 'read' | 'write';
|
828
|
-
/** 只管理单个文件的权限 */
|
829
|
-
single_file: 'read' | 'write';
|
830
|
-
/** 管理提交状态的权限 */
|
831
|
-
statuses: 'read' | 'write';
|
832
|
-
/** 管理 Dependabot 警报的权限 */
|
833
|
-
vulnerability_alerts: 'read' | 'write';
|
834
|
-
/** 更新 GitHub Actions 工作流文件的权限 */
|
835
|
-
workflows: 'write';
|
836
|
-
/** 管理组织团队和成员的权限 */
|
837
|
-
members: 'read' | 'write';
|
838
|
-
/** 管理组织访问权限的权限 */
|
839
|
-
organization_administration: 'read' | 'write';
|
840
|
-
/** 管理自定义存储库角色的权限 */
|
841
|
-
organization_custom_roles: 'read' | 'write';
|
842
|
-
/** 管理自定义组织角色的权限 */
|
843
|
-
organization_custom_org_roles: 'read' | 'write';
|
844
|
-
/** 管理自定义属性的权限 */
|
845
|
-
organization_custom_properties: 'read' | 'write' | 'admin';
|
846
|
-
/** 管理 GitHub Copilot 组织成员访问权限的权限 */
|
847
|
-
organization_copilot_seat_management: 'write';
|
848
|
-
/** 查看和管理组织公告横幅的权限 */
|
849
|
-
organization_announcement_banners: 'read' | 'write';
|
850
|
-
/** 查看组织活动的权限 */
|
851
|
-
organization_events: 'read';
|
852
|
-
/** 管理组织的 post-receive 钩子的权限 */
|
853
|
-
organization_hooks: 'read' | 'write';
|
854
|
-
/** 查看和管理组织的个人访问令牌请求的权限 */
|
855
|
-
organization_personal_access_tokens: 'read' | 'write';
|
856
|
-
/** 查看和管理组织批准的个人访问令牌的权限 */
|
857
|
-
organization_personal_access_token_requests: 'read' | 'write';
|
858
|
-
/** 查看组织计划的权限 */
|
859
|
-
organization_plan: 'read';
|
860
|
-
/** 管理组织项目的权限 */
|
861
|
-
organization_projects: 'read' | 'write' | 'admin';
|
862
|
-
/** 管理组织 GitHub Packages 包的权限 */
|
863
|
-
organization_packages: 'read' | 'write';
|
864
|
-
/** 管理组织秘密的权限 */
|
865
|
-
organization_secrets: 'read' | 'write';
|
866
|
-
/** 查看和管理组织 GitHub Actions 自托管运行器的权限 */
|
867
|
-
organization_self_hosted_runners: 'read' | 'write';
|
868
|
-
/** 查看和管理被组织屏蔽的用户的权限 */
|
869
|
-
organization_user_blocking: 'read' | 'write';
|
870
|
-
/** 管理团队讨论和相关评论的权限 */
|
871
|
-
team_discussions: 'read' | 'write';
|
872
|
-
/** 管理用户的电子邮件地址的权限 */
|
873
|
-
email_addresses: 'read' | 'write';
|
874
|
-
/** 管理用户的关注者的权限 */
|
875
|
-
followers: 'read' | 'write';
|
876
|
-
/** 管理 Git SSH 密钥的权限 */
|
877
|
-
git_ssh_keys: 'read' | 'write';
|
878
|
-
/** 查看和管理 GPG 密钥的权限 */
|
879
|
-
gpg_keys: 'read' | 'write';
|
880
|
-
/** 查看和管理存储库的互动限制的权限 */
|
881
|
-
interaction_limits: 'read' | 'write';
|
882
|
-
/** 管理用户的个人资料设置的权限 */
|
883
|
-
profile: 'write';
|
884
|
-
/** 列出和管理用户标星的存储库的权限 */
|
885
|
-
starring: 'read' | 'write';
|
886
|
-
}
|
887
|
-
/** 为应用创建访问令牌参数类型 */
|
888
|
-
interface CreateAccessTokenForAppParamType {
|
889
|
-
/** 应用安装id */
|
890
|
-
installation_id: number;
|
891
|
-
/** 存储库名称列表 */
|
892
|
-
repositories: Array<string>;
|
893
|
-
/** 存储库id列表 */
|
894
|
-
repository_ids: Array<number>;
|
895
|
-
/** 访问令牌权限 */
|
896
|
-
permissions: AccessTokenPermissionsType;
|
897
|
-
}
|
898
|
-
/** 为应用创建访问令牌响应类型 */
|
899
|
-
interface CreateAccessTokenForAppResponseType {
|
900
|
-
/** 访问令牌 */
|
901
|
-
token: string;
|
902
|
-
/** 访问令牌过期时间, UTC 时间格式 */
|
903
|
-
expires_at: string;
|
904
|
-
/** 访问令牌权限 */
|
905
|
-
permissions: Record<string, string>;
|
906
|
-
/** 访问令牌仓库选择范围 */
|
907
|
-
repository_selection: 'all' | 'selected';
|
908
|
-
/** 访问令牌仓库列表 */
|
909
|
-
repositories: Array<RepoInfoResponseType>;
|
910
|
-
}
|
911
|
-
/** 撤销应用程序访问令牌响应类型 */
|
912
|
-
interface RevokeAccessTokenResponseType {
|
913
|
-
/** 是否撤销成功 */
|
914
|
-
success: boolean;
|
915
|
-
/** 撤销结果信息 */
|
916
|
-
message: string;
|
917
|
-
}
|
918
|
-
/** 判断应用程序是否安装在仓库中参数类型 */
|
919
|
-
type isAppInstalledInRepo = RepoBaseParamType;
|
920
|
-
|
921
|
-
/** Github 授权令牌接口返回类型 */
|
922
|
-
interface TokenResponseType {
|
923
|
-
/** 是否成功刷新 */
|
924
|
-
success: boolean;
|
925
|
-
/** 获取访问令牌信息 */
|
926
|
-
message: string;
|
927
|
-
/** 用户访问令牌, 格式为 ghu_ 开头 */
|
928
|
-
access_token: string;
|
929
|
-
/** access_token 过期前的秒数,默认值为 28800(8小时) */
|
930
|
-
expires_in: number | null;
|
931
|
-
/** 刷新令牌,格式为 ghr_ 开头,可能为 null */
|
932
|
-
refresh_token: string | null;
|
933
|
-
/** refresh_token 过期前的秒数,默认值为 15897600(6个月) */
|
934
|
-
refresh_token_expires_in: number | null;
|
935
|
-
/** 令牌范围,默认是空字符串 */
|
936
|
-
scope: string;
|
937
|
-
/** 令牌类型,始终为 'bearer' */
|
938
|
-
token_type: 'bearer';
|
939
|
-
}
|
940
|
-
/** Github 刷新令牌接口返回类型 */
|
941
|
-
interface RefreshTokenResponseType {
|
942
|
-
/** 是否成功刷新 */
|
943
|
-
success: boolean;
|
944
|
-
/** 获取刷新令牌信息 */
|
945
|
-
message: string;
|
946
|
-
/** 用户访问令牌,格式为 ghu_ 开头 */
|
947
|
-
access_token: string;
|
948
|
-
/** access_token 过期前的秒数,默认值为 28800(8小时) */
|
949
|
-
expires_in: number | null;
|
950
|
-
/** 刷新令牌,格式为 ghr_ 开头,可能为 null */
|
951
|
-
refresh_token: string | null;
|
952
|
-
/** refresh_token 过期前的秒数,默认值为 15897600(6个月),可能为 null */
|
953
|
-
refresh_token_expires_in: number | null;
|
954
|
-
/** 令牌范围,默认是空字符串 */
|
955
|
-
scope: string;
|
956
|
-
/** 令牌类型,始终为 'bearer' */
|
957
|
-
token_type: 'bearer';
|
958
|
-
}
|
959
|
-
/** 检查Token状态返回类型 */
|
960
|
-
interface CheckTokenResponseType {
|
961
|
-
/** 令牌是否有效 */
|
962
|
-
success: boolean;
|
963
|
-
/** 状态信息 */
|
964
|
-
message: string;
|
965
|
-
}
|
966
|
-
|
967
|
-
/** 工作流状态 */
|
968
|
-
declare const enum WorkflowState {
|
969
|
-
/** 工作流已激活 */
|
970
|
-
Active = "active",
|
971
|
-
/** 工作流已删除 */
|
972
|
-
Deleted = "deleted",
|
973
|
-
/** for仓库未启用工作流 */
|
974
|
-
DisabledFork = "disabled_fork",
|
975
|
-
/** 工作流已禁用(因为超过30天未使用) */
|
976
|
-
DisabledInactivity = "disabled_inactivity",
|
977
|
-
/** 工作流已禁用(手动) */
|
978
|
-
DisabledManually = "disabled_manually"
|
979
|
-
}
|
980
|
-
/** 工作流信息参数类型 */
|
981
|
-
type WorkflowInfoParamType = RepoBaseParamType & workflowIdParamType;
|
982
|
-
/** 工作流信息响应类型 */
|
983
|
-
interface WorkflowInfoResponseType {
|
984
|
-
/** 工作流id */
|
985
|
-
id: number;
|
986
|
-
/** 工作流所属仓库的URL */
|
987
|
-
html_url: string;
|
988
|
-
/** 工作流名称 */
|
989
|
-
name: string;
|
990
|
-
/** 工作流文件路径 */
|
991
|
-
path: string;
|
992
|
-
/** 工作流状态 */
|
993
|
-
state: WorkflowState;
|
994
|
-
/** 工作流创建时间 */
|
995
|
-
created_at: string;
|
996
|
-
/** 工作流更新时间 */
|
997
|
-
updated_at: string;
|
998
|
-
}
|
999
|
-
/** 获取仓库工作流列表参数类型 */
|
1000
|
-
interface GetRepoWorkflowsList extends RepoBaseParamType {
|
1001
|
-
/** 每页数量 */
|
1002
|
-
per_page?: number;
|
1003
|
-
/** 页码 */
|
1004
|
-
page?: number;
|
1005
|
-
}
|
1006
|
-
/** 获取仓库工作流列表响应类型 */
|
1007
|
-
interface GetRepoWorkflowsListResponseType {
|
1008
|
-
/** 总数 */
|
1009
|
-
total: number;
|
1010
|
-
/** 工作流列表 */
|
1011
|
-
workflows: WorkflowInfoResponseType[];
|
1012
|
-
}
|
1013
|
-
/** 运行仓库工作流参数类型 */
|
1014
|
-
interface RunRepoWorkflow extends WorkflowInfoParamType {
|
1015
|
-
/** 分支或者标签名称 */
|
1016
|
-
ref: string;
|
1017
|
-
/** 工作流输入参数, 该参数最多10个 */
|
1018
|
-
inputs?: Record<string, string | number>;
|
1019
|
-
}
|
1020
|
-
/** 运行仓库工作流响应类型 */
|
1021
|
-
interface RunRepoWorkflowResponseType {
|
1022
|
-
/** 是否成功 */
|
1023
|
-
success: boolean;
|
1024
|
-
/** 运行状态信息 */
|
1025
|
-
message: string;
|
1026
|
-
}
|
1027
|
-
/** 启用仓库工作流参数类型 */
|
1028
|
-
type EnableRepoWorkflowParamType = WorkflowInfoParamType;
|
1029
|
-
/** 启用仓库工作流响应类型 */
|
1030
|
-
interface EnableRepoWorkflowResponseType {
|
1031
|
-
/** 是否成功 */
|
1032
|
-
success: boolean;
|
1033
|
-
/** 启用状态信息 */
|
1034
|
-
message: string;
|
1035
|
-
}
|
1036
|
-
/** 禁用仓库工作流参数类型 */
|
1037
|
-
type DisEnableRepoWorkflowParamType = WorkflowInfoParamType;
|
1038
|
-
/** 禁用仓库工作流响应类型 */
|
1039
|
-
interface DisEnableRepoWorkflowResponseType {
|
1040
|
-
/** 是否成功 */
|
1041
|
-
success: boolean;
|
1042
|
-
/** 禁用状态信息 */
|
1043
|
-
message: string;
|
1044
|
-
}
|
1045
|
-
/** 重新运行仓库工作流参数类型 */
|
1046
|
-
interface ReRunRepoWorkflowParamType extends Omit<WorkflowInfoParamType, 'workflow_id'> {
|
1047
|
-
/** 工作流作业id */
|
1048
|
-
job_id: number;
|
1049
|
-
}
|
1050
|
-
/** 重新运行仓库工作流响应类型 */
|
1051
|
-
interface ReRunRepoWorkflowResponseType {
|
1052
|
-
/** 是否成功重新运行仓库工作流 */
|
1053
|
-
success: boolean;
|
1054
|
-
/** 重新运行状态信息 */
|
1055
|
-
message: string;
|
1056
|
-
}
|
1057
|
-
|
1058
|
-
/** 议题用户信息响应类型 */
|
1059
|
-
type IssueUser = Omit<UserInfoResponseType, 'bio' | 'blog' | 'followers' | 'following' | 'public_repos' | 'type'>;
|
1060
|
-
/** 议题标签类型 */
|
1061
|
-
interface IssueLabelType {
|
1062
|
-
/** 标签ID */
|
1063
|
-
id: number;
|
1064
|
-
/** 标签名称 */
|
1065
|
-
name: string;
|
1066
|
-
/** 标签颜色代码 */
|
1067
|
-
color?: string | null;
|
1068
|
-
}
|
1069
|
-
/** 议题里程碑类型 */
|
1070
|
-
interface MilestoneType {
|
1071
|
-
/** 里程碑ID */
|
1072
|
-
id: number;
|
1073
|
-
/** 里程碑URL */
|
1074
|
-
url: string;
|
1075
|
-
/** 里程碑编号 */
|
1076
|
-
number: number;
|
1077
|
-
/** 里程碑状态: open/closed */
|
1078
|
-
state: 'open' | 'closed';
|
1079
|
-
/** 里程碑标题 */
|
1080
|
-
title: string;
|
1081
|
-
/** 里程碑描述 */
|
1082
|
-
description: string | null;
|
1083
|
-
/** 开放议题数 */
|
1084
|
-
open_issues: number;
|
1085
|
-
/** 关闭议题数 */
|
1086
|
-
closed_issues: number;
|
1087
|
-
/** 创建时间 */
|
1088
|
-
created_at: string;
|
1089
|
-
/** 更新时间 */
|
1090
|
-
updated_at: string;
|
1091
|
-
/** 关闭时间 */
|
1092
|
-
closed_at: string | null;
|
1093
|
-
/** 截止时间 */
|
1094
|
-
due_on: string | null;
|
1095
|
-
}
|
1096
|
-
/** 议题信息参数类型 */
|
1097
|
-
type IssueInfoParamType = RepoBaseParamType & IssueNumberParamType;
|
1098
|
-
/** 议题详情响应类型 */
|
1099
|
-
interface IssueInfoResponseType {
|
1100
|
-
/** 问题id */
|
1101
|
-
id: IssueNumberParamType['issue_number'];
|
1102
|
-
/** 议题HTML页面URL */
|
1103
|
-
html_url: string;
|
1104
|
-
/** 议题编号 */
|
1105
|
-
number: number;
|
1106
|
-
/** 议题状态: open/closed */
|
1107
|
-
state: string;
|
1108
|
-
/** 议题标题 */
|
1109
|
-
title: string;
|
1110
|
-
/** 议题正文内容 */
|
1111
|
-
body: string | null;
|
1112
|
-
/** 议题创建者用户信息 */
|
1113
|
-
user: IssueUser;
|
1114
|
-
/** 议题标签 */
|
1115
|
-
labels: Array<IssueLabelType> | null;
|
1116
|
-
/**
|
1117
|
-
* 议题指派人
|
1118
|
-
* 当没有指派人时,返回 null
|
1119
|
-
*/
|
1120
|
-
assignee: IssueUser | null;
|
1121
|
-
/**
|
1122
|
-
* 议题所有指派人列表
|
1123
|
-
* 先不处理,后面再说
|
1124
|
-
* */
|
1125
|
-
assignees: Array<IssueUser> | null;
|
1126
|
-
/** 议题所属里程碑 */
|
1127
|
-
milestone: MilestoneType | null;
|
1128
|
-
/** 关闭时间 */
|
1129
|
-
closed_at: string | null;
|
1130
|
-
/** 创建时间 */
|
1131
|
-
created_at: string;
|
1132
|
-
/** 更新时间 */
|
1133
|
-
updated_at: string;
|
1134
|
-
}
|
1135
|
-
/** 议题列表参数类型 */
|
1136
|
-
interface RepoIssueListParamType extends RepoBaseParamType {
|
1137
|
-
/**
|
1138
|
-
* 里程碑筛选
|
1139
|
-
* @default *
|
1140
|
-
* - 传入数字时:按里程碑编号筛选
|
1141
|
-
* - 传入 "*":接受任何里程碑的议题
|
1142
|
-
* - 传入 "none":返回没有里程碑的议题
|
1143
|
-
*/
|
1144
|
-
milestone?: string | number;
|
1145
|
-
/**
|
1146
|
-
* 议题状态
|
1147
|
-
* @default "open"
|
1148
|
-
* - open: 打开的议题
|
1149
|
-
* - closed: 关闭的议题
|
1150
|
-
* - all: 所有议题
|
1151
|
-
*/
|
1152
|
-
state?: 'all' | 'open' | 'closed';
|
1153
|
-
/**
|
1154
|
-
* 指派人用户名
|
1155
|
-
* - 传入用户名:返回指派给该用户的议题
|
1156
|
-
* - 传入 "none":返回所有的议题
|
1157
|
-
* - 传入用户名:返回指派给该用户的议题
|
1158
|
-
* - 传入 "*":返回已指派给任何用户的议题
|
1159
|
-
*/
|
1160
|
-
assignee?: string;
|
1161
|
-
/**
|
1162
|
-
* 议题类型
|
1163
|
-
* - 传入类型名:返回指定类型的议题
|
1164
|
-
* - 传入 "*":接受任何类型的议题
|
1165
|
-
* - 传入 "none":返回没有类型的议题
|
1166
|
-
*/
|
1167
|
-
type?: string;
|
1168
|
-
/** 创建者用户名,筛选由特定用户创建的议题 */
|
1169
|
-
creator?: string;
|
1170
|
-
/**
|
1171
|
-
* 标签列表
|
1172
|
-
* 以逗号分隔的标签名称列表
|
1173
|
-
* @example "bug,ui,@high"
|
1174
|
-
*/
|
1175
|
-
labels?: string;
|
1176
|
-
/**
|
1177
|
-
* 排序方式
|
1178
|
-
* @default "created"
|
1179
|
-
* - created: 按创建时间排序
|
1180
|
-
* - updated: 按更新时间排序
|
1181
|
-
* - comments: 按评论数排序
|
1182
|
-
*/
|
1183
|
-
sort?: 'created' | 'updated' | 'comments';
|
1184
|
-
/**
|
1185
|
-
* 排序方向
|
1186
|
-
* @default "desc"
|
1187
|
-
* - asc: 升序
|
1188
|
-
* - desc: 降序
|
1189
|
-
*/
|
1190
|
-
direction?: 'asc' | 'desc';
|
1191
|
-
/**
|
1192
|
-
* 筛选此时间之后更新的议题
|
1193
|
-
* 仅显示在指定时间之后更新的结果
|
1194
|
-
* 格式为 ISO 8601: YYYY-MM-DDTHH:MM:SSZ
|
1195
|
-
* @example "2023-01-01T00:00:00Z"
|
1196
|
-
*/
|
1197
|
-
since?: string;
|
1198
|
-
/**
|
1199
|
-
* 每页结果数量
|
1200
|
-
* @default 30
|
1201
|
-
* @remarks 取值范围:1-100
|
1202
|
-
*/
|
1203
|
-
per_page?: number;
|
1204
|
-
/**
|
1205
|
-
* 页码
|
1206
|
-
* @default 1
|
1207
|
-
*/
|
1208
|
-
page?: number;
|
1209
|
-
}
|
1210
|
-
/** 议题列表响应类型 */
|
1211
|
-
type IssueListResponseType = IssueInfoResponseType[];
|
1212
|
-
/** 创建议题参数类型 */
|
1213
|
-
type CreteIssueParamType = RepoBaseParamType & {
|
1214
|
-
/** 标题 */
|
1215
|
-
title: string;
|
1216
|
-
/** 正文内容 */
|
1217
|
-
body?: string | null;
|
1218
|
-
/** 里程碑 */
|
1219
|
-
milestone?: number | string | null;
|
1220
|
-
/** 标签列表 */
|
1221
|
-
labels?: Array<string> | string | null;
|
1222
|
-
/** 指派的用户名 */
|
1223
|
-
assignees?: Array<string> | string | null;
|
1224
|
-
};
|
1225
|
-
/** 创建议题响应类型 */
|
1226
|
-
type CreateIssueResponseType = IssueInfoResponseType;
|
1227
|
-
/** 更新议题参数类型 */
|
1228
|
-
interface UpdateIssueParamType extends Omit<CreteIssueParamType, 'title' | 'type'>, IssueNumberParamType {
|
1229
|
-
/** 问题的名称 */
|
1230
|
-
title?: string | null;
|
1231
|
-
/** 问题的内容 */
|
1232
|
-
body?: string | null;
|
1233
|
-
/** 问题的状态:open/closed */
|
1234
|
-
state?: 'open' | 'closed';
|
1235
|
-
}
|
1236
|
-
/** 更新议题响应类型 */
|
1237
|
-
type UpdateIssueResponseType = IssueInfoResponseType;
|
1238
|
-
/** 打开议题参数类型 */
|
1239
|
-
type OpenIssueParamType = RepoBaseParamType & IssueNumberParamType;
|
1240
|
-
/** 打开议题响应类型 */
|
1241
|
-
type OpenIssueResponseType = IssueInfoResponseType;
|
1242
|
-
/** 关闭议题参数类型 */
|
1243
|
-
type CloseIssueParamType = OpenIssueParamType;
|
1244
|
-
/** 关闭议题响应类型 */
|
1245
|
-
type CloseIssueResponseType = IssueInfoResponseType;
|
1246
|
-
/** 锁定议题参数类型 */
|
1247
|
-
interface LockIssueParamType extends RepoBaseParamType, IssueNumberParamType {
|
1248
|
-
/**
|
1249
|
-
* 锁定原因
|
1250
|
-
* 可以是以下之一:
|
1251
|
-
* - off-topic:锁定议题,因为该议题与仓库无关
|
1252
|
-
* - too heated:锁定议题,因为讨论过于激烈
|
1253
|
-
* - resolved:锁定议题,因为该议题已解决
|
1254
|
-
* - spam:锁定议题,因为该议题是垃圾邮件
|
1255
|
-
*/
|
1256
|
-
lock_reason?: 'off-topic' | 'too heated' | 'resolved' | 'spam';
|
1257
|
-
}
|
1258
|
-
/** 锁定议题响应类型 */
|
1259
|
-
interface LockIssueResponseType {
|
1260
|
-
/** 是否成功锁定 */
|
1261
|
-
success: boolean;
|
1262
|
-
/** 锁定状态信息 */
|
1263
|
-
message: string;
|
1264
|
-
}
|
1265
|
-
/** 解锁议题参数类型 */
|
1266
|
-
type UnLockIssueParamType = Omit<LockIssueParamType, 'lock_reason'>;
|
1267
|
-
/** 解锁议题响应类型 */
|
1268
|
-
interface UnLockIssueResponseType {
|
1269
|
-
/** 是否成功解锁 */
|
1270
|
-
success: LockIssueResponseType['success'];
|
1271
|
-
/** 解锁状态信息 */
|
1272
|
-
message: LockIssueResponseType['message'];
|
1273
|
-
}
|
1274
|
-
/** 议题评论信息参数类型 */
|
1275
|
-
type IssueCommentInfoParamType = RepoBaseParamType & CommentIdParamType;
|
1276
|
-
/** 议题评论信息响应类型 */
|
1277
|
-
interface IssueCommentInfoResponseType {
|
1278
|
-
/** 评论ID */
|
1279
|
-
id: number;
|
1280
|
-
/** 评论HTML页面URL */
|
1281
|
-
html_url: string;
|
1282
|
-
/** 评论内容 */
|
1283
|
-
body: string;
|
1284
|
-
/** 评论用户信息 */
|
1285
|
-
user: IssueUser;
|
1286
|
-
/** 创建时间 */
|
1287
|
-
created_at: string;
|
1288
|
-
/** 更新时间 */
|
1289
|
-
updated_at: string;
|
1290
|
-
}
|
1291
|
-
/** 仓库评论列表参数类型 */
|
1292
|
-
interface RepoCommentsListParamType extends RepoBaseParamType {
|
1293
|
-
/**
|
1294
|
-
* 排序依据
|
1295
|
-
* 用于指定结果的排序属性
|
1296
|
-
* @default created
|
1297
|
-
* - created: 按创建时间排序
|
1298
|
-
* - updated: 按更新时间排序
|
1299
|
-
*/
|
1300
|
-
sort?: 'created' | 'updated';
|
1301
|
-
/**
|
1302
|
-
* 排序方向
|
1303
|
-
* 指定结果的排序方向
|
1304
|
-
* 注意:如果没有指定 sort 参数,此参数将被忽略
|
1305
|
-
* @default desc 当 sort 参数存在时
|
1306
|
-
* - asc: 升序
|
1307
|
-
* - desc: 降序
|
1308
|
-
*/
|
1309
|
-
direction?: 'asc' | 'desc';
|
1310
|
-
/**
|
1311
|
-
* 筛选此时间之后更新的评论
|
1312
|
-
* 仅显示在指定时间之后更新的结果
|
1313
|
-
* 格式为 ISO 8601: YYYY-MM-DDTHH:MM:SSZ
|
1314
|
-
* @example "2023-01-01T00:00:00Z"
|
1315
|
-
*/
|
1316
|
-
since?: string;
|
1317
|
-
/**
|
1318
|
-
* 每页结果数量
|
1319
|
-
* 指定每页返回的结果数
|
1320
|
-
* @default 30
|
1321
|
-
* @remarks 取值范围:1-100
|
1322
|
-
*/
|
1323
|
-
per_page?: number;
|
1324
|
-
/**
|
1325
|
-
* 页码
|
1326
|
-
* 指定要获取的结果页码
|
1327
|
-
* @default 1
|
1328
|
-
* @remarks 必须大于等于1
|
1329
|
-
*/
|
1330
|
-
page?: number;
|
1331
|
-
}
|
1332
|
-
/** 仓库评论列表响应类型 */
|
1333
|
-
type RepoCommentsListResponseType = IssueCommentInfoResponseType[];
|
1334
|
-
/** 议题评论列表参数类型 */
|
1335
|
-
interface IssueCommentsListParamType extends RepoBaseParamType {
|
1336
|
-
/** 议题ID */
|
1337
|
-
issue_number: IssueNumberParamType['issue_number'];
|
1338
|
-
/**
|
1339
|
-
* 筛选此时间之后更新的评论
|
1340
|
-
* 仅显示在指定时间之后更新的结果
|
1341
|
-
* 格式为 ISO 8601: YYYY-MM-DDTHH:MM:SSZ
|
1342
|
-
* @example "2023-01-01T00:00:00Z"
|
1343
|
-
*/
|
1344
|
-
since?: string;
|
1345
|
-
/**
|
1346
|
-
* 每页结果数量
|
1347
|
-
* @default 30
|
1348
|
-
* @remarks 取值范围:1-100
|
1349
|
-
*/
|
1350
|
-
per_page?: number;
|
1351
|
-
/**
|
1352
|
-
* 页码
|
1353
|
-
* @default 1
|
1354
|
-
* @remarks 取值范围:1-100
|
1355
|
-
*/
|
1356
|
-
page?: number;
|
1357
|
-
}
|
1358
|
-
/** 议题评论列表响应类型 */
|
1359
|
-
type IssueCommentsListResponseType = IssueCommentInfoResponseType[];
|
1360
|
-
/** 创建议题评论参数类型 */
|
1361
|
-
interface CreteIssueCommentParamType extends RepoBaseParamType {
|
1362
|
-
/** 议题ID */
|
1363
|
-
issue_number: IssueNumberParamType['issue_number'];
|
1364
|
-
/** 评论内容 */
|
1365
|
-
body: string;
|
1366
|
-
}
|
1367
|
-
/** 创建议题评论响应类型 */
|
1368
|
-
type CreteIssueCommentResponseType = IssueCommentInfoResponseType;
|
1369
|
-
/** 更新议题评论参数类型 */
|
1370
|
-
interface UpdateIssueCommentParamType extends IssueCommentInfoParamType {
|
1371
|
-
/** 评论内容 */
|
1372
|
-
body: string;
|
1373
|
-
}
|
1374
|
-
/** 更新议题评论响应类型 */
|
1375
|
-
type UpdateIssueCommentResponseType = IssueCommentInfoResponseType;
|
1376
|
-
/** 删除议题评论参数类型 */
|
1377
|
-
interface RemoveIssueCommentParamType extends RepoBaseParamType {
|
1378
|
-
/** 评论ID */
|
1379
|
-
comment_id: string | number;
|
1380
|
-
}
|
1381
|
-
/** 删除议题评论响应类型 */
|
1382
|
-
interface RemoveIssueCommentResponseType {
|
1383
|
-
/** 是否成功删除议题 */
|
1384
|
-
success: boolean;
|
1385
|
-
/** 删除状态信息 */
|
1386
|
-
message: string;
|
1387
|
-
}
|
1388
|
-
/** 获取子议题列表参数类型 */
|
1389
|
-
interface SubIssueListParamType extends RepoBaseParamType {
|
1390
|
-
/** 议题ID */
|
1391
|
-
issue_number: IssueNumberParamType['issue_number'];
|
1392
|
-
/**
|
1393
|
-
* 每页结果数量
|
1394
|
-
* @default 30
|
1395
|
-
*/
|
1396
|
-
per_page?: number;
|
1397
|
-
/**
|
1398
|
-
* 页码
|
1399
|
-
* @default 1
|
1400
|
-
*/
|
1401
|
-
page?: number;
|
1402
|
-
}
|
1403
|
-
/** 获取子议题列表响应类型 */
|
1404
|
-
type SubIssueListResponseType = IssueInfoResponseType[];
|
1405
|
-
/** 添加子议题参数类型 */
|
1406
|
-
interface CreateSubIssueParamType extends RepoBaseParamType {
|
1407
|
-
/** 议题ID */
|
1408
|
-
issue_number: IssueNumberParamType['issue_number'];
|
1409
|
-
/** * 子议题ID */
|
1410
|
-
sub_issue_id: IssueNumberParamType['issue_number'];
|
1411
|
-
/** * 是否替换父议题 */
|
1412
|
-
replace_parent: boolean;
|
1413
|
-
}
|
1414
|
-
/** 添加子议题响应类型 */
|
1415
|
-
type CreateSubIssueResponseType = IssueInfoResponseType;
|
1416
|
-
/** 删除子议题参数类型 */
|
1417
|
-
interface RemoveSubIssueParamType extends RepoBaseParamType {
|
1418
|
-
/** 议题ID */
|
1419
|
-
issue_number: IssueNumberParamType['issue_number'];
|
1420
|
-
/** 子议题ID */
|
1421
|
-
sub_issue_id: IssueNumberParamType['issue_number'];
|
1422
|
-
}
|
1423
|
-
/** 删除子议题响应类型 */
|
1424
|
-
type RemoveSubIssueResponseType = IssueInfoResponseType;
|
1425
|
-
/** 重新确定子议题优先级参数类型 */
|
1426
|
-
interface ReprioritizeSubIssueParamType extends RepoBaseParamType {
|
1427
|
-
/** 议题ID */
|
1428
|
-
issue_number: IssueNumberParamType['issue_number'];
|
1429
|
-
/** 子议题ID */
|
1430
|
-
sub_issue_id: IssueNumberParamType['issue_number'];
|
1431
|
-
/**
|
1432
|
-
* 要优先排序的子问题的 ID(与 before_id 互斥,只能指定其中一个)
|
1433
|
-
* 在此 ID 之后放置子问题
|
1434
|
-
*/
|
1435
|
-
after_id?: IssueNumberParamType['issue_number'];
|
1436
|
-
/**
|
1437
|
-
* 要优先排序的子问题的 ID(与 after_id 互斥,只能指定其中一个)
|
1438
|
-
* 在此 ID 之前放置子问题
|
1439
|
-
*/
|
1440
|
-
before_id?: IssueNumberParamType['issue_number'];
|
1441
|
-
}
|
1442
|
-
/** 重新确定子议题优先级响应类型 */
|
1443
|
-
type ReprioritizeSubIssueResponseType = IssueInfoResponseType;
|
1444
|
-
|
1445
|
-
type OrgUser = Pick<UserInfoResponseType, 'id' | 'login' | 'name' | 'avatar_url' | 'html_url'>;
|
1446
|
-
/** 组织信息参数类型 */
|
1447
|
-
type OrgInfoParamType = OrgNameParamType;
|
1448
|
-
/** 组织信息响应类型 */
|
1449
|
-
interface OrgInfoResponseType {
|
1450
|
-
/** 组织ID */
|
1451
|
-
id: number;
|
1452
|
-
/** 组织名称 */
|
1453
|
-
login: string;
|
1454
|
-
/** 组织昵称 */
|
1455
|
-
name: string;
|
1456
|
-
/** 组织头像 */
|
1457
|
-
avatar_url: string;
|
1458
|
-
/** 组织描述 */
|
1459
|
-
description: string;
|
1460
|
-
/** 组织地址 */
|
1461
|
-
html_url: string;
|
1462
|
-
}
|
1463
|
-
/** 添加组织成员参数类型 */
|
1464
|
-
interface AddMemberParamType extends OrgNameParamType, UserNameParamType {
|
1465
|
-
/**
|
1466
|
-
* 角色
|
1467
|
-
*/
|
1468
|
-
role?: RoleNameType['role'];
|
1469
|
-
}
|
1470
|
-
/** 添加组织成员响应类型 */
|
1471
|
-
interface AddMemberResponseType extends Omit<AddCollaboratorResponseType, 'permissions' | 'html_url'> {
|
1472
|
-
/** 组织地址 */
|
1473
|
-
html_url: string;
|
1474
|
-
/** 角色 */
|
1475
|
-
role: RoleNameType['role'];
|
1476
|
-
}
|
1477
|
-
/** 获取组织成员信息参数类型 */
|
1478
|
-
type GetOrgMemberInfoParamType = OrgNameParamType & UserNameParamType;
|
1479
|
-
/** 获取组织成员信息响应类型 */
|
1480
|
-
interface GetOrgMemberInfoResponseType {
|
1481
|
-
/**
|
1482
|
-
* 成员状态
|
1483
|
-
* - active: 已激活
|
1484
|
-
* - pending: 待处理
|
1485
|
-
*/
|
1486
|
-
state: 'active' | 'pending';
|
1487
|
-
/**
|
1488
|
-
* 成员角色
|
1489
|
-
* - admin: 管理员
|
1490
|
-
* - member: 成员
|
1491
|
-
*/
|
1492
|
-
role: RoleNameType['role'];
|
1493
|
-
/** 组织信息 */
|
1494
|
-
organization: Pick<OrgInfoResponseType, 'id' | 'login' | 'name' | 'html_url'>;
|
1495
|
-
/** 成员信息 */
|
1496
|
-
user: OrgUser;
|
1497
|
-
}
|
1498
|
-
/** 获取组织成员列表参数 */
|
1499
|
-
interface GetOrgMemberListParamType extends OrgNameParamType {
|
1500
|
-
/** 每页数量 */
|
1501
|
-
per_page: number;
|
1502
|
-
/** 页码 */
|
1503
|
-
page: number;
|
1504
|
-
}
|
1505
|
-
interface GetOrgMemberListType extends OrgUser {
|
1506
|
-
/** 角色 */
|
1507
|
-
role: RoleNameType['role'];
|
1508
|
-
}
|
1509
|
-
/** 获取组织成员列表的响应类型 */
|
1510
|
-
type GetOrgMemberListResponseType = Array<GetOrgMemberListType>;
|
1511
|
-
/** 移除组织成员参数类型 */
|
1512
|
-
type RemoveOrgMemberParamType = OrgNameParamType & UserNameParamType;
|
1513
|
-
/** 移除组织成员响应类型 */
|
1514
|
-
interface RemoveOrgMemberResponseType {
|
1515
|
-
/** 是否成功 */
|
1516
|
-
success: boolean;
|
1517
|
-
/** 移除组织成员信息 */
|
1518
|
-
message: string;
|
1519
|
-
}
|
1520
|
-
|
1521
|
-
type PrUser = Pick<UserInfoResponseType, 'id' | 'login' | 'name' | 'avatar_url' | 'html_url'>;
|
1522
|
-
type PrRepo = Pick<RepoInfoResponseType, 'id' | 'owner' | 'name' | 'full_name'>;
|
1523
|
-
/** 拉取请求信息参数类型 */
|
1524
|
-
type PullRequestInfoParamType = PullRequestNumberParamType & RepoBaseParamType;
|
1525
|
-
/** 拉取请求信息响应类型 */
|
1526
|
-
interface PullRequestInfoResponseType {
|
1527
|
-
/** 拉取请求的id */
|
1528
|
-
id: number;
|
1529
|
-
/** 拉取请求的URL */
|
1530
|
-
html_url: string;
|
1531
|
-
/** 拉取请求的编号 */
|
1532
|
-
number: number;
|
1533
|
-
/** 拉取请求的状态 (open/closed) */
|
1534
|
-
state: 'open' | 'closed' | 'merged';
|
1535
|
-
/** 是否被锁定 */
|
1536
|
-
locked: boolean;
|
1537
|
-
/** 拉取请求的标题 */
|
1538
|
-
title: string;
|
1539
|
-
/** 拉取请求的描述 */
|
1540
|
-
body: string | null;
|
1541
|
-
/** 是否为草稿PR */
|
1542
|
-
draft: boolean;
|
1543
|
-
/** 创建时间 */
|
1544
|
-
created_at: string;
|
1545
|
-
/** 更新时间 */
|
1546
|
-
updated_at: string | null;
|
1547
|
-
/** 关闭时间 */
|
1548
|
-
closed_at: string | null;
|
1549
|
-
/** 合并时间 */
|
1550
|
-
merged_at: string | null;
|
1551
|
-
/** PR作者 */
|
1552
|
-
user: PrUser;
|
1553
|
-
/** PR的目标分支 */
|
1554
|
-
base: {
|
1555
|
-
/** 分支标签 */
|
1556
|
-
label: string;
|
1557
|
-
/** 分支名称 */
|
1558
|
-
ref: string;
|
1559
|
-
/** 当前分支最新提交的 SHA 值 */
|
1560
|
-
sha: string;
|
1561
|
-
/** 分支的用户信息 */
|
1562
|
-
user: PrUser;
|
1563
|
-
/** 分支的仓库信息 */
|
1564
|
-
repo: PrRepo;
|
1565
|
-
};
|
1566
|
-
/** PR的源分支信息 */
|
1567
|
-
head: {
|
1568
|
-
/** 分支标签 */
|
1569
|
-
label: string;
|
1570
|
-
/** 分支名称 */
|
1571
|
-
ref: string;
|
1572
|
-
/** 当前分支最新提交的 SHA 值 */
|
1573
|
-
sha: string;
|
1574
|
-
/** 分支的用户信息 */
|
1575
|
-
user: PrUser;
|
1576
|
-
/** 分支的仓库信息 */
|
1577
|
-
repo: PrRepo;
|
1578
|
-
};
|
1579
|
-
/** 指派人 */
|
1580
|
-
assignee: PrUser | null;
|
1581
|
-
/** 指派人列表 */
|
1582
|
-
assignees: Array<PrUser> | null;
|
1583
|
-
/** 里程碑 */
|
1584
|
-
milestone: MilestoneType | null;
|
1585
|
-
/** 标签列表 */
|
1586
|
-
labels: Array<IssueLabelType>;
|
1587
|
-
/** 提交数量 */
|
1588
|
-
commits: number;
|
1589
|
-
/** 新增行数 */
|
1590
|
-
additions: number;
|
1591
|
-
/** 删除行数 */
|
1592
|
-
deletions: number;
|
1593
|
-
/** 更改的文件数 */
|
1594
|
-
changed_files: number;
|
1595
|
-
}
|
1596
|
-
/** 拉取请求列表参数类型 */
|
1597
|
-
interface PullRequestListParamType extends RepoBaseParamType {
|
1598
|
-
/**
|
1599
|
-
* 拉取请求状态
|
1600
|
-
* @default "open"
|
1601
|
-
* - open: 打开的拉取请求
|
1602
|
-
* - closed: 已关闭的拉取请求
|
1603
|
-
* - all: 所有拉取请求
|
1604
|
-
*/
|
1605
|
-
state?: 'open' | 'closed' | 'all';
|
1606
|
-
/**
|
1607
|
-
* 基础分支名称
|
1608
|
-
* 用于筛选指定目标分支的拉取请求
|
1609
|
-
* @example "main"
|
1610
|
-
*/
|
1611
|
-
base?: string;
|
1612
|
-
/**
|
1613
|
-
* 排序依据
|
1614
|
-
* @default "created"
|
1615
|
-
* - created: 按创建时间排序
|
1616
|
-
* - updated: 按更新时间排序
|
1617
|
-
*/
|
1618
|
-
sort?: 'created' | 'updated';
|
1619
|
-
/**
|
1620
|
-
* 排序方向
|
1621
|
-
* @default "desc"
|
1622
|
-
* - asc: 升序
|
1623
|
-
* - desc: 降序
|
1624
|
-
*/
|
1625
|
-
direction?: 'asc' | 'desc';
|
1626
|
-
/**
|
1627
|
-
* 每页结果数量
|
1628
|
-
* @default "30"
|
1629
|
-
* @remarks 取值范围:1-100
|
1630
|
-
*/
|
1631
|
-
per_page?: string;
|
1632
|
-
/**
|
1633
|
-
* 页码
|
1634
|
-
* @default "1"
|
1635
|
-
* @remarks 必须大于等于1
|
1636
|
-
*/
|
1637
|
-
page?: string;
|
1638
|
-
}
|
1639
|
-
/** 拉取请求列表响应类型 */
|
1640
|
-
type PullRequestListResponseType = Array<PullRequestInfoResponseType>;
|
1641
|
-
/** 使用issue填充拉取提交标题与内容 */
|
1642
|
-
type WithIssue = {
|
1643
|
-
/** 拉取请求标题 */
|
1644
|
-
title?: never;
|
1645
|
-
/** 拉取请求描述 */
|
1646
|
-
body?: never;
|
1647
|
-
/**
|
1648
|
-
* 关联的议题
|
1649
|
-
* Pull Request的标题和内容可以根据指定的Issue Id自动填充
|
1650
|
-
*/
|
1651
|
-
issue: string | number;
|
1652
|
-
};
|
1653
|
-
/** 不使用issue填充拉取提交标题与内容 */
|
1654
|
-
type WithoutIssue = {
|
1655
|
-
/** 拉取请求标题 */
|
1656
|
-
title: string;
|
1657
|
-
/** 拉取请求描述 */
|
1658
|
-
body?: string;
|
1659
|
-
/**
|
1660
|
-
* 关联的议题
|
1661
|
-
* Pull Request的标题和内容可以根据指定的Issue Id自动填充
|
1662
|
-
*/
|
1663
|
-
issue?: never;
|
1664
|
-
};
|
1665
|
-
/** 创建拉取提交参数类型 */
|
1666
|
-
type CreatePullRequestParamType = RepoBaseParamType & (WithIssue | WithoutIssue) & {
|
1667
|
-
/** 拉取请求源分支 */
|
1668
|
-
head: string;
|
1669
|
-
/**
|
1670
|
-
* 拉取请求源仓库
|
1671
|
-
* 。如果两个存储库都由同一组织拥有,则跨存储库拉取请求需要此字段
|
1672
|
-
* */
|
1673
|
-
head_repo?: string;
|
1674
|
-
/** 拉取请求目标分支 */
|
1675
|
-
base: string;
|
1676
|
-
/** 是否为草稿 */
|
1677
|
-
draft?: boolean;
|
1678
|
-
};
|
1679
|
-
/** 创建拉取请求响应类型 */
|
1680
|
-
type CreatePullRequestResponseType = PullRequestInfoResponseType;
|
1681
|
-
/** 更新拉取请求参数类型 */
|
1682
|
-
interface UpdatePullRequestParamType extends RepoBaseParamType, PullRequestNumberParamType {
|
1683
|
-
/** 拉取请求标题 */
|
1684
|
-
title?: string;
|
1685
|
-
/** 拉取请求内容 */
|
1686
|
-
body?: string;
|
1687
|
-
/** 拉取请求状态 */
|
1688
|
-
state?: 'open' | 'closed';
|
1689
|
-
}
|
1690
|
-
/** 更新拉取请求响应类型 */
|
1691
|
-
type UpdatePullRequestResponseType = PullRequestInfoResponseType;
|
1692
|
-
/**
|
1693
|
-
* 合并拉取请求方式类型
|
1694
|
-
* merge: 合并提交
|
1695
|
-
* squash: 压缩提交
|
1696
|
-
* rebase: 变基提交
|
1697
|
-
*/
|
1698
|
-
type MergeMethodType = 'merge' | 'squash' | 'rebase';
|
1699
|
-
/** 合并拉取请求参数类型 */
|
1700
|
-
interface MergePullRequestParamType extends RepoBaseParamType, PullRequestNumberParamType {
|
1701
|
-
/** 拉取请求合并提交信息 */
|
1702
|
-
commit_title?: string;
|
1703
|
-
/** 拉取请求合并提交信息 */
|
1704
|
-
commit_message?: string;
|
1705
|
-
/**
|
1706
|
-
* 拉取请求合并SHA值
|
1707
|
-
* 拉取请求头部必须匹配的 SHA 才能允许合并
|
1708
|
-
* */
|
1709
|
-
sha?: string;
|
1710
|
-
/**
|
1711
|
-
* 拉取请求合并方式
|
1712
|
-
* @default merge
|
1713
|
-
* merge: 合并提交
|
1714
|
-
* squash: 压缩提交
|
1715
|
-
* rebase: 变基提交
|
1716
|
-
* */
|
1717
|
-
merge_method?: MergeMethodType;
|
1718
|
-
}
|
1719
|
-
/**
|
1720
|
-
* 合并拉取请求响应类型
|
1721
|
-
* 对应 GitHub API 返回的 Pull Request Merge Result 结构
|
1722
|
-
*/
|
1723
|
-
interface MergePullRequestResponseType {
|
1724
|
-
/**
|
1725
|
-
* 合并后的提交 SHA 值
|
1726
|
-
* 表示合并操作生成的提交哈希
|
1727
|
-
*/
|
1728
|
-
sha: string;
|
1729
|
-
/**
|
1730
|
-
* 是否成功合并
|
1731
|
-
* - true: 成功合并
|
1732
|
-
* - false: 合并失败或冲突
|
1733
|
-
*/
|
1734
|
-
merged: boolean;
|
1735
|
-
/**
|
1736
|
-
* 合并结果描述信息
|
1737
|
-
* 包含成功或失败的具体原因
|
1738
|
-
*/
|
1739
|
-
message: string;
|
1740
|
-
}
|
1741
|
-
/** 文件列表类型 */
|
1742
|
-
interface PullRequestFilesListType {
|
1743
|
-
/** 文件的SHA值 */
|
1744
|
-
sha: string;
|
1745
|
-
/** 文件路径 */
|
1746
|
-
filename: string;
|
1747
|
-
/** 文件状态 */
|
1748
|
-
status: 'added' | 'removed' | 'modified' | 'renamed' | 'changed' | 'unchanged';
|
1749
|
-
/** 文件添加行数 */
|
1750
|
-
additions: number;
|
1751
|
-
/** 文件删除行数 */
|
1752
|
-
deletions: number;
|
1753
|
-
/** 文件修改行数 */
|
1754
|
-
changes: number;
|
1755
|
-
/** 文件的blob SHA值 */
|
1756
|
-
blob_url: string;
|
1757
|
-
/** 文件的raw URL */
|
1758
|
-
raw_url: string;
|
1759
|
-
/** 文件的patch内容, 也就是diff差异内容 */
|
1760
|
-
patch: string;
|
1761
|
-
}
|
1762
|
-
/** 获取拉取请求文件列表参数类型 */
|
1763
|
-
interface GetPullRequestFilesListParamType extends RepoBaseParamType, PullRequestNumberParamType {
|
1764
|
-
/** 每页结果数量 */
|
1765
|
-
per_page?: string;
|
1766
|
-
/** 页码 */
|
1767
|
-
page?: string;
|
1768
|
-
}
|
1769
|
-
/** 获取拉取请求文件列表响应类型 */
|
1770
|
-
type GetPullRequestFilesListResponseType = Array<PullRequestFilesListType>;
|
1771
|
-
/** 获取拉取请求评论信息参数类型 */
|
1772
|
-
type GetPullRequestCommentInfoParamType = RepoBaseParamType & CommentIdParamType;
|
1773
|
-
/** 获取拉取请求评论信息响应类型 */
|
1774
|
-
interface GetPullRequestCommentInfoResponseType {
|
1775
|
-
/** 评论ID */
|
1776
|
-
id: CommentIdParamType['comment_id'];
|
1777
|
-
/** 评论内容 */
|
1778
|
-
body: string;
|
1779
|
-
/** 评论用户 */
|
1780
|
-
user: PrUser;
|
1781
|
-
/** 评论创建时间 */
|
1782
|
-
created_at: string;
|
1783
|
-
/** 评论更新时间 */
|
1784
|
-
updated_at: string;
|
1785
|
-
}
|
1786
|
-
/** 获取拉取请求评论列表参数类型 */
|
1787
|
-
interface GetPullRequestCommentsListParamType extends RepoBaseParamType, PullRequestNumberParamType {
|
1788
|
-
direction: 'asc' | 'desc';
|
1789
|
-
/** 每页结果数量 */
|
1790
|
-
per_page?: string;
|
1791
|
-
/** 页码 */
|
1792
|
-
page?: string;
|
1793
|
-
}
|
1794
|
-
/** 获取拉取请求评论列表响应类型 */
|
1795
|
-
type GetPullRequestCommentsListResponseType = Array<GetPullRequestCommentInfoResponseType>;
|
1796
|
-
/** 创建拉取请求评论参数类型 */
|
1797
|
-
interface CreatePullRequestCommentParamType extends RepoBaseParamType, PullRequestNumberParamType {
|
1798
|
-
/** 评论内容 */
|
1799
|
-
body: string;
|
1800
|
-
}
|
1801
|
-
/** 创建拉取请求评论响应类型 */
|
1802
|
-
interface CreatePullRequestCommentResponseType {
|
1803
|
-
/** 评论id */
|
1804
|
-
id: CommentIdParamType['comment_id'];
|
1805
|
-
/** 评论内容 */
|
1806
|
-
body: string;
|
1807
|
-
}
|
1808
|
-
/** 更新拉取请求评论参数类型 */
|
1809
|
-
interface UpdatePullRequestCommentParamType extends RepoBaseParamType, CommentIdParamType {
|
1810
|
-
/** 评论内容 */
|
1811
|
-
body: string;
|
1812
|
-
}
|
1813
|
-
/** 更新拉取请求评论响应类型 */
|
1814
|
-
interface UpdatePullRequestCommentResponseType {
|
1815
|
-
/** 是否更新评论信息成功 */
|
1816
|
-
success: boolean;
|
1817
|
-
/** 更新评论状态信息 */
|
1818
|
-
message: string;
|
1819
|
-
}
|
1820
|
-
/** 删除拉取请求评论参数类型 */
|
1821
|
-
type DeletePullRequestCommentParamType = RepoBaseParamType & CommentIdParamType;
|
1822
|
-
/** 删除拉取请求评论响应类型 */
|
1823
|
-
interface DeletePullRequestCommentResponseType {
|
1824
|
-
/** 是否删除成功 */
|
1825
|
-
success: boolean;
|
1826
|
-
/** 删除状态信息 */
|
1827
|
-
message: string;
|
1828
|
-
}
|
1829
|
-
|
1830
|
-
type ReleaseUser = Omit<UserInfoResponseType, 'bio' | 'blog' | 'followers' | 'following' | 'public_repos' | 'email'>;
|
1831
|
-
/** 反应信息类型 */
|
1832
|
-
interface ReactionInfoType {
|
1833
|
-
/** 反应 API URL */
|
1834
|
-
url: string;
|
1835
|
-
/** 总反应数 */
|
1836
|
-
total_count: number;
|
1837
|
-
/** 👍 反应数 */
|
1838
|
-
'+1': number;
|
1839
|
-
/** 👎 反应数 */
|
1840
|
-
'-1': number;
|
1841
|
-
/** 😄 反应数 */
|
1842
|
-
laugh: number;
|
1843
|
-
/** 😕 反应数 */
|
1844
|
-
confused: number;
|
1845
|
-
/** ❤️ 反应数 */
|
1846
|
-
heart: number;
|
1847
|
-
/** 🎉 反应数 */
|
1848
|
-
hooray: number;
|
1849
|
-
/** 👀 反应数 */
|
1850
|
-
eyes: number;
|
1851
|
-
/** 🚀 反应数 */
|
1852
|
-
rocket: number;
|
1853
|
-
}
|
1854
|
-
/** 发布资源类型 */
|
1855
|
-
interface ReleaseAssetsType {
|
1856
|
-
/** 资源 URL */
|
1857
|
-
url: string;
|
1858
|
-
/** 资源下载 URL */
|
1859
|
-
browser_download_url: string;
|
1860
|
-
}
|
1861
|
-
/** 获取Release信息参数类型 */
|
1862
|
-
type ReleaseInfoParamType = RepoBaseParamType & {
|
1863
|
-
/** 发布ID */
|
1864
|
-
release_id: number;
|
1865
|
-
};
|
1866
|
-
/** 获Release信息响应类型 */
|
1867
|
-
interface ReleaseInfoResponseType {
|
1868
|
-
/**
|
1869
|
-
* 发布版本的 ID
|
1870
|
-
* 该字段在gitcode平台为null
|
1871
|
-
*/
|
1872
|
-
id: number | null;
|
1873
|
-
/** 标签名称 */
|
1874
|
-
tag_name: string;
|
1875
|
-
/** 目标分支或提交 */
|
1876
|
-
target_commitish: string;
|
1877
|
-
/** 发布版本名称 */
|
1878
|
-
name: string | null;
|
1879
|
-
/** 发布说明 */
|
1880
|
-
body: string | null;
|
1881
|
-
/** 是否为预发布版本 */
|
1882
|
-
prerelease: boolean;
|
1883
|
-
/** 发布者信息 */
|
1884
|
-
author: ReleaseUser;
|
1885
|
-
/** 发布资源列表 */
|
1886
|
-
assets: Array<ReleaseAssetsType>;
|
1887
|
-
/** 发布时间 */
|
1888
|
-
created_at: string;
|
1889
|
-
}
|
1890
|
-
/** 获取最新Release参数类型 */
|
1891
|
-
type ReleaseLatestParamTypeType = RepoBaseParamType;
|
1892
|
-
/** 获取最新Release响应类型 */
|
1893
|
-
type ReleaseLatestResponseType = ReleaseInfoResponseType;
|
1894
|
-
/** 通过Tag获取Release信息参数类型 */
|
1895
|
-
type ReleaseInfoByTagParamType = RepoBaseParamType & {
|
1896
|
-
/** 标签名称 */
|
1897
|
-
tag: string;
|
1898
|
-
};
|
1899
|
-
/** 通过Tag获取Release信息响应类型 */
|
1900
|
-
type ReleaseInfoByTagResponseType = ReleaseInfoResponseType;
|
1901
|
-
/** 获取Release列表参数类型 */
|
1902
|
-
type ReleaseListParamType = RepoBaseParamType & {
|
1903
|
-
/** 每页数量 */
|
1904
|
-
per_page?: number;
|
1905
|
-
/** 页码 */
|
1906
|
-
page?: number;
|
1907
|
-
};
|
1908
|
-
/** 获取Release列表响应类型 */
|
1909
|
-
type ReleaseListResponseType = Array<ReleaseInfoResponseType>;
|
1910
|
-
/** 创建Release参数类型 */
|
1911
|
-
type CreateReleaseParamType = RepoBaseParamType & {
|
1912
|
-
/** 标签名称 */
|
1913
|
-
tag_name: string;
|
1914
|
-
/** 目标分支或提交 */
|
1915
|
-
target_commitish: string;
|
1916
|
-
/** 发布版本名称 */
|
1917
|
-
name: string;
|
1918
|
-
/** 发布说明 */
|
1919
|
-
body: string;
|
1920
|
-
/** 是否为预发布版本 */
|
1921
|
-
prerelease: boolean;
|
1922
|
-
};
|
1923
|
-
/** 获取Release列表参数类型 */
|
1924
|
-
type CreateReleaseResponseType = ReleaseInfoResponseType;
|
1925
|
-
/** 更新Release参数类型 */
|
1926
|
-
type UpdateReleaseParamType = CreateReleaseParamType;
|
1927
|
-
/** 更新Release响应类型 */
|
1928
|
-
type UpdateReleaseResponseType = ReleaseInfoResponseType;
|
1929
|
-
/** 删除Release参数类型 */
|
1930
|
-
type DeleteReleaseParamType = ReleaseInfoParamType;
|
1931
|
-
/** 删除Release响应类型 */
|
1932
|
-
interface DeleteReleaseResponseType {
|
1933
|
-
/** 是否删除成功 */
|
1934
|
-
success: boolean;
|
1935
|
-
/** 删除状态信息 */
|
1936
|
-
message: string;
|
1937
|
-
}
|
1938
|
-
|
1939
|
-
type SearchUser = Pick<UserInfoResponseType, 'id' | 'login' | 'name' | 'avatar_url' | 'html_url' | 'email'>;
|
1940
|
-
type SearchRepo = Pick<RepoInfoResponseType, 'id' | 'owner' | 'name' | 'full_name' | 'description' | 'visibility' | 'public' | 'private' | 'archived' | 'language' | 'pushed_at'>;
|
1941
|
-
/** 搜索用户参数列表 */
|
1942
|
-
interface SearchUsersParamType {
|
1943
|
-
/** 搜索关键字 */
|
1944
|
-
q: string;
|
1945
|
-
/** 排序顺序 */
|
1946
|
-
order: 'desc' | 'asc';
|
1947
|
-
/** 每页数量 */
|
1948
|
-
per_page?: number;
|
1949
|
-
/** 页码 */
|
1950
|
-
page?: number;
|
1951
|
-
}
|
1952
|
-
/** 搜索用户响应列表 */
|
1953
|
-
interface SearchUsersResponseType {
|
1954
|
-
/** 搜索结果数量 */
|
1955
|
-
total_count: number;
|
1956
|
-
/** 用户列表 */
|
1957
|
-
items: Array<SearchUser>;
|
1958
|
-
}
|
1959
|
-
interface SearchReposParamType {
|
1960
|
-
/** 搜索关键字 */
|
1961
|
-
q: string;
|
1962
|
-
/** 排序顺序 */
|
1963
|
-
order: 'desc' | 'asc';
|
1964
|
-
/** 每页数量 */
|
1965
|
-
per_page?: number;
|
1966
|
-
/** 页码 */
|
1967
|
-
page?: number;
|
1968
|
-
}
|
1969
|
-
interface SearchReposResponseType {
|
1970
|
-
/** 搜索结果数量 */
|
1971
|
-
total_count: number;
|
1972
|
-
/** 用户列表 */
|
1973
|
-
items: Array<SearchRepo>;
|
1974
|
-
}
|
1975
|
-
|
1976
|
-
interface WebHookSignatureParamType {
|
1977
|
-
/** 请求体 */
|
1978
|
-
payload: string;
|
1979
|
-
/** GitHub 发送的签名头 */
|
1980
|
-
signature: string;
|
1981
|
-
}
|
1982
|
-
interface WebHookSignatureResponseType {
|
1983
|
-
/** 是否验证成功 */
|
1984
|
-
success: boolean;
|
1985
|
-
/** 验证信息 */
|
1986
|
-
message: string;
|
1987
|
-
}
|
1988
|
-
|
1989
|
-
/**
|
1990
|
-
* 获取本地 Git 仓库信息
|
1991
|
-
* @description 获取本地 Git 仓库信息,返回仓库名称、仓库路径、仓库地址等信息
|
1992
|
-
* @param local_path - 本地仓库路径
|
1993
|
-
* @returns Git 仓库信息
|
1994
|
-
* @example
|
1995
|
-
* ```ts
|
1996
|
-
* const info = await get_local_git_repo_info('D:/project/repo')
|
1997
|
-
* console.log(info)
|
1998
|
-
* -> {
|
1999
|
-
* name: 'repo',
|
2000
|
-
* path: 'D:/project/repo',
|
2001
|
-
* url: 'https://github.com/owner/repo.git',
|
2002
|
-
* html_url: 'https://github.com/owner/repo',
|
2003
|
-
* owner: 'owner',
|
2004
|
-
* repo: 'repo'
|
2005
|
-
* }
|
2006
|
-
* ```
|
2007
|
-
*/
|
2008
|
-
declare function get_local_git_repo_info(local_path: string): Promise<GitRepoInfoType | null>;
|
2009
|
-
/**
|
2010
|
-
* 获取本地仓库信息列表
|
2011
|
-
* @param local_path 本地仓库路径
|
2012
|
-
* @param options 配置项
|
2013
|
-
* - loop 是否递归查找
|
2014
|
-
* - maxDepth 递归最大深度
|
2015
|
-
* - dir 忽略的文件夹名称列表
|
2016
|
-
* @returns LocalGitInfoListType 仓库信息列表
|
2017
|
-
* @example
|
2018
|
-
* ```ts
|
2019
|
-
* // 无数据
|
2020
|
-
* const res = await get_local_git_repo_list('D:\\project\\GitHub', { loop: true, maxDepth: 5, dir: ['node_modules'] })
|
2021
|
-
* -> {
|
2022
|
-
* total: 0,
|
2023
|
-
* items: []
|
2024
|
-
* }
|
2025
|
-
*
|
2026
|
-
* // 有数据
|
2027
|
-
* const res = await get_local_git_repo_list('D:\\project\\GitHub', { loop: true, maxDepth: 5, dir: ['node_modules'] })
|
2028
|
-
* -> {
|
2029
|
-
* total: 1,
|
2030
|
-
* items: [{
|
2031
|
-
* name: "GitHub",
|
2032
|
-
* path: "D:\\project\\GitHub\\GitHub",
|
2033
|
-
* url: "https://github.com/GitHub/GitHub.git",
|
2034
|
-
* html_url: "https://github.com/GitHub/GitHub",
|
2035
|
-
* owner: "GitHub",
|
2036
|
-
* repo: "GitHub"
|
2037
|
-
* }]
|
2038
|
-
* }
|
2039
|
-
* ```
|
2040
|
-
*/
|
2041
|
-
declare function get_local_git_repos_list(dirpath: string, options?: GitRepoInfoListOptionsType): Promise<GitInfoListType>;
|
2042
|
-
/**
|
2043
|
-
* 获取本地仓库的默认分支
|
2044
|
-
* @param local_path - 本地仓库路径
|
2045
|
-
* @returns 默认分支名称
|
2046
|
-
* @example
|
2047
|
-
* ```ts
|
2048
|
-
* console.log(await get_local_repo_default_branch('/path/to/repo'))
|
2049
|
-
* -> 'main'
|
2050
|
-
* ```
|
2051
|
-
*/
|
2052
|
-
declare function get_local_repo_default_branch(local_path: string): Promise<string>;
|
2053
|
-
/**
|
2054
|
-
* 获取远程仓库的默认分支
|
2055
|
-
* @param remote_url - 远程仓库URL
|
2056
|
-
* @returns 默认分支名称
|
2057
|
-
* @example
|
2058
|
-
* ```ts
|
2059
|
-
* console.log(await get_remote_repo_default_branch('https://github.com/CandriaJS/git-neko-kit'))
|
2060
|
-
* -> 'main'
|
2061
|
-
* ```
|
2062
|
-
*/
|
2063
|
-
declare function get_remote_repo_default_branch(remote_url: string): Promise<string>;
|
2064
|
-
|
2065
|
-
/**
|
2066
|
-
* 渲染 markdown 内容为 HTML
|
2067
|
-
* @description 使用配置好的 markdown-it 实例渲染 markdown 内容
|
2068
|
-
* @param md - 要渲染的 markdown 字符串
|
2069
|
-
* @returns 渲染后的 HTML 字符串
|
2070
|
-
* @example
|
2071
|
-
* ```ts
|
2072
|
-
* const html = await render_markdown(`# 标题
|
2073
|
-
* - 无序列表项1
|
2074
|
-
* - 无序列表项2
|
2075
|
-
* - 子列表项
|
2076
|
-
*
|
2077
|
-
* 1. 有序列表项1
|
2078
|
-
* 2. 有序列表项2
|
2079
|
-
* `);
|
2080
|
-
*
|
2081
|
-
* -> <h1>标题</h1>
|
2082
|
-
* <ul style="list-style: none;">
|
2083
|
-
* <li>无序列表项1</li>
|
2084
|
-
* <li>无序列表项2</li>
|
2085
|
-
* <ul style="list-style: none;">
|
2086
|
-
* <li>子列表项</li>
|
2087
|
-
* </ul>
|
2088
|
-
* </ul>
|
2089
|
-
* <ol style="list-style: none;">
|
2090
|
-
* <li>有序列表项1</li>
|
2091
|
-
* <li>有序列表项2</li>
|
2092
|
-
* </ol>
|
2093
|
-
* ```
|
2094
|
-
*/
|
2095
|
-
declare function render_markdown(md: string): Promise<string>;
|
2096
|
-
|
2097
|
-
/**
|
2098
|
-
* 获取本地 NPM 包信息
|
2099
|
-
* @description 获取本地 NPM 包信息
|
2100
|
-
* @param packageName - 包名
|
2101
|
-
* @returns 包信息
|
2102
|
-
* @example
|
2103
|
-
* ```ts
|
2104
|
-
* console.log(get_local_npm_package_info('npm'))
|
2105
|
-
* -> {
|
2106
|
-
* name: 'npm',
|
2107
|
-
* path: 'C:\\Users\\username\\AppData\\Roaming\\npm\\node_modules\\npm',
|
2108
|
-
* html_url: 'https://github.com/npm/cli',
|
2109
|
-
* owner: 'npm',
|
2110
|
-
* repo: 'cli'
|
2111
|
-
* }
|
2112
|
-
* ```
|
2113
|
-
*/
|
2114
|
-
declare function get_local_npm_package_info(packageName: string): Promise<NpmPackageInfoType | null>;
|
2115
|
-
/**
|
2116
|
-
* 获取本地 NPM 包信息列表
|
2117
|
-
* @description 获取目录下已安装的生产依赖列表,过滤后递归获取包信息
|
2118
|
-
* @param dirpath - 项目目录路径
|
2119
|
-
* @param options - 过滤选项
|
2120
|
-
* - packageName 忽略的包名
|
2121
|
-
* - prefix 包名前缀
|
2122
|
-
* @returns 包信息列表
|
2123
|
-
* @example
|
2124
|
-
* ```ts
|
2125
|
-
* const packages = await get_local_npm_packages_list(dirpath)
|
2126
|
-
* -> {
|
2127
|
-
* total: 1,
|
2128
|
-
* items: [
|
2129
|
-
* {
|
2130
|
-
* name: 'test',
|
2131
|
-
* path: 'D:\\test',
|
2132
|
-
* html_url: 'https://github.com/test/test',
|
2133
|
-
* owner: 'test',
|
2134
|
-
* repo: 'test'
|
2135
|
-
* }
|
2136
|
-
* ]
|
2137
|
-
* }
|
2138
|
-
* ```
|
2139
|
-
*/
|
2140
|
-
declare function get_local_npm_packages_list(dirpath: string, options?: NpmPackageInfoListOptionsType): Promise<NpmPackageInfoListType>;
|
2141
|
-
|
2142
|
-
/**
|
2143
|
-
* 格式化日期
|
2144
|
-
* @param dateString - 日期字符串
|
2145
|
-
* @param locale - 语言环境,默认为 'zh-cn'
|
2146
|
-
* @param format - 日期格式,默认为 'YYYY-MM-DD HH:mm:ss'
|
2147
|
-
* @returns 格式化后的日期字符串
|
2148
|
-
* @example
|
2149
|
-
* ```ts
|
2150
|
-
* console.log(await format_date('2025-04-16T10:00:00')
|
2151
|
-
* -> '2025-04-16 10:00:00'
|
2152
|
-
* ```
|
2153
|
-
*/
|
2154
|
-
declare function format_date(dateString: string, locale?: string, format?: string): Promise<string>;
|
2155
|
-
/**
|
2156
|
-
* 获取相对时间
|
2157
|
-
* @param dateString - 日期字符串
|
2158
|
-
* @param options - 可选参数对象
|
2159
|
-
* @param options.locale - 语言环境,默认为 'zh-cn'
|
2160
|
-
* @param options.useAbsoluteIfOver30Days - 是否在超过30天时返回绝对时间
|
2161
|
-
* @returns 相对时间或绝对时间
|
2162
|
-
* @example
|
2163
|
-
* ```ts
|
2164
|
-
* console.log(await get_relative_time('2023-04-01 12:00:00'))
|
2165
|
-
* -> "1 小时前"
|
2166
|
-
*
|
2167
|
-
* // 如果当前时间距离该日期已超过30天,则返回绝对时间
|
2168
|
-
* console.log(await get_relative_time('2023-01-01 12:00:00', { useAbsoluteIfOver30Days: true }))
|
2169
|
-
* -> "2025-07-01 13:00:00"
|
2170
|
-
* ```
|
2171
|
-
*/
|
2172
|
-
declare function get_relative_time(dateString: string, options?: {
|
2173
|
-
locale?: string;
|
2174
|
-
useAbsoluteIfOver30Days?: boolean;
|
2175
|
-
}): Promise<string>;
|
2176
|
-
/**
|
2177
|
-
* 根据语言名称获取对应的颜色值
|
2178
|
-
* @param language - 语言名称
|
2179
|
-
* @returns 颜色值的十六进制字符串
|
2180
|
-
* @example
|
2181
|
-
* ```ts
|
2182
|
-
* console.log(get_langage_color('JavaScript'))
|
2183
|
-
* -> '#f1e05a'
|
2184
|
-
* ```
|
2185
|
-
*/
|
2186
|
-
declare function get_langage_color(language: string): string;
|
2187
|
-
|
2188
|
-
/**
|
2189
|
-
* 生成一个用户唯一的标识符
|
2190
|
-
* @returns 生成的唯一标识符
|
2191
|
-
* @example
|
2192
|
-
* ```ts
|
2193
|
-
* const stateId = await create_state_id()
|
2194
|
-
* -> '34523452345234523452345234523452'
|
2195
|
-
* ```
|
2196
|
-
*/
|
2197
|
-
declare function create_state_id(): Promise<string>;
|
2198
|
-
|
2199
|
-
/**
|
2200
|
-
* GitHub OAuth 授权管理类
|
2201
|
-
*
|
2202
|
-
* 提供完整的GitHub OAuth 2.0授权流程管理,包括:
|
2203
|
-
* - 生成授权链接
|
2204
|
-
* - 通过授权码(code)获取访问令牌(access_token)
|
2205
|
-
* - 检查访问令牌状态
|
2206
|
-
* - 刷新访问令牌
|
2207
|
-
*
|
2208
|
-
*/
|
2209
|
-
declare class Auth extends GitHubClient {
|
2210
|
-
constructor(base: GitHubClient);
|
2211
|
-
/**
|
2212
|
-
* 通过 code 获取 token
|
2213
|
-
* @param options - 获取 token 的参数
|
2214
|
-
* - options.code - Github 返回的 code
|
2215
|
-
* @returns 返回 token
|
2216
|
-
* @example
|
2217
|
-
* ```ts
|
2218
|
-
* const token = await auth.get_token_by_code({ code: 'code' })
|
2219
|
-
* -> { info: '获取'access_token: 'token', refresh_token: 'refresh_token' }
|
2220
|
-
* ```
|
2221
|
-
*/
|
2222
|
-
get_token_by_code(options: AccessCodeType): Promise<ApiResponseType<TokenResponseType>>;
|
2223
|
-
/**
|
2224
|
-
* 获取 token 的状态
|
2225
|
-
* @param options - 获取 token 的参数
|
2226
|
-
* - options.access_token - Github 返回的 access_token
|
2227
|
-
* 上一步 `get_token_by_code` 生成的 token
|
2228
|
-
* @returns 返回 token 的状态
|
2229
|
-
* @returns info - 返回 token 的状态信息,'Token 有效' | 'Token 无效'
|
2230
|
-
* @example
|
2231
|
-
* ```ts
|
2232
|
-
* const status = await auth.check_token_status({ access_token: 'access_token' })
|
2233
|
-
* console.log(status) // 输出token状态对象
|
2234
|
-
*/
|
2235
|
-
check_token_status(options?: AccessTokenType): Promise<ApiResponseType<CheckTokenResponseType>>;
|
2236
|
-
/**
|
2237
|
-
* 通过 refresh_token 获取 token
|
2238
|
-
* @param options - 获取 token 的参数
|
2239
|
-
* - options.refresh_token - Github 返回的 refresh_token
|
2240
|
-
* @returns 返回 token
|
2241
|
-
* @example
|
2242
|
-
* ```
|
2243
|
-
* const token = await auth.refresh_token({ refresh_token: 'refresh_token' })
|
2244
|
-
* console.log(token) // 输出token对象
|
2245
|
-
* ```
|
2246
|
-
*/
|
2247
|
-
refresh_token(options: RefreshTokenType): Promise<ApiResponseType<RefreshTokenResponseType>>;
|
2248
|
-
/**
|
2249
|
-
* 生成Github App 授权链接
|
2250
|
-
* @param state_id - 随机生成的 state_id,用于验证授权请求的状态,可选,默认不使用
|
2251
|
-
* @returns 返回授权链接对象
|
2252
|
-
* @returns create_auth_link 授权链接,用于跳转 Github 授权页
|
2253
|
-
* @example
|
2254
|
-
* ```ts
|
2255
|
-
* const link = await auth.create_auth_link('state_id')
|
2256
|
-
* console.log(link) // https://github.com/login/oauth/authorize?client_id=<client_id>&state=<state_id>
|
2257
|
-
* ```
|
2258
|
-
*/
|
2259
|
-
create_auth_link(state_id?: string): Promise<string>;
|
2260
|
-
}
|
2261
|
-
|
2262
|
-
/**
|
2263
|
-
* Commit 提交操作类
|
2264
|
-
*
|
2265
|
-
* 提供对GitHub Commit的CRUD操作,包括:
|
2266
|
-
* - 获取一个提交信息
|
2267
|
-
*/
|
2268
|
-
declare class Commit extends GitHubClient {
|
2269
|
-
constructor(base: GitHubClient);
|
2270
|
-
/**
|
2271
|
-
* 获取一个提交信息
|
2272
|
-
* 权限:
|
2273
|
-
* — Contents: read-only
|
2274
|
-
* @param options - 提交信息参数对象
|
2275
|
-
* - url 仓库URL地址
|
2276
|
-
* - owner 仓库拥有者
|
2277
|
-
* - sha 提交的SHA值,如果不提供,则默认获取仓库的默认分支的最新提交信息
|
2278
|
-
* @returns 提交信息
|
2279
|
-
* @example
|
2280
|
-
* ```ts
|
2281
|
-
* const commitInfo = await commit.get_commit_info({ owner: 'owner', repo: 'repo' })
|
2282
|
-
* -> 提交信息对象
|
2283
|
-
* ```
|
2284
|
-
*/
|
2285
|
-
get_commit_info(options: CommitInfoParamType): Promise<ApiResponseType<CommitInfoResponseType>>;
|
2286
|
-
/**
|
2287
|
-
* 获取提交列表
|
2288
|
-
* 权限:
|
2289
|
-
* — Contents: read-only
|
2290
|
-
* @param options - 提交列表参数对象
|
2291
|
-
* - url 仓库URL地址
|
2292
|
-
* - owner 仓库拥有者
|
2293
|
-
* - sha 提交的SHA值,如果不提供,则默认获取仓库的默认分支的最新提交信息
|
2294
|
-
* - path 可选,提交路径
|
2295
|
-
* - author 可选,提交作者
|
2296
|
-
* - since 可选,提交时间范围开始
|
2297
|
-
* - until 可选,提交时间范围结束
|
2298
|
-
* - per_page 可选,每页提交数量,默认为30
|
2299
|
-
* - page 可选,页码,默认为1
|
2300
|
-
* @returns 提交列表
|
2301
|
-
* @example
|
2302
|
-
* ```ts
|
2303
|
-
* const commitList = await commit.get_commit_list({ owner: 'owner', repo:'repo' })
|
2304
|
-
* -> 提交对象列表
|
2305
|
-
* ```
|
2306
|
-
*/
|
2307
|
-
get_commit_list(options: CommitListParamType): Promise<ApiResponseType<CommitListResponseType>>;
|
2308
|
-
}
|
2309
|
-
|
2310
|
-
/**
|
2311
|
-
* GitHub Issue 处理类,提供Issue相关操作功能
|
2312
|
-
*
|
2313
|
-
* 提供完整的GitHub Issue管理,包括:
|
2314
|
-
* - 获取Issue列表
|
2315
|
-
* - 获取Issue详情
|
2316
|
-
* - 创建/更新/关闭/打开/锁定/解锁Issue
|
2317
|
-
* - 获取仓库评论列表
|
2318
|
-
* - 获取/创建/更新/删除Issue评论
|
2319
|
-
* - 管理子Issue
|
2320
|
-
*
|
2321
|
-
* @remarks 每个拉取请求都是一个议题,但并非每个议题都是拉取请求。
|
2322
|
-
*/
|
2323
|
-
declare class Issue extends GitHubClient {
|
2324
|
-
constructor(base: GitHubClient);
|
2325
|
-
/**
|
2326
|
-
* 获取议题详情
|
2327
|
-
* 权限:
|
2328
|
-
* - Issues: Read-only
|
2329
|
-
* @param options 请求参数列表
|
2330
|
-
* - owner 仓库拥有者
|
2331
|
-
* - repo 仓库名称
|
2332
|
-
* - issue_number Issue编号
|
2333
|
-
* @returns 包含Issue信息的响应对象
|
2334
|
-
* @example
|
2335
|
-
* ```ts
|
2336
|
-
* const res = await issue.get_issue_info({ owner: 'owner', repo:'repo', issue_number:1 })
|
2337
|
-
* -> 议题信息对象
|
2338
|
-
* ```
|
2339
|
-
*/
|
2340
|
-
get_issue_info(options: IssueInfoParamType): Promise<ApiResponseType<IssueInfoResponseType>>;
|
2341
|
-
/**
|
2342
|
-
* 获取仓库的议题列表
|
2343
|
-
* 权限:
|
2344
|
-
* - Issues:Read-only
|
2345
|
-
* @param options 请求参数列表
|
2346
|
-
* - owner 仓库拥有者
|
2347
|
-
* - repo 仓库名称
|
2348
|
-
* - milestones 里程碑ID列表
|
2349
|
-
* - state Issue状态,可选 'open' | 'closed' | 'all', 默认为'all'
|
2350
|
-
* - labels 标签名称列表
|
2351
|
-
* - assignee 指派人用户名
|
2352
|
-
* - type 问题类型
|
2353
|
-
* - creator 创建者用户名
|
2354
|
-
* - mentioned 提及的用户名
|
2355
|
-
* - sort 排序方式,可选 'created' | 'updated' | 'comments', 默认为'created'
|
2356
|
-
* - direction 排序方向,可选 'asc' | 'desc', 默认为'desc'
|
2357
|
-
* - since 筛选此时间之后的问题
|
2358
|
-
* - per_page 每页数量,可选,默认为30
|
2359
|
-
* - page 页码,可选,默认为1
|
2360
|
-
* @returns 包含Issue列表的响应对象
|
2361
|
-
* @example
|
2362
|
-
* ```ts
|
2363
|
-
* const res = await issue.get_issue_list({ owner: 'owner', repo: 'repo' })
|
2364
|
-
* -> 议题信息对象列表
|
2365
|
-
* ```
|
2366
|
-
*/
|
2367
|
-
get_issues_list(options: RepoIssueListParamType): Promise<ApiResponseType<IssueListResponseType>>;
|
2368
|
-
/**
|
2369
|
-
* 创建一个议题
|
2370
|
-
* 权限:
|
2371
|
-
* - Issues: Write
|
2372
|
-
* @param options 发送Issue的参数对象
|
2373
|
-
* - owner 仓库拥有者
|
2374
|
-
* - repo 仓库名称
|
2375
|
-
* - title 标题
|
2376
|
-
* - body 内容
|
2377
|
-
* - assignee 指派人
|
2378
|
-
* - milestone 里程碑
|
2379
|
-
* - labels 标签列表
|
2380
|
-
* - type 问题类型
|
2381
|
-
* @returns 包含Issue信息的响应对象
|
2382
|
-
* @example
|
2383
|
-
* ```ts
|
2384
|
-
* const res = await issue.create_issue({ owner: 'owner', repo:'repo', title:'title', body:'body' })
|
2385
|
-
* -> 创建议题信息对象
|
2386
|
-
* ```
|
2387
|
-
*/
|
2388
|
-
create_issue(options: CreteIssueParamType): Promise<ApiResponseType<CreateIssueResponseType>>;
|
2389
|
-
/**
|
2390
|
-
* 更新一个议题
|
2391
|
-
* 权限:
|
2392
|
-
* - Issues: Write
|
2393
|
-
* - Pull requests: Write
|
2394
|
-
* 需以上权限之一
|
2395
|
-
* @param options 更新Issue的参数对象
|
2396
|
-
* - owner 仓库拥有者
|
2397
|
-
* - repo 仓库名称
|
2398
|
-
* - issue_number Issue编号
|
2399
|
-
* - title 标题
|
2400
|
-
* - body 内容
|
2401
|
-
* - assignee 指派人
|
2402
|
-
* - milestone 里程碑
|
2403
|
-
* - labels 标签列表
|
2404
|
-
* - type 问题类型
|
2405
|
-
* @returns 包含Issue信息的响应对象
|
2406
|
-
* @example
|
2407
|
-
* ```ts
|
2408
|
-
* const res = await issue.update_issue({ owner: 'owner', repo:'repo', issue_number:1, title:'title', body:'body' })
|
2409
|
-
* -> 更新议题信息对象
|
2410
|
-
* ```
|
2411
|
-
*/
|
2412
|
-
update_issue(options: UpdateIssueParamType): Promise<ApiResponseType<UpdateIssueResponseType>>;
|
2413
|
-
/**
|
2414
|
-
* 重新打开一个议题
|
2415
|
-
* 权限:
|
2416
|
-
* - Issues: Write
|
2417
|
-
* - Pull requests: Write
|
2418
|
-
* 需以上权限之一
|
2419
|
-
* @param options 打开Issue的参数对象
|
2420
|
-
* - owner 仓库拥有者
|
2421
|
-
* - repo 仓库名称
|
2422
|
-
* - issue_number Issue编号
|
2423
|
-
* @returns 包含Issue信息的响应对象
|
2424
|
-
* @example
|
2425
|
-
* ```ts
|
2426
|
-
* const res = await issue.open_issue({ owner: 'owner', repo:'repo', issue_number:1 })
|
2427
|
-
* -> 打开议题信息对象
|
2428
|
-
* ```
|
2429
|
-
*/
|
2430
|
-
open_issue(options: OpenIssueParamType): Promise<ApiResponseType<OpenIssueResponseType>>;
|
2431
|
-
/**
|
2432
|
-
* 重新打开一个议题
|
2433
|
-
* 权限:
|
2434
|
-
* - Issues: Write
|
2435
|
-
* - Pull requests: Write
|
2436
|
-
* 需以上权限之一
|
2437
|
-
* @deprecated 请使用 open_issue 方法代替
|
2438
|
-
*/
|
2439
|
-
reopen_issue(options: OpenIssueParamType): Promise<ApiResponseType<OpenIssueResponseType>>;
|
2440
|
-
/**
|
2441
|
-
* 关闭一个议题
|
2442
|
-
* 权限:
|
2443
|
-
* - Issues: Write
|
2444
|
-
* - Pull requests: Write
|
2445
|
-
* 需以上权限之一
|
2446
|
-
* @param options 关闭Issue的参数对象
|
2447
|
-
* - owner 仓库拥有者
|
2448
|
-
* - repo 仓库名称
|
2449
|
-
* - issue_number Issue编号
|
2450
|
-
* - state_reason 关闭原因
|
2451
|
-
* @returns 包含Issue信息的响应对象
|
2452
|
-
* @example
|
2453
|
-
* ```ts
|
2454
|
-
* const res = await issue.close_issue({ owner: 'owner', repo:'repo', issue_number:1, state_reason:'completed' })
|
2455
|
-
* -> 关闭议题信息对象
|
2456
|
-
* ```
|
2457
|
-
*/
|
2458
|
-
close_issue(options: CloseIssueParamType): Promise<ApiResponseType<CloseIssueResponseType>>;
|
2459
|
-
/**
|
2460
|
-
* 锁定一个议题
|
2461
|
-
* @github
|
2462
|
-
* 仅GitHub平台可用
|
2463
|
-
* 权限:
|
2464
|
-
* - Issues: Write
|
2465
|
-
* - Pull requests: Write
|
2466
|
-
* 需以上权限之一
|
2467
|
-
* @param options 锁定Issue的参数对象
|
2468
|
-
* - owner 仓库拥有者
|
2469
|
-
* - repo 仓库名称
|
2470
|
-
* - issue_number Issue编号
|
2471
|
-
* - lock_reason 锁定原因 可选 'off-topic' | 'too heated' | 'resolved' | 'spam'
|
2472
|
-
* @returns 锁定状态信息
|
2473
|
-
* @example
|
2474
|
-
* ```ts
|
2475
|
-
* const res = await issue.lock_issue({ owner: 'owner', repo:'repo', issue_number:1, lock_reason:'off-topic' })
|
2476
|
-
* -> 锁定议题信息对象
|
2477
|
-
* ```
|
2478
|
-
*/
|
2479
|
-
lock_issue(options: LockIssueParamType): Promise<ApiResponseType<LockIssueResponseType>>;
|
2480
|
-
/**
|
2481
|
-
* 解锁一个议题
|
2482
|
-
* @github
|
2483
|
-
* 仅GitHub平台可用
|
2484
|
-
* 权限:
|
2485
|
-
* - Issues: Write
|
2486
|
-
* - Pull requests: Write
|
2487
|
-
* 需以上权限之一
|
2488
|
-
* @param options 解锁Issue的参数对象
|
2489
|
-
* - owner 仓库拥有者
|
2490
|
-
* - repo 仓库名称
|
2491
|
-
* - issue_number Issue编号
|
2492
|
-
* @returns 解锁状态信息
|
2493
|
-
* @example
|
2494
|
-
* ```ts
|
2495
|
-
* const res = await issue.unlock_issue({ owner: 'owner', repo:'repo', issue_number})
|
2496
|
-
* -> 解锁议题信息对象
|
2497
|
-
* ```
|
2498
|
-
*/
|
2499
|
-
unlock_issue(options: UnLockIssueParamType): Promise<ApiResponseType<UnLockIssueResponseType>>;
|
2500
|
-
/**
|
2501
|
-
* 获取一个仓库下议题的评论列表
|
2502
|
-
* 权限:
|
2503
|
-
* - Issues: Read-only
|
2504
|
-
* - Pull requests: Read-only
|
2505
|
-
* 需以上权限之一
|
2506
|
-
* @param options 获取Issue评论列表的参数对象
|
2507
|
-
* - owner 仓库拥有者
|
2508
|
-
* - repo 仓库名称
|
2509
|
-
* - sort 排序方式 可选 'created' | 'updated'
|
2510
|
-
* - direction 排序方向 可选 'asc' | 'desc',当sort不存在时此参数会被忽略
|
2511
|
-
* - since 评论时间
|
2512
|
-
* - per_page 每页评论数量
|
2513
|
-
* - page 页码
|
2514
|
-
* @returns 包含Issue评论列表的响应对象
|
2515
|
-
* @example
|
2516
|
-
* ```ts
|
2517
|
-
* const res = await issue.get_issue_comments_list({ owner: 'owner', repo:'repo', issue_number:1 })
|
2518
|
-
* -> 议题评论对象列表
|
2519
|
-
* ```
|
2520
|
-
*/
|
2521
|
-
get_repo_comments_list(options: RepoCommentsListParamType): Promise<ApiResponseType<RepoCommentsListResponseType>>;
|
2522
|
-
/**
|
2523
|
-
* 获取一个议题下的评论列表
|
2524
|
-
* 权限:
|
2525
|
-
* - Issues: Read-only
|
2526
|
-
* - Pull requests: Read-only
|
2527
|
-
* 需以上权限之一
|
2528
|
-
* @param options 获取Issue评论列表的参数对象
|
2529
|
-
* - owner 仓库拥有者
|
2530
|
-
* - repo 仓库名称
|
2531
|
-
* - issue_number Issue编号
|
2532
|
-
* - since 评论时间
|
2533
|
-
* - per_page 每页评论数量
|
2534
|
-
* - page 页码
|
2535
|
-
* @returns 包含Issue评论列表的响应对象
|
2536
|
-
* @example
|
2537
|
-
* ```ts
|
2538
|
-
* const res = await issue.get_issue_comments_list({ owner: 'owner', repo:'repo', issue_number:1 })
|
2539
|
-
* -> 议题评论对象列表
|
2540
|
-
* ```
|
2541
|
-
*/
|
2542
|
-
get_issue_comments_list(options: IssueCommentsListParamType): Promise<ApiResponseType<IssueCommentsListResponseType>>;
|
2543
|
-
/**
|
2544
|
-
* 获取议题评论信息
|
2545
|
-
* 权限:
|
2546
|
-
* - Issues: Read-only
|
2547
|
-
* - Pull requests: Read-only
|
2548
|
-
* 需以上权限之一
|
2549
|
-
* @param options 获取Issue评论信息的参数对象
|
2550
|
-
* - owner 仓库拥有者
|
2551
|
-
* - repo 仓库名称
|
2552
|
-
* - comment_id 评论ID
|
2553
|
-
* @returns Issue评论信息
|
2554
|
-
* @example
|
2555
|
-
* ```ts
|
2556
|
-
* const res = await issue.get_issue_comment({ owner: 'owner', repo:'repo', comment_id:1 })
|
2557
|
-
* -> 议题评论对象
|
2558
|
-
* ```
|
2559
|
-
*/
|
2560
|
-
get_issue_comment_info(options: IssueCommentInfoParamType): Promise<ApiResponseType<IssueCommentInfoResponseType>>;
|
2561
|
-
/**
|
2562
|
-
* 创建一个议题评论
|
2563
|
-
* 权限:
|
2564
|
-
* - Issues: Write
|
2565
|
-
* - Pull requests: Write
|
2566
|
-
* 需以上权限之一
|
2567
|
-
* @param options 创建Issue评论的参数对象
|
2568
|
-
* - owner 仓库拥有者
|
2569
|
-
* - repo 仓库名称
|
2570
|
-
* - issue_number Issue编号
|
2571
|
-
* - body 评论内容
|
2572
|
-
* @returns 创建的Issue评论信息
|
2573
|
-
* @example
|
2574
|
-
* ```ts
|
2575
|
-
* const issue = get_issue() // 获取issue实例
|
2576
|
-
* const res = await issue.create_issue_comment({ owner: 'owner', repo:'repo', issue_number:1, body:'comment' })
|
2577
|
-
* -> 创建议题评论对象
|
2578
|
-
* ```
|
2579
|
-
*/
|
2580
|
-
create_issue_comment(options: CreteIssueCommentParamType): Promise<ApiResponseType<CreteIssueCommentResponseType>>;
|
2581
|
-
/**
|
2582
|
-
* 更新议题评论信息
|
2583
|
-
* 权限:
|
2584
|
-
* - Issues: Write
|
2585
|
-
* - Pull requests: Write
|
2586
|
-
* 需以上权限之一
|
2587
|
-
* @param options 更新Issue评论信息的参数对象
|
2588
|
-
* - owner 仓库拥有者
|
2589
|
-
* - repo 仓库名称
|
2590
|
-
* - comment_id 评论ID
|
2591
|
-
* - body 评论内容
|
2592
|
-
* @returns 更新后的Issue评论信息
|
2593
|
-
* @example
|
2594
|
-
* ```ts
|
2595
|
-
* const res = await issue.update_issue_comment({ owner: 'owner', repo:'repo', comment_id:1, body:'body' })
|
2596
|
-
* -> 更新议题评论对象
|
2597
|
-
* ```
|
2598
|
-
*/
|
2599
|
-
update_issue_comment(options: UpdateIssueCommentParamType): Promise<ApiResponseType<UpdateIssueCommentResponseType>>;
|
2600
|
-
/**
|
2601
|
-
* 删除议题评论信息
|
2602
|
-
* 权限:
|
2603
|
-
* - Issues: Write
|
2604
|
-
* - Pull requests: Write
|
2605
|
-
* 需以上权限之一
|
2606
|
-
* @param options 删除Issue评论信息的参数对象
|
2607
|
-
* - owner 仓库拥有者
|
2608
|
-
* - repo 仓库名称
|
2609
|
-
* - comment_id 评论ID
|
2610
|
-
* @returns 删除结果信息
|
2611
|
-
* @example
|
2612
|
-
* ```ts
|
2613
|
-
* const res = awaitissue.remove_issue_comment()
|
2614
|
-
* -> 删除议题评论对象
|
2615
|
-
* ```
|
2616
|
-
*/
|
2617
|
-
remove_issue_comment(options: RemoveIssueCommentParamType): Promise<ApiResponseType<RemoveIssueCommentResponseType>>;
|
2618
|
-
/**
|
2619
|
-
* 删除议题评论信息
|
2620
|
-
* 权限:
|
2621
|
-
* - Issues: Write
|
2622
|
-
* - Pull requests: Write
|
2623
|
-
* 需以上权限之一
|
2624
|
-
* @deprecated 请使用 remove_issue_comment 方法代替
|
2625
|
-
*/
|
2626
|
-
delete_issue_comment(options: RemoveIssueCommentParamType): Promise<ApiResponseType<RemoveIssueCommentResponseType>>;
|
2627
|
-
/**
|
2628
|
-
* 获取子议题列表
|
2629
|
-
* @github
|
2630
|
-
* 仅GitHub 平台使用
|
2631
|
-
* 权限:
|
2632
|
-
* - Issues: Read-only
|
2633
|
-
* - Pull requests: Read-only
|
2634
|
-
* 需以上权限之一
|
2635
|
-
* @param options 获取子议题列表的参数对象
|
2636
|
-
* - owner 仓库拥有者
|
2637
|
-
* - repo 仓库名称
|
2638
|
-
* - issue_number 议题编号
|
2639
|
-
* @returns 子议题列表
|
2640
|
-
* @example
|
2641
|
-
* ```ts
|
2642
|
-
* const res = await issue.get_sub_issue_list({ owner: 'owner', repo:'repo', issue_number:1 })
|
2643
|
-
* -> 子议题信息对象列表
|
2644
|
-
* ```
|
2645
|
-
*/
|
2646
|
-
get_sub_issue_list(options: SubIssueListParamType): Promise<ApiResponseType<SubIssueListResponseType>>;
|
2647
|
-
/**
|
2648
|
-
* 创建子议题
|
2649
|
-
* 添加一个子议题到指定的议题中
|
2650
|
-
* @github
|
2651
|
-
* 仅GitHub 平台使用
|
2652
|
-
* 权限:
|
2653
|
-
* - Issues:Write
|
2654
|
-
* @param options 添加子议题的参数对象
|
2655
|
-
* - owner 仓库拥有者
|
2656
|
-
* - repo 仓库名称
|
2657
|
-
* - issue_number 父议题编号
|
2658
|
-
* - sub_issue_id 子议题编号
|
2659
|
-
* - replace_parent 是否替换父议题
|
2660
|
-
* @returns 添加结果信息
|
2661
|
-
* @example
|
2662
|
-
* ```ts
|
2663
|
-
* const res = await issue.add_sub_issue({ owner: 'owner', repo:'repo', issue_number:1, sub_issue_id:1, replace_parent:true })
|
2664
|
-
* -> 创建子议题信息对象
|
2665
|
-
* ```
|
2666
|
-
*/
|
2667
|
-
create_sub_issue(options: CreateSubIssueParamType): Promise<ApiResponseType<CreateSubIssueResponseType>>;
|
2668
|
-
/**
|
2669
|
-
* 添加子议题
|
2670
|
-
* 添加一个子议题到指定的议题中
|
2671
|
-
* @github
|
2672
|
-
* 仅GitHub 平台使用
|
2673
|
-
* @deprecated 已弃用,请使用`create_sub_issue`方法
|
2674
|
-
*/
|
2675
|
-
add_sub_issue(options: CreateSubIssueParamType): Promise<ApiResponseType<CreateSubIssueResponseType>>;
|
2676
|
-
/**
|
2677
|
-
* 删除子议题
|
2678
|
-
* @github
|
2679
|
-
* 仅GitHub 平台使用
|
2680
|
-
* 权限:
|
2681
|
-
* - Issues:Write
|
2682
|
-
* @param options 删除子议题的参数对象
|
2683
|
-
* - owner 仓库拥有者
|
2684
|
-
* - repo 仓库名称
|
2685
|
-
* - issue_number 父议题编号
|
2686
|
-
* - sub_issue_id 子议题编号
|
2687
|
-
* @returns 删除结果信息
|
2688
|
-
* @example
|
2689
|
-
* ```ts
|
2690
|
-
* const res = await issue.remove_sub_issue({ owner: 'owner', repo:'repo', issue_number:1, sub_issue_id:1 })
|
2691
|
-
* -> 删除子议题信息对象
|
2692
|
-
* ```
|
2693
|
-
*/
|
2694
|
-
remove_sub_issue(options: RemoveSubIssueParamType): Promise<ApiResponseType<RemoveSubIssueResponseType>>;
|
2695
|
-
/**
|
2696
|
-
* 删除子议题
|
2697
|
-
* 删除一个子议题
|
2698
|
-
* 权限:
|
2699
|
-
* - Issues:Write
|
2700
|
-
* @deprecated 请使用 remove_sub_issue 方法代替
|
2701
|
-
*/
|
2702
|
-
delete_sub_issue(options: RemoveSubIssueParamType): Promise<ApiResponseType<RemoveSubIssueResponseType>>;
|
2703
|
-
/**
|
2704
|
-
* 重新排序子议题
|
2705
|
-
* 重新确定子议题优先级
|
2706
|
-
* @github
|
2707
|
-
* 仅GitHub 平台使用
|
2708
|
-
* 权限:
|
2709
|
-
* - Issues:Write
|
2710
|
-
* @param options 重新排序子议题的参数对象
|
2711
|
-
* - owner 仓库拥有者
|
2712
|
-
* - repo 仓库名称
|
2713
|
-
* - issue_number 父议题编号
|
2714
|
-
* - sub_issue_id 子议题编号
|
2715
|
-
* - before_id 指定要在哪个子议题之前插入,传入目标子议题的编号
|
2716
|
-
* - after_id 指定要在哪个子议题之后插入,传入目标子议题的编号
|
2717
|
-
* @example
|
2718
|
-
* ```ts
|
2719
|
-
* const res = await issue.reprioritize_sub_issue({ owner: 'owner', repo:'repo', issue_number:1, sub_issue_id:1, before_id:1 })
|
2720
|
-
* -> 排序子议题信息对象
|
2721
|
-
* ```
|
2722
|
-
*/
|
2723
|
-
reprioritize_sub_issue(options: ReprioritizeSubIssueParamType): Promise<ApiResponseType<ReprioritizeSubIssueResponseType>>;
|
2724
|
-
}
|
2725
|
-
|
2726
|
-
/**
|
2727
|
-
* Github 组织操作类
|
2728
|
-
*
|
2729
|
-
* 提供对GitHub组织的CRUD操作,包括:
|
2730
|
-
* - 获取组织信息
|
2731
|
-
*/
|
2732
|
-
declare class Org extends GitHubClient {
|
2733
|
-
constructor(base: GitHubClient);
|
2734
|
-
/**
|
2735
|
-
* 获取组织信息
|
2736
|
-
* 权限:
|
2737
|
-
* - Metadata Read-only , 如果获取公开组织可无需此权限
|
2738
|
-
* @param options 组织参数
|
2739
|
-
* - org 组织名称
|
2740
|
-
* @returns 组织信息
|
2741
|
-
* @example
|
2742
|
-
* ```ts
|
2743
|
-
* const orgInfo = await org.get_org_info({ org: 'org' })
|
2744
|
-
* -> 组织信息对象
|
2745
|
-
* ```
|
2746
|
-
*/
|
2747
|
-
get_org_info(options: OrgInfoParamType): Promise<ApiResponseType<OrgInfoResponseType>>;
|
2748
|
-
/**
|
2749
|
-
* 获取组织成员信息
|
2750
|
-
* 权限:
|
2751
|
-
* - Member: Read
|
2752
|
-
* @description 该函数必需要授权访问,否则会获取失败
|
2753
|
-
* @param options 组织信息参数
|
2754
|
-
* - org 组织名称
|
2755
|
-
* - username 成员名称
|
2756
|
-
* @returns 组织信息
|
2757
|
-
* @example
|
2758
|
-
* ```ts
|
2759
|
-
* console.log(await get_org_member_info({ org: 'CandriaJS', username: 'CandriaJS' }))
|
2760
|
-
* -> {
|
2761
|
-
* "state": "active",
|
2762
|
-
* "role": "admin",
|
2763
|
-
* "organization": {
|
2764
|
-
* "id": 123456789,
|
2765
|
-
* "login": "CandriaJS",
|
2766
|
-
* "name": "CandriaJS",
|
2767
|
-
* "html_url": "https://github.com/CandriaJS"
|
2768
|
-
* },
|
2769
|
-
* "user": {
|
2770
|
-
* "id": 123456789,
|
2771
|
-
* "login": "CandriaJS",
|
2772
|
-
* "name": "CandriaJS",
|
2773
|
-
* "avatar_url": "https://avatars.githubusercontent.com/u/123456789?v=4",
|
2774
|
-
* "html_url": "https://github.com/CandriaJS"
|
2775
|
-
* }
|
2776
|
-
* }
|
2777
|
-
* ```
|
2778
|
-
*/
|
2779
|
-
get_org_member_info(options: GetOrgMemberInfoParamType): Promise<ApiResponseType<GetOrgMemberInfoResponseType>>;
|
2780
|
-
/**
|
2781
|
-
* 获取组织成员列表
|
2782
|
-
* 权限:
|
2783
|
-
* - Member: Read
|
2784
|
-
* @description 该函数必需要授权访问,否则会获取失败
|
2785
|
-
* @param options
|
2786
|
-
* - org 组织名称
|
2787
|
-
* - per_page 每页数量
|
2788
|
-
* - page 页码
|
2789
|
-
* @returns
|
2790
|
-
* @example
|
2791
|
-
* ```ts
|
2792
|
-
* const res = await github.issue.get_org_member_list({ org: 'CandriaJS'})
|
2793
|
-
* -> [
|
2794
|
-
* {
|
2795
|
-
* "id": 1234567890,
|
2796
|
-
* "login": "username",
|
2797
|
-
* "name": "username",
|
2798
|
-
* "role": "admin",
|
2799
|
-
* "avatar_url": "https://avatars.githubusercontent.com/u/1234567890?v=4",
|
2800
|
-
* "html_url": "https://github.com/username"
|
2801
|
-
* }
|
2802
|
-
* ]
|
2803
|
-
* ```
|
2804
|
-
*/
|
2805
|
-
get_org_member_list(options: GetOrgMemberListParamType): Promise<ApiResponseType<GetOrgMemberListResponseType>>;
|
2806
|
-
/**
|
2807
|
-
* 添加组织成员
|
2808
|
-
* 权限:
|
2809
|
-
* - Members Read-And-Write
|
2810
|
-
* @param options 组织参数
|
2811
|
-
* - org 组织名称
|
2812
|
-
* - username 成员名称
|
2813
|
-
* @returns 成员信息
|
2814
|
-
* @example
|
2815
|
-
* ```ts
|
2816
|
-
* const orgInfo = await org.add_member({ org: 'org', username: 'username' })
|
2817
|
-
* -> 添加组织成员对象
|
2818
|
-
* ```
|
2819
|
-
*/
|
2820
|
-
add_member(options: AddMemberParamType): Promise<ApiResponseType<AddMemberResponseType>>;
|
2821
|
-
/**
|
2822
|
-
* 移除组织成员
|
2823
|
-
* 权限:
|
2824
|
-
* - Members Read-And-Write
|
2825
|
-
* @param options
|
2826
|
-
* - org 组织名
|
2827
|
-
* - username 成员名
|
2828
|
-
* @returns
|
2829
|
-
* @example
|
2830
|
-
* ```ts
|
2831
|
-
* const res = await github.remove_org_member({ org: 'org', username: 'loli'})
|
2832
|
-
* -> {
|
2833
|
-
* "success": true,
|
2834
|
-
* "message": "喵呜, 移除组织成员loli成功"
|
2835
|
-
* }
|
2836
|
-
* ```
|
2837
|
-
*/
|
2838
|
-
remove_org_member(options: RemoveOrgMemberParamType): Promise<ApiResponseType<RemoveOrgMemberResponseType>>;
|
2839
|
-
}
|
2840
|
-
|
2841
|
-
/**
|
2842
|
-
* GitHub pull_request类
|
2843
|
-
*
|
2844
|
-
* 提供完整的GitHub pull_request管理,包括
|
2845
|
-
* - 获取pull_request列表
|
2846
|
-
* - 获取pull_request详情
|
2847
|
-
*
|
2848
|
-
* @class Auth
|
2849
|
-
* @extends GitHubClient GitHub基础操作类
|
2850
|
-
*/
|
2851
|
-
declare class Pull_Request extends GitHubClient {
|
2852
|
-
constructor(base: GitHubClient);
|
2853
|
-
/**
|
2854
|
-
* 获取拉取请求详情
|
2855
|
-
* 权限:
|
2856
|
-
* - Pull requests: Read-And-Wirte
|
2857
|
-
* - Contents: Read-And-Wirte
|
2858
|
-
* @param options 请求参数列表
|
2859
|
-
* - owner 仓库拥有者
|
2860
|
-
* - repo 仓库名称
|
2861
|
-
* - pr_number Pr编号
|
2862
|
-
* @returns 包含pull_request信息的响应对象
|
2863
|
-
* @example
|
2864
|
-
* ```ts
|
2865
|
-
* const res = await pull_request.get_pull_request_info({ owner: 'owner', repo:'repo', pr_number:1 })
|
2866
|
-
* -> 拉取提交信息对象
|
2867
|
-
* ```
|
2868
|
-
*/
|
2869
|
-
get_pull_request_info(options: PullRequestInfoParamType): Promise<ApiResponseType<PullRequestInfoResponseType>>;
|
2870
|
-
/**
|
2871
|
-
* 获取拉取请求列表
|
2872
|
-
* 权限:
|
2873
|
-
* - Pull requests: Read-Only
|
2874
|
-
* @param options 请求参数列表
|
2875
|
-
* - owner 仓库拥有者
|
2876
|
-
* - repo 仓库名称
|
2877
|
-
* - pr_number Pr编号
|
2878
|
-
* - state 状态
|
2879
|
-
* - base 基准分支
|
2880
|
-
* - sort 排序
|
2881
|
-
* - direction 排序方向
|
2882
|
-
* - per_page 每页数量
|
2883
|
-
* - page 页码
|
2884
|
-
* @returns 包含pull_request信息的响应对象
|
2885
|
-
* @example
|
2886
|
-
* ```ts
|
2887
|
-
* const res = await pull_request.get_get_pull_request_list({ owner: 'owner', repo:'repo' })
|
2888
|
-
* -> 拉取提交信息对象列表
|
2889
|
-
* ```
|
2890
|
-
*/
|
2891
|
-
get_get_pull_request_list(options: PullRequestListParamType): Promise<ApiResponseType<PullRequestListResponseType>>;
|
2892
|
-
/**
|
2893
|
-
* 创建一个拉取请求
|
2894
|
-
* 权限:
|
2895
|
-
* - Pull requests: Read-And-Write
|
2896
|
-
* @param options 请求参数列表
|
2897
|
-
* - owner 仓库拥有者
|
2898
|
-
* - repo 仓库名称
|
2899
|
-
* - title 标题
|
2900
|
-
* - body 内容
|
2901
|
-
* - issue 关联的议题
|
2902
|
-
* title和body与issue参数传入其中一种,当传入issue参数时,title和body参数将自动填充
|
2903
|
-
* - head 拉取请求源分支
|
2904
|
-
* - head_repo 拉取请求源仓库, 如果两个存储库都由同一组织拥有,则跨存储库拉取请求需要此字段
|
2905
|
-
* - base 拉取请求目标分支
|
2906
|
-
* - draft 是否为草稿
|
2907
|
-
* @returns 包含pull_request信息的响应对象
|
2908
|
-
* @example
|
2909
|
-
* ```ts
|
2910
|
-
* const res = await pull_request.create_pull_requestt({ owner: 'owner', repo:'repo', issue: 1, head: 'head', base: 'base' })
|
2911
|
-
* -> 创建拉取提交信息对象
|
2912
|
-
*/
|
2913
|
-
create_pull_request(options: CreatePullRequestParamType): Promise<ApiResponseType<CreatePullRequestResponseType>>;
|
2914
|
-
/**
|
2915
|
-
* 更新一个拉取请求
|
2916
|
-
* 权限:
|
2917
|
-
* - Pull requests: Read-And-Write
|
2918
|
-
* @param options 请求参数列表
|
2919
|
-
* - owner 仓库拥有者
|
2920
|
-
* - repo 仓库名称
|
2921
|
-
* - title 标题
|
2922
|
-
* - body 内容
|
2923
|
-
* - state 状态
|
2924
|
-
* @returns 包含pull_request信息的响应对象
|
2925
|
-
* @example
|
2926
|
-
* ```ts
|
2927
|
-
* const res = await pull_request.create_pull_requestt({ owner: 'owner', repo:'repo', pr_number:1, state:'open' })
|
2928
|
-
* -> 更新拉取提交信息对象
|
2929
|
-
*/
|
2930
|
-
update_pull_request(options: UpdatePullRequestParamType): Promise<ApiResponseType<UpdatePullRequestResponseType>>;
|
2931
|
-
/**
|
2932
|
-
* 合并拉取请求
|
2933
|
-
* 权限:
|
2934
|
-
* - Pull requests: Read-And-Write
|
2935
|
-
* @param options 请求参数列表
|
2936
|
-
* - owner 仓库拥有者
|
2937
|
-
* - repo 仓库名称
|
2938
|
-
* - pr_number 拉取请求编号
|
2939
|
-
* - commit_title 合并提交标题
|
2940
|
-
* - commit_message 合并提交信息
|
2941
|
-
* - sha 拉取请求头部必须匹配的 SHA 才能允许合并
|
2942
|
-
* - merge_method 拉取请求合并方式, 默认为 merge
|
2943
|
-
* @returns 包含pull_request信息的响应对象
|
2944
|
-
* @example
|
2945
|
-
* ```ts
|
2946
|
-
* const res = await pull_request.merge_pull_request({ owner: 'owner', repo:'repo', pr_number:1 })
|
2947
|
-
* -> 合并拉取提交信息对象
|
2948
|
-
* ```
|
2949
|
-
*/
|
2950
|
-
merge_pull_request(options: MergePullRequestParamType): Promise<ApiResponseType<MergePullRequestResponseType>>;
|
2951
|
-
/**
|
2952
|
-
* 获取拉取请求文件列表
|
2953
|
-
* 权限:
|
2954
|
-
* - Pull requests: Read-And-Write
|
2955
|
-
* @param options 请求参数列表
|
2956
|
-
* - owner 仓库拥有者
|
2957
|
-
* - repo 仓库名称
|
2958
|
-
* - pr_number 拉取请求编号
|
2959
|
-
* - per_page 每页结果数量
|
2960
|
-
* - page 页码
|
2961
|
-
* @returns 包含拉取请求文件列表的响应对象
|
2962
|
-
* @example
|
2963
|
-
* ```ts
|
2964
|
-
* const res = await pull_request.get_pull_request_files_list({ owner: 'owner', repo:'repo', pr_number:1 })
|
2965
|
-
* -> 拉取提交文件信息对象列表
|
2966
|
-
* ```
|
2967
|
-
*/
|
2968
|
-
get_pull_request_files_list(options: GetPullRequestFilesListParamType): Promise<ApiResponseType<GetPullRequestFilesListResponseType>>;
|
2969
|
-
/**
|
2970
|
-
* 获取拉取请求评论信息
|
2971
|
-
* 权限:
|
2972
|
-
* - Pull requests: Read-And-Write
|
2973
|
-
* @param options 请求参数列表
|
2974
|
-
* - owner 仓库拥有者
|
2975
|
-
* - repo 仓库名称
|
2976
|
-
* - comment_id 评论ID
|
2977
|
-
* @returns 包含拉取请求指定的评论id的信息
|
2978
|
-
* @example
|
2979
|
-
* ```ts
|
2980
|
-
* const res = await pull_request.get_pull_request_comment_info({ owner: 'owner', repo:'repo', comment_id:1 })
|
2981
|
-
* -> 拉取提交评论信息对象
|
2982
|
-
* ```
|
2983
|
-
*/
|
2984
|
-
get_pull_request_comment_info(options: GetPullRequestCommentInfoParamType): Promise<ApiResponseType<GetPullRequestCommentInfoResponseType>>;
|
2985
|
-
/**
|
2986
|
-
* 获取拉取请求评论列表
|
2987
|
-
* 权限:
|
2988
|
-
* - Pull requests: Read-And-Write
|
2989
|
-
* @param options 请求参数列表
|
2990
|
-
* - owner 仓库拥有者
|
2991
|
-
* - repo 仓库名称
|
2992
|
-
* - pr_number 拉取请求编号
|
2993
|
-
* - direction 排序方向
|
2994
|
-
* - per_page 每页结果数量
|
2995
|
-
* - page 页码
|
2996
|
-
* @returns 包含拉取请求评论列表响应信息列表
|
2997
|
-
* @example
|
2998
|
-
* ```ts
|
2999
|
-
* const res = await pull_request.get_pull_request_comments_list({ owner: 'owner', repo:'repo', pr_number:1 })
|
3000
|
-
* -> 拉取提交评论信息对象
|
3001
|
-
* ```
|
3002
|
-
*/
|
3003
|
-
get_pull_request_comments_list(options: GetPullRequestCommentsListParamType): Promise<ApiResponseType<GetPullRequestCommentsListResponseType>>;
|
3004
|
-
/**
|
3005
|
-
* 创建拉取请求评论
|
3006
|
-
* 权限:
|
3007
|
-
* - Pull requests: Read-And-Write
|
3008
|
-
* @param options 请求参数列表
|
3009
|
-
* - owner 仓库拥有者
|
3010
|
-
* - repo 仓库名称
|
3011
|
-
* - pr_number 拉取请求编号
|
3012
|
-
* - body 评论内容
|
3013
|
-
* @returns 包含创建拉取请求评论响应信息
|
3014
|
-
* @example
|
3015
|
-
* ```ts
|
3016
|
-
* const res = await pull_request.create_pull_request_comment({ owner: 'owner', repo:'repo', pr_number:1, body: 'loli' })
|
3017
|
-
* -> 创建拉取提交评论信息对象
|
3018
|
-
* ```
|
3019
|
-
*/
|
3020
|
-
create_pull_request_comment(options: CreatePullRequestCommentParamType): Promise<ApiResponseType<CreatePullRequestCommentResponseType>>;
|
3021
|
-
/**
|
3022
|
-
* 更新拉取请求评论
|
3023
|
-
* 权限:
|
3024
|
-
* - Pull requests: Read-And-Write
|
3025
|
-
* @param options 请求参数列表
|
3026
|
-
* - owner 仓库拥有者
|
3027
|
-
* - repo 仓库名称
|
3028
|
-
* - comment_id 评论ID
|
3029
|
-
* - body 评论内容
|
3030
|
-
* @returns 包含更新拉取请求评论响应信息
|
3031
|
-
* @example
|
3032
|
-
* ```ts
|
3033
|
-
* const res = await pull_request.update_pull_request_comment({ owner: 'owner', repo:'repo', comment_id:1, body: 'loli' })
|
3034
|
-
* -> 更新拉取提交评论信息对象
|
3035
|
-
* ```
|
3036
|
-
*/
|
3037
|
-
update_pull_request_comment(options: UpdatePullRequestCommentParamType): Promise<ApiResponseType<UpdatePullRequestCommentResponseType>>;
|
3038
|
-
/**
|
3039
|
-
* 编辑拉取请求评论
|
3040
|
-
* @deprecated 请使用update_issue_comment方法
|
3041
|
-
* 权限:
|
3042
|
-
* - Pull requests: Read-And-Write
|
3043
|
-
* @param options - 删除拉取请求评论参数对象
|
3044
|
-
* @returns 删除结果
|
3045
|
-
* ```
|
3046
|
-
*/
|
3047
|
-
edit_pull_request_comment(options: UpdatePullRequestCommentParamType): Promise<ApiResponseType<UpdatePullRequestCommentResponseType>>;
|
3048
|
-
/**
|
3049
|
-
* 删除拉取请求评论
|
3050
|
-
* 权限:
|
3051
|
-
* - Pull requests: Read-And-Write
|
3052
|
-
* @param options 请求参数列表
|
3053
|
-
* - owner 仓库拥有者
|
3054
|
-
* - repo 仓库名称
|
3055
|
-
* - comment_id 评论ID
|
3056
|
-
* @returns 包含更新拉取请求评论响应信息
|
3057
|
-
* @example
|
3058
|
-
* ```ts
|
3059
|
-
* const res = await pull_request.delete_pull_request_comment({ owner: 'owner', repo:'repo', comment_id: 1 })
|
3060
|
-
* -> 更新拉取提交评论信息对象
|
3061
|
-
* ```
|
3062
|
-
*/
|
3063
|
-
delete_pull_request_comment(options: DeletePullRequestCommentParamType): Promise<ApiResponseType<DeletePullRequestCommentResponseType>>;
|
3064
|
-
}
|
3065
|
-
|
3066
|
-
/**
|
3067
|
-
* GitHub 仓库操作类
|
3068
|
-
*
|
3069
|
-
* 提供对GitHub仓库的完整CRUD操作接口,包括:
|
3070
|
-
* - 组织/用户仓库的查询、创建、删除
|
3071
|
-
* - 仓库详细信息的获取
|
3072
|
-
* - 仓库可见性检查
|
3073
|
-
* - 支持通过URL或owner/repo两种方式操作仓库
|
3074
|
-
*
|
3075
|
-
*/
|
3076
|
-
declare class Repo extends GitHubClient {
|
3077
|
-
constructor(base: GitHubClient);
|
3078
|
-
/**
|
3079
|
-
* 获取组织仓库列表
|
3080
|
-
* 权限: Metadata - Read-only , 如果获取公开仓库可无需此权限
|
3081
|
-
* @param options - 请求参数对象
|
3082
|
-
* - org - 组织名称
|
3083
|
-
* - type - 仓库类型,可选值:'all' | 'public' | 'private' | 'forks' | 'sources' | 'member', 默认值:'all'
|
3084
|
-
* - sort - 排序字段,可选值:'created' | 'updated' | 'pushed' | 'full_name', 默认值:'created'
|
3085
|
-
* - direction - 排序方向,可选值:'asc' | 'desc', 默认值:'desc'
|
3086
|
-
* - per_page - 每页数量(1-100), 默认值:30
|
3087
|
-
* - page - 页码 默认值:1
|
3088
|
-
* @returns 组织仓库列表
|
3089
|
-
* @example
|
3090
|
-
* ```ts
|
3091
|
-
* const repos = await repo.get_org_repos_list({ org: 'org' })
|
3092
|
-
* -> 组织仓库信息对象列表
|
3093
|
-
* ```
|
3094
|
-
*/
|
3095
|
-
get_org_repos_list(options: OrgRepoListParmType): Promise<ApiResponseType<OrgRepoListResponseType>>;
|
3096
|
-
/**
|
3097
|
-
* 通过授权用户查询仓库列表
|
3098
|
-
* 权限: Metadata - read-only , 如果获取公开仓库可无需此权限
|
3099
|
-
* @param options - 请求参数对象
|
3100
|
-
* - type - 仓库类型,可选值:可选all, public, private
|
3101
|
-
* - visibility - 仓库可见性,可选值:'public' | 'private' | 'internal', 默认值:'all'
|
3102
|
-
* - affiliation - 仓库关联,可选值:'owner' | 'collaborator' | 'organization_member', 默认值:'owner,collaborator,organization_member'
|
3103
|
-
* - sort - 排序字段,可选值:'created' | 'updated' | 'pushed' | 'full_name', 默认值:'created'
|
3104
|
-
* - direction - 排序方向,可选值:'asc' | 'desc', 默认值:'desc'
|
3105
|
-
* - per_page - 每页数量(1-100), 默认值:30
|
3106
|
-
* - page - 页码 默认值:1
|
3107
|
-
* @returns 仓库详细信息
|
3108
|
-
* @example
|
3109
|
-
* ```ts
|
3110
|
-
* const repos = await repo.get_repos_list({ username: 'username' })
|
3111
|
-
* -> 用户仓库信息对象列表
|
3112
|
-
* ```
|
3113
|
-
*/
|
3114
|
-
get_user_repos_list_by_token(options?: UserByTokenRepoListParamType): Promise<ApiResponseType<UserRepoListType>>;
|
3115
|
-
/**
|
3116
|
-
* 获取用户仓库列表
|
3117
|
-
* 权限:
|
3118
|
-
* - Metadata: Read-only, 如果只获取公开仓库可无需此权限
|
3119
|
-
* @param options - 请求参数对象
|
3120
|
-
* - username - 用户名
|
3121
|
-
* 优先获取授权用户仓库列表,若授权用户不存在则获取指定用户仓库列表
|
3122
|
-
* - type - 仓库类型,可选值:all, owner, member,, 默认值:'all'
|
3123
|
-
* - sort - 排序字段,可选值:'created' | 'updated' | 'pushed' | 'full_name', 默认值:'created'
|
3124
|
-
* - direction - 排序方向,可选值:'asc' | 'desc', 默认值:'desc'
|
3125
|
-
* - per_page - 每页数量(1-100), 默认值:30
|
3126
|
-
* - page - 页码 默认值:1
|
3127
|
-
* @returns 用户仓库列表
|
3128
|
-
* @example
|
3129
|
-
* ```ts
|
3130
|
-
* const repos = await github.get_user_repos_list({ username: 'loli' })
|
3131
|
-
* -> 用户仓库信息对象列表
|
3132
|
-
* ```
|
3133
|
-
*/
|
3134
|
-
get_user_repos_list(options: UserRepoListParamType): Promise<ApiResponseType<UserRepoListType>>;
|
3135
|
-
/**
|
3136
|
-
* 获取仓库信息
|
3137
|
-
* 权限:
|
3138
|
-
* - Metadata: Read-only, 如果只获取公开仓库可无需此权限
|
3139
|
-
* @param options - 仓库信息参数对象,必须包含以下两种组合之一:
|
3140
|
-
* - owner 仓库拥有者
|
3141
|
-
* - repo 仓库名称
|
3142
|
-
* @example
|
3143
|
-
* ```ts
|
3144
|
-
* const repo = await repo.get_repo_info({ owner: 'owner', repo: 'repo' })
|
3145
|
-
* -> 仓库信息对象
|
3146
|
-
* ```
|
3147
|
-
*/
|
3148
|
-
get_repo_info(options: RepoInfoParamType): Promise<ApiResponseType<RepoInfoResponseType>>;
|
3149
|
-
/**
|
3150
|
-
* 获取仓库语言列表
|
3151
|
-
* 权限:
|
3152
|
-
* - Metadata: Read-only, 如果只获取公开仓库可无需此权限
|
3153
|
-
* @param options - 仓库信息参数对象,必须包含以下两种组合之一:
|
3154
|
-
* - owner 仓库拥有者
|
3155
|
-
* - repo 仓库名称
|
3156
|
-
* @example
|
3157
|
-
* ```ts
|
3158
|
-
* const repo = await repo.get_repo_languages_list({ owner: 'owner', repo: 'repo' })
|
3159
|
-
* -> 仓库语言对象列表
|
3160
|
-
* ```
|
3161
|
-
*/
|
3162
|
-
get_repo_languages_list(options: RepoLanguagesListParamType): Promise<ApiResponseType<RepoLanguagesListResponseType>>;
|
3163
|
-
/**
|
3164
|
-
* 创建组织仓库
|
3165
|
-
* 权限:
|
3166
|
-
* - Administration: Read and write
|
3167
|
-
* @param options 创建组织仓库参数
|
3168
|
-
* - org: 组织名称
|
3169
|
-
* - name: 仓库名称
|
3170
|
-
* - description: 仓库描述
|
3171
|
-
* - homepage: 仓库主页URL
|
3172
|
-
* - visibility: 仓库可见性,可选值:'public' | 'private', 默认值:'public'
|
3173
|
-
* - has_issues: 是否启用issues功能, 默认值:true
|
3174
|
-
* - has_wiki: 是否启用wiki功能, 默认值:true
|
3175
|
-
* - auto_init: 是否自动初始化仓库 默认值:false
|
3176
|
-
* @returns 返回创建成功的仓库信息
|
3177
|
-
* @example
|
3178
|
-
* ```ts
|
3179
|
-
* const repoInfo = await org.create_org_repo({org: 'loli', repo: 'git-neko-kit'})
|
3180
|
-
* -> 创建组织仓库信息对象
|
3181
|
-
* ```
|
3182
|
-
*/
|
3183
|
-
create_org_repo(options: OrgRepoCreateParamType): Promise<ApiResponseType<OrgRepoCreateResponseType>>;
|
3184
|
-
/**
|
3185
|
-
* 创建用户仓库
|
3186
|
-
* 权限:
|
3187
|
-
* - Administration: Read and write
|
3188
|
-
* @param options 创建组织仓库参数
|
3189
|
-
* - owner: 仓库拥有者,用户名称
|
3190
|
-
* - name: 仓库名称
|
3191
|
-
* - description: 仓库描述
|
3192
|
-
* - homepage: 仓库主页URL
|
3193
|
-
* - visibility: 仓库可见性,可选值:'public' | 'private', 默认值:'public'
|
3194
|
-
* - has_issues: 是否启用issues功能, 默认值:true
|
3195
|
-
* - has_wiki: 是否启用wiki功能, 默认值:true
|
3196
|
-
* - auto_init: 是否自动初始化仓库 默认值:false
|
3197
|
-
* @returns 返回创建成功的仓库信息
|
3198
|
-
* @example
|
3199
|
-
* ```ts
|
3200
|
-
* const repoInfo = await repo.create_user_repo({org: 'loli', repo: 'git-neko-kit'})
|
3201
|
-
* -> 创建用户仓库信息对象
|
3202
|
-
* ```
|
3203
|
-
*/
|
3204
|
-
create_user_repo(options: UserRepoCreateParamType): Promise<ApiResponseType<UserRepoCreateResponseType>>;
|
3205
|
-
/**
|
3206
|
-
* 创建用户仓库
|
3207
|
-
* @deprecated 请使用create_user_repo方法
|
3208
|
-
* 权限:
|
3209
|
-
* - Administration: Read and write
|
3210
|
-
* @param options 创建组织仓库参数
|
3211
|
-
* - owner: 仓库拥有者,用户名称
|
3212
|
-
* - name: 仓库名称
|
3213
|
-
* - description: 仓库描述
|
3214
|
-
* - homepage: 仓库主页URL
|
3215
|
-
* - visibility: 仓库可见性,可选值:'public' | 'private', 默认值:'public'
|
3216
|
-
* - has_issues: 是否启用issues功能, 默认值:true
|
3217
|
-
* - has_wiki: 是否启用wiki功能, 默认值:true
|
3218
|
-
* - auto_init: 是否自动初始化仓库 默认值:false
|
3219
|
-
* @returns 返回创建成功的仓库信息
|
3220
|
-
*/
|
3221
|
-
create_repo(options: UserRepoCreateParamType): Promise<ApiResponseType<RepoInfoResponseType>>;
|
3222
|
-
/**
|
3223
|
-
* 获取协作者列表
|
3224
|
-
* 权限:
|
3225
|
-
* - Metadata: Read
|
3226
|
-
* @param options 获取协作者列表对象
|
3227
|
-
* - owner: 仓库拥有者
|
3228
|
-
* - repo: 仓库名称
|
3229
|
-
* - url: 仓库地址
|
3230
|
-
* url和owner、repo参数传入其中的一种
|
3231
|
-
* - affiliation: 协作者类型,可选outside, direct, all,默认为all
|
3232
|
-
* - permission: 协作者权限,可选pull,triage, push, maintain, admin,默认为pull
|
3233
|
-
* - per_page: 每页数量,默认为30
|
3234
|
-
* - page: 页码,默认为1
|
3235
|
-
* @returns 返回获取协作者列表结果
|
3236
|
-
* @example
|
3237
|
-
* ```ts
|
3238
|
-
* const result = await collaborator.get_collaborators_list(options)
|
3239
|
-
* -> 仓库协作者信息对象列表
|
3240
|
-
* ```
|
3241
|
-
*/
|
3242
|
-
get_collaborators_list(options: GetCollaboratorListParamType): Promise<ApiResponseType<GetCollaboratorListResponseType>>;
|
3243
|
-
/**
|
3244
|
-
* 邀请协作者
|
3245
|
-
* 权限:
|
3246
|
-
* - Administration: Read and write
|
3247
|
-
* @param options 邀请协作者对象
|
3248
|
-
* - owner: 仓库拥有者
|
3249
|
-
* - repo: 仓库名称
|
3250
|
-
* - url: 仓库地址
|
3251
|
-
* owner和repo或者url选择一个即可
|
3252
|
-
* - username: 要邀请协作者用户名
|
3253
|
-
* - permission: 协作者权限,可选pull,triage, push, maintain, admin,默认为pull
|
3254
|
-
* @returns 返回邀请协作者结果
|
3255
|
-
* @example
|
3256
|
-
* ```ts
|
3257
|
-
* const result = await collaborator.add_collaborator({
|
3258
|
-
* owner: 'owner',
|
3259
|
-
* repo: 'repo',
|
3260
|
-
* username: 'username',
|
3261
|
-
* permission: 'pull'
|
3262
|
-
* })
|
3263
|
-
* -> 邀请仓库协作者信息对象
|
3264
|
-
* ```
|
3265
|
-
*/
|
3266
|
-
add_collaborator(options: CollaboratorParamType): Promise<ApiResponseType<AddCollaboratorResponseType>>;
|
3267
|
-
/**
|
3268
|
-
* 删除协作者
|
3269
|
-
* 权限:
|
3270
|
-
* - Administration: Read and write
|
3271
|
-
* @param options 删除协作者对象
|
3272
|
-
* - owner: 仓库拥有者
|
3273
|
-
* - repo: 仓库名称
|
3274
|
-
* - username: 要删除协作者用户名
|
3275
|
-
* @returns 返回删除协作者结果
|
3276
|
-
* @example
|
3277
|
-
* ```ts
|
3278
|
-
* const result = await collaborator.remove_collaborator({
|
3279
|
-
* owner: 'owner',
|
3280
|
-
* repo:'repo',
|
3281
|
-
* username: 'username'
|
3282
|
-
* })
|
3283
|
-
* -> 移除仓库协作者信息对象
|
3284
|
-
* ```
|
3285
|
-
*/
|
3286
|
-
remove_collaborator(options: RemoveCollaboratorParamType): Promise<ApiResponseType<RemoveCollaboratorResponseType>>;
|
3287
|
-
/**
|
3288
|
-
* 删除协作者
|
3289
|
-
* @deprecated 请使用remove_collaborator方法
|
3290
|
-
* @param options 删除协作者对象
|
3291
|
-
* @returns 返回删除协作者结果
|
3292
|
-
*/
|
3293
|
-
delete_collaborator(options: RemoveCollaboratorParamType): Promise<ApiResponseType<RemoveCollaboratorResponseType>>;
|
3294
|
-
/**
|
3295
|
-
* 快速获取仓库可见性
|
3296
|
-
* 权限:
|
3297
|
-
* - Metadata: Read-only, 如果只获取公开仓库可无需此权限
|
3298
|
-
* @param options
|
3299
|
-
* - url 仓库URL地址
|
3300
|
-
* - owner 仓库拥有者
|
3301
|
-
* - repo 仓库名称
|
3302
|
-
* url参数和owner、repo参数传入其中的一种
|
3303
|
-
* @remarks 优先使用url参数,若url参数不存在则使用owner和repo参数
|
3304
|
-
* @returns 仓库可见性,
|
3305
|
-
* @example
|
3306
|
-
* ```ts
|
3307
|
-
* // 公开仓库
|
3308
|
-
* const visibility = await repo.get_repo_visibility({url: 'https://github.com/CandriaJS/git-neko-kit'})
|
3309
|
-
* -> 'public'
|
3310
|
-
* // 私有仓库
|
3311
|
-
* const visibility = await repo.get_repo_visibility({url: 'https://github.com/CandriaJS/git-neko-kit'})
|
3312
|
-
* -> 'private'
|
3313
|
-
* ```
|
3314
|
-
*/
|
3315
|
-
get_repo_visibility(options: GetRepoVisibilityParamType): Promise<GetRepoVisibilityResponseType>;
|
3316
|
-
/**
|
3317
|
-
* 获取仓库默认分支
|
3318
|
-
* 权限:
|
3319
|
-
* - Metadata: Read-only, 如果只获取公开仓库可无需此权限
|
3320
|
-
* @param options
|
3321
|
-
* - owner 仓库拥有者
|
3322
|
-
* - repo 仓库名称
|
3323
|
-
* @example
|
3324
|
-
* ```ts
|
3325
|
-
* const defaultBranch = await repo.get_repo_default_branch({owner: CandriaJS, repo: meme-plugin)}
|
3326
|
-
* -> 'main'
|
3327
|
-
* ```ts
|
3328
|
-
*/
|
3329
|
-
get_repo_default_branch(options: GetRepoDefaultBranchParamType): Promise<GetRepoDefaultBranchResponseType | null>;
|
3330
|
-
/**
|
3331
|
-
* 获取仓库主要语言
|
3332
|
-
* 权限:
|
3333
|
-
* - Metadata: Read-only, 如果只获取公开仓库可无需此权限
|
3334
|
-
* @param options
|
3335
|
-
* - url 仓库URL地址
|
3336
|
-
* - owner 仓库拥有者
|
3337
|
-
* - repo 仓库名称
|
3338
|
-
* url参数和owner、repo参数传入其中的一种
|
3339
|
-
* @example
|
3340
|
-
* ```ts
|
3341
|
-
* const language = await repo.get_repo_language({url: 'URL_ADDRESS.com/CandriaJS/meme-plugin')}
|
3342
|
-
* -> 'JavaScript'
|
3343
|
-
* ```ts
|
3344
|
-
*/
|
3345
|
-
get_repo_main_language(options: GetRepoMainLanguageParamType): Promise<GetRepoMainLanguageResponseType>;
|
3346
|
-
}
|
3347
|
-
|
3348
|
-
/**
|
3349
|
-
* GitHub 搜索管理类
|
3350
|
-
*
|
3351
|
-
* 提供对GitHub Search的完整管理功能,包括:
|
3352
|
-
* - 搜索用户
|
3353
|
-
* - 搜索仓库
|
3354
|
-
*
|
3355
|
-
*/
|
3356
|
-
declare class Search extends GitHubClient {
|
3357
|
-
constructor(base: GitHubClient);
|
3358
|
-
/**
|
3359
|
-
* 搜索用户
|
3360
|
-
*
|
3361
|
-
* @param options 搜索参数
|
3362
|
-
* - q 搜索关键字
|
3363
|
-
* - order 排序顺序
|
3364
|
-
* - per_page 每页数量
|
3365
|
-
* - page 页码
|
3366
|
-
* @returns 搜索结果
|
3367
|
-
* @example
|
3368
|
-
* ```ts
|
3369
|
-
* const users = await search.search_users({ q: 'username', order: 'desc' })
|
3370
|
-
* -> {
|
3371
|
-
* total_count: 1,
|
3372
|
-
* items: [
|
3373
|
-
* {
|
3374
|
-
* id: 1,
|
3375
|
-
* login: 'username',
|
3376
|
-
* name: 'username',
|
3377
|
-
* email: 'username@example.com',
|
3378
|
-
* avatar_url: 'https://avatars.githubusercontent.com/u/1?v=4',
|
3379
|
-
* html_url: 'https://github.com/username'
|
3380
|
-
* }
|
3381
|
-
* ]
|
3382
|
-
* }
|
3383
|
-
* ```
|
3384
|
-
*/
|
3385
|
-
search_users(options: SearchUsersParamType): Promise<ApiResponseType<SearchUsersResponseType>>;
|
3386
|
-
/**
|
3387
|
-
* 搜索仓库
|
3388
|
-
*
|
3389
|
-
* @param options 搜索参数
|
3390
|
-
* - q 搜索关键字
|
3391
|
-
* - order 排序顺序
|
3392
|
-
* - per_page 每页数量
|
3393
|
-
* - page 页码
|
3394
|
-
* @returns 搜索结果
|
3395
|
-
* @example
|
3396
|
-
* ```ts
|
3397
|
-
* const repos = await search.search_repos({ q: 'repo', order: 'desc' })
|
3398
|
-
* -> {
|
3399
|
-
* total_count: 1,
|
3400
|
-
* items: [
|
3401
|
-
* {
|
3402
|
-
* id: 1,
|
3403
|
-
* owner: 'username',
|
3404
|
-
* name: 'repo',
|
3405
|
-
* full_name: 'username/repo',
|
3406
|
-
* description: 'repo description',
|
3407
|
-
* visibility: 'public',
|
3408
|
-
* public: true,
|
3409
|
-
* private: false,
|
3410
|
-
* archived: false,
|
3411
|
-
* language: 'JavaScript',
|
3412
|
-
* pushed_at: '2021-01-01T00:00:00Z'
|
3413
|
-
* }
|
3414
|
-
* ]
|
3415
|
-
* }
|
3416
|
-
* ```
|
3417
|
-
*/
|
3418
|
-
search_repos(options: SearchReposParamType): Promise<ApiResponseType<SearchReposResponseType>>;
|
3419
|
-
}
|
3420
|
-
|
3421
|
-
/**
|
3422
|
-
* Base 用户操作类
|
3423
|
-
*
|
3424
|
-
* 提供对GitHub用户的CRUD操作,包括:
|
3425
|
-
* - 获取用户信息
|
3426
|
-
* - 关注指定用户
|
3427
|
-
*/
|
3428
|
-
declare class User extends GitHubClient {
|
3429
|
-
constructor(base: GitHubClient);
|
3430
|
-
/**
|
3431
|
-
* 获取指定的用户信息
|
3432
|
-
* 不止可以获取用户信息还可以获取组织信息
|
3433
|
-
* 权限:无需任何权限
|
3434
|
-
* @param options - 用户参数
|
3435
|
-
* - username - 用户名或组织名
|
3436
|
-
* @example
|
3437
|
-
* ```ts
|
3438
|
-
* const userInfo = await user.get_user_info({ username: 'username' })
|
3439
|
-
* -> 用户信息对象
|
3440
|
-
* ```
|
3441
|
-
*/
|
3442
|
-
get_user_info(options: UserInfoParamType): Promise<ApiResponseType<UserInfoResponseType>>;
|
3443
|
-
/**
|
3444
|
-
* 通过用户id获取用户信息
|
3445
|
-
* user_id 不是用户名, 而是github平台上用户的唯一标识符
|
3446
|
-
* 权限:无需任何权限
|
3447
|
-
* @param options - 用户参数
|
3448
|
-
* - user_id: 用户id
|
3449
|
-
* @returns 用户信息
|
3450
|
-
* @example
|
3451
|
-
* ```ts
|
3452
|
-
* const userInfo = await user.get_user_info_by_user_id({ user_id: 123456789 })
|
3453
|
-
* -> 用户信息对象
|
3454
|
-
* ```
|
3455
|
-
*/
|
3456
|
-
get_user_info_by_user_id(options: UserInfoByIdParamType): Promise<ApiResponseType<UserInfoResponseType>>;
|
3457
|
-
/**
|
3458
|
-
* 通过访问令牌获取用户信息
|
3459
|
-
* 权限:无需任何权限
|
3460
|
-
* @example
|
3461
|
-
* ```ts
|
3462
|
-
* const userInfo = await user.get_user_info_by_token()
|
3463
|
-
* -> 用户信息对象
|
3464
|
-
* ```
|
3465
|
-
*/
|
3466
|
-
get_user_info_by_auth(): Promise<ApiResponseType<UserInfoResponseType>>;
|
3467
|
-
/**
|
3468
|
-
* 通过访问令牌获取用户信息
|
3469
|
-
* 权限:无需任何权限
|
3470
|
-
* @deprecated 该方法已过时,请使用get_user_info_by_auth方法牌
|
3471
|
-
* ```
|
3472
|
-
*/
|
3473
|
-
get_user_info_by_token(): Promise<ApiResponseType<UserInfoResponseType>>;
|
3474
|
-
/**
|
3475
|
-
* 获取用户贡献数据
|
3476
|
-
* 权限:无需任何权限
|
3477
|
-
* @param options - 用户参数
|
3478
|
-
* - username: 用户名
|
3479
|
-
* @returns 用户贡献数据
|
3480
|
-
* @example
|
3481
|
-
* ```ts
|
3482
|
-
* const contribution = await user.get_user_contribution({ username: 'username' })
|
3483
|
-
* ->
|
3484
|
-
* {
|
3485
|
-
* success: true,
|
3486
|
-
* status: 'ok',
|
3487
|
-
* statusCode: 200,
|
3488
|
-
* msg: '请求成功',
|
3489
|
-
* data: { total: 5, contributions: [[{ date: '2023-04-16', count: 5 }]] }
|
3490
|
-
* }
|
3491
|
-
* ```
|
3492
|
-
*/
|
3493
|
-
get_user_contribution(options: UserNameParamType): Promise<ApiResponseType<ContributionResult>>;
|
3494
|
-
/**
|
3495
|
-
* 快速获取获取用户id
|
3496
|
-
* 权限:无需任何权限
|
3497
|
-
* 该方法会自动获取当前用户的id,需要传入token
|
3498
|
-
* @returns 用户id
|
3499
|
-
* @example
|
3500
|
-
* ```ts
|
3501
|
-
* const userId = await user.get_user_id()
|
3502
|
-
* -> 114514
|
3503
|
-
*/
|
3504
|
-
get_user_id(): Promise<number>;
|
3505
|
-
/**
|
3506
|
-
* 快速获取获取用户名
|
3507
|
-
* 权限:无需任何权限
|
3508
|
-
* 该方法会自动获取当前用户的用户名,需要传入token
|
3509
|
-
* @returns 用户名
|
3510
|
-
* @example
|
3511
|
-
* ```ts
|
3512
|
-
* const username = await user.get_username()
|
3513
|
-
* -> 'loli'
|
3514
|
-
* ```
|
3515
|
-
*/
|
3516
|
-
get_username(): Promise<string>;
|
3517
|
-
/**
|
3518
|
-
* 快速获取获取用户昵称
|
3519
|
-
* 该方法会自动获取当前用户的昵称,需要传入token
|
3520
|
-
* 权限:无需任何权限
|
3521
|
-
* @returns 昵称
|
3522
|
-
* @example
|
3523
|
-
* ```ts
|
3524
|
-
* const nickname = await user.get_nickname()
|
3525
|
-
* -> 'loli'
|
3526
|
-
* ```
|
3527
|
-
*/
|
3528
|
-
get_nickname(): Promise<string | null>;
|
3529
|
-
/**
|
3530
|
-
* 快速获取获取用户邮箱
|
3531
|
-
* 该方法会自动获取当前用户的邮箱,需要传入token
|
3532
|
-
* 权限:无需任何权限
|
3533
|
-
* @returns 邮箱
|
3534
|
-
* @example
|
3535
|
-
* ```ts
|
3536
|
-
* const email = await user.get_email()
|
3537
|
-
* -> '114514@gmail.com'
|
3538
|
-
* ```
|
3539
|
-
*/
|
3540
|
-
get_user_email(): Promise<string | null>;
|
3541
|
-
/**
|
3542
|
-
* 快速获取获取用户头像地址
|
3543
|
-
* 该方法会自动获取当前用户的头像地址,需要传入token
|
3544
|
-
* 权限:无需任何权限
|
3545
|
-
* @returns 头像地址
|
3546
|
-
* @example
|
3547
|
-
* ```ts
|
3548
|
-
* const avatarUrl = await user.get_avatar_url()
|
3549
|
-
* -> 'https://avatars.githubusercontent.com/u/12345678?v=4'
|
3550
|
-
* ```
|
3551
|
-
*/
|
3552
|
-
get_avatar_url(): Promise<string>;
|
3553
|
-
}
|
3554
|
-
|
3555
|
-
/**
|
3556
|
-
* GitHUb WebHook操作类
|
3557
|
-
*
|
3558
|
-
* 提供对GitHub WebHook的CRUD操作,包括:
|
3559
|
-
* - 检查webhook签名是否正确
|
3560
|
-
*/
|
3561
|
-
declare class WebHook extends GitHubClient {
|
3562
|
-
/**
|
3563
|
-
* 检查WebHook签名是否正确
|
3564
|
-
* 权限:无需任何权限
|
3565
|
-
* @param options - WebHook参数对象,必须包含以下参数:
|
3566
|
-
* - payload: 要验证的签名主体
|
3567
|
-
* - signature: 要验证的签名
|
3568
|
-
* @returns 验证结果
|
3569
|
-
* @example
|
3570
|
-
* ```ts
|
3571
|
-
* const res = await check_webhook_signature({
|
3572
|
-
* payload: 'your_payload',
|
3573
|
-
* signature: 'your_signature'
|
3574
|
-
* })
|
3575
|
-
* ->
|
3576
|
-
* {
|
3577
|
-
* success: true,
|
3578
|
-
* status: 'ok',
|
3579
|
-
* msg: '请求成功'
|
3580
|
-
* data: {
|
3581
|
-
* success: true,
|
3582
|
-
* message: '验证成功'
|
3583
|
-
* }
|
3584
|
-
* }
|
3585
|
-
* ```
|
3586
|
-
*/
|
3587
|
-
check_webhook_signature(options: WebHookSignatureParamType): Promise<ApiResponseType<WebHookSignatureResponseType>>;
|
3588
|
-
}
|
3589
|
-
|
3590
|
-
/**
|
3591
|
-
* GitHub 工作流管理类
|
3592
|
-
*
|
3593
|
-
* 提供对GitHub Workflow的完整管理功能,包括:
|
3594
|
-
* - 仓库工作流信息
|
3595
|
-
*
|
3596
|
-
*/
|
3597
|
-
declare class Workflow extends GitHubClient {
|
3598
|
-
constructor(base: GitHubClient);
|
3599
|
-
/**
|
3600
|
-
* 获取仓库工作流信息
|
3601
|
-
* 权限:
|
3602
|
-
* - 'actions': 'read-only'
|
3603
|
-
* @param options 获取工作流信息参数
|
3604
|
-
* - owner 仓库拥有者
|
3605
|
-
* - repo 仓库名称
|
3606
|
-
* - workflow_id 工作流id
|
3607
|
-
* @returns 包含工作流信息的响应对象
|
3608
|
-
* @example
|
3609
|
-
* ```ts
|
3610
|
-
* const res = await workflow.get_workflow_info()
|
3611
|
-
* -> 工作流信息对象
|
3612
|
-
* ```
|
3613
|
-
*/
|
3614
|
-
get_workflow_info(options: WorkflowInfoParamType): Promise<ApiResponseType<WorkflowInfoResponseType>>;
|
3615
|
-
/**
|
3616
|
-
* 获取仓库工作流列表
|
3617
|
-
* 权限:
|
3618
|
-
* - 'actions': 'read-only'
|
3619
|
-
* @param options 获取工作流列表参数
|
3620
|
-
* - owner 仓库拥有者
|
3621
|
-
* - repo 仓库名称
|
3622
|
-
* - per_page 每页数量
|
3623
|
-
* - page 页码
|
3624
|
-
* @returns 包含工作流列表的响应对象
|
3625
|
-
* @example
|
3626
|
-
* ```ts
|
3627
|
-
* const res = await workflow.get_repo_workflows_list()
|
3628
|
-
* -> 工作流列表对象
|
3629
|
-
* ```
|
3630
|
-
*/
|
3631
|
-
get_repo_workflows_list(options: GetRepoWorkflowsList): Promise<ApiResponseType<GetRepoWorkflowsListResponseType>>;
|
3632
|
-
/**
|
3633
|
-
* 运行仓库工作流
|
3634
|
-
* 权限:
|
3635
|
-
* - 'actions': 'read-and-write'
|
3636
|
-
* @param options 运行工作流参数
|
3637
|
-
* - owner 仓库拥有者
|
3638
|
-
* - repo 仓库名称
|
3639
|
-
* - workflow_id 工作流id
|
3640
|
-
* - ref 分支或者标签名称
|
3641
|
-
* - inputs 工作流输入参数
|
3642
|
-
* @returns 运行工作流结果对象
|
3643
|
-
* @example
|
3644
|
-
* ```ts
|
3645
|
-
* const res = await workflow.run_repo_workflow()
|
3646
|
-
* -> 运行工作流结果对象
|
3647
|
-
* ```
|
3648
|
-
*/
|
3649
|
-
run_repo_workflow(options: RunRepoWorkflow): Promise<ApiResponseType<RunRepoWorkflowResponseType>>;
|
3650
|
-
/**
|
3651
|
-
* 启用仓库工作流
|
3652
|
-
* 权限:
|
3653
|
-
* - 'actions': 'read-and-write'
|
3654
|
-
* @param options 启用工作流参数
|
3655
|
-
* - owner 仓库拥有者
|
3656
|
-
* - repo 仓库名称
|
3657
|
-
* - workflow_id 工作流id
|
3658
|
-
* @returns 启用工作流结果对象
|
3659
|
-
* @example
|
3660
|
-
* ```ts
|
3661
|
-
* const res = await workflow.enable_repo_workflow()
|
3662
|
-
* -> 启用工作流结果对象
|
3663
|
-
* ```
|
3664
|
-
*/
|
3665
|
-
enable_repo_workflow(options: EnableRepoWorkflowParamType): Promise<ApiResponseType<EnableRepoWorkflowResponseType>>;
|
3666
|
-
/**
|
3667
|
-
* 禁用仓库工作流
|
3668
|
-
* 权限:
|
3669
|
-
* - 'actions': 'read-and-write'
|
3670
|
-
* @param options 禁用工作流参数
|
3671
|
-
* - owner 仓库拥有者
|
3672
|
-
* - repo 仓库名称
|
3673
|
-
* - workflow_id 工作流id
|
3674
|
-
* @returns 禁用工作流结果对象
|
3675
|
-
* @example
|
3676
|
-
* ```ts
|
3677
|
-
* const res = await workflow.disable_repo_workflow()
|
3678
|
-
* -> 禁用工作流结果对象
|
3679
|
-
* ```
|
3680
|
-
*/
|
3681
|
-
disable_repo_workflow(options: DisEnableRepoWorkflowParamType): Promise<ApiResponseType<DisEnableRepoWorkflowResponseType>>;
|
3682
|
-
/**
|
3683
|
-
* 重新运行仓库工作流
|
3684
|
-
* 权限:
|
3685
|
-
* - 'actions': 'read-and-write'
|
3686
|
-
* @param options 重新运行工作流参数
|
3687
|
-
* - owner 仓库拥有者
|
3688
|
-
* - repo 仓库名称
|
3689
|
-
* - job_id 工作流作业id
|
3690
|
-
* @returns 重新运行工作流结果对象
|
3691
|
-
* @example
|
3692
|
-
* ```ts
|
3693
|
-
* const res = await workflow.rerun_repo_workflow()
|
3694
|
-
* -> 重新运行工作流结果对象
|
3695
|
-
* ```
|
3696
|
-
*/
|
3697
|
-
rerun_repo_workflow(options: ReRunRepoWorkflowParamType): Promise<ApiResponseType<ReRunRepoWorkflowResponseType>>;
|
3698
|
-
}
|
3699
|
-
|
3700
|
-
/**
|
3701
|
-
* GitHub API 基础服务类,提供与GitHub API交互的核心功能
|
3702
|
-
*
|
3703
|
-
* 此类作为GitHub API功能的入口点,封装了以下核心能力:
|
3704
|
-
* - JWT令牌生成与管理
|
3705
|
-
* - 请求代理配置
|
3706
|
-
* - 基础HTTP请求方法(GET/POST/PATCH/DELETE/PUT)
|
3707
|
-
* - 应用认证管理
|
3708
|
-
* - 模块化服务(App/Auth/Commit/Repo/User/WebHook)
|
3709
|
-
*
|
3710
|
-
* @example
|
3711
|
-
* ```ts
|
3712
|
-
* const base = new GitHubClient({
|
3713
|
-
* APP_ID: 12345,
|
3714
|
-
* Private_Key: '-----BEGIN PRIVATE KEY-----...',
|
3715
|
-
* Client_ID: 'Iv1.1234567890abcdef',
|
3716
|
-
* Client_Secret: 'abcdef1234567890abcdef1234567890abcdef12',
|
3717
|
-
* WebHook_Secret: 'webhook_secret'
|
3718
|
-
* });
|
3719
|
-
* ```
|
3720
|
-
*/
|
3721
|
-
declare class GitHubClient {
|
3722
|
-
app: App;
|
3723
|
-
auth: Auth;
|
3724
|
-
commit: Commit;
|
3725
|
-
repo: Repo;
|
3726
|
-
user: User;
|
3727
|
-
webhook: WebHook;
|
3728
|
-
issue: Issue;
|
3729
|
-
org: Org;
|
3730
|
-
pull_request: Pull_Request;
|
3731
|
-
workflow: Workflow;
|
3732
|
-
search: Search;
|
3733
|
-
base_url: string;
|
3734
|
-
api_url: string;
|
3735
|
-
jwtToken: string;
|
3736
|
-
userToken?: string | null;
|
3737
|
-
readonly Private_Key?: string | null;
|
3738
|
-
readonly Client_ID?: string | null;
|
3739
|
-
readonly Client_Secret?: string | null;
|
3740
|
-
readonly WebHook_Secret?: string | null;
|
3741
|
-
readonly format: boolean;
|
3742
|
-
private currentRequestConfig;
|
3743
|
-
private proxy?;
|
3744
|
-
constructor(options: GitHubClientType);
|
3745
|
-
/**
|
3746
|
-
* 获取Git平台类型
|
3747
|
-
* @returns Git平台类型,如: github,gitee
|
3748
|
-
* @example
|
3749
|
-
* ```ts
|
3750
|
-
* const type = await client.type
|
3751
|
-
* -> 'github'
|
3752
|
-
* ```
|
3753
|
-
*/
|
3754
|
-
get type(): GitType;
|
3755
|
-
/**
|
3756
|
-
* 是否是App客户端
|
3757
|
-
* @returns 是否是App客户端
|
3758
|
-
* @example
|
3759
|
-
* ```ts
|
3760
|
-
* const isAppClient = await client.is_app_client
|
3761
|
-
* -> true
|
3762
|
-
* ```
|
3763
|
-
*/
|
3764
|
-
get is_app_client(): boolean;
|
3765
|
-
/**
|
3766
|
-
* 检查App客户端参数是否完整
|
3767
|
-
* @returns
|
3768
|
-
*/
|
3769
|
-
private validateAppClient;
|
3770
|
-
/**
|
3771
|
-
* 获取App实例
|
3772
|
-
* @returns App实例
|
3773
|
-
* @example
|
3774
|
-
* ```ts
|
3775
|
-
* const app = await GitHubClient.get_app()
|
3776
|
-
* ```
|
3777
|
-
*/
|
3778
|
-
get_app(): Promise<App>;
|
3779
|
-
/**
|
3780
|
-
* 获取Auth实例
|
3781
|
-
* @returns Auth实例
|
3782
|
-
* @example
|
3783
|
-
* ```ts
|
3784
|
-
* const auth = await GitHubClient.get_auth()
|
3785
|
-
* ```
|
3786
|
-
*/
|
3787
|
-
get_auth(): Promise<Auth>;
|
3788
|
-
/**
|
3789
|
-
* 获取Commit实例
|
3790
|
-
* @returns Commit实例
|
3791
|
-
* @example
|
3792
|
-
* ```ts
|
3793
|
-
* const commit = await GitHubClient.get_commit()
|
3794
|
-
* ```
|
3795
|
-
*/
|
3796
|
-
get_commit(): Promise<Commit>;
|
3797
|
-
/**
|
3798
|
-
* 获取Issue实例
|
3799
|
-
* @returns Issue实例
|
3800
|
-
* @example
|
3801
|
-
* ```ts
|
3802
|
-
* const issue = await GitHubClient.get_issue()
|
3803
|
-
* ```
|
3804
|
-
*/
|
3805
|
-
get_issue(): Promise<Issue>;
|
3806
|
-
/**
|
3807
|
-
* 获取Repo实例
|
3808
|
-
* @returns Repo实例
|
3809
|
-
* @example
|
3810
|
-
* ```ts
|
3811
|
-
* const repo = await GitHubClient.get_repo()
|
3812
|
-
* ```
|
3813
|
-
*/
|
3814
|
-
get_repo(): Promise<Repo>;
|
3815
|
-
/**
|
3816
|
-
* 获取User实例
|
3817
|
-
* @returns User实例
|
3818
|
-
* @example
|
3819
|
-
* ```ts
|
3820
|
-
* const user = await GitHubClient.get_user()
|
3821
|
-
* ```
|
3822
|
-
*/
|
3823
|
-
get_user(): Promise<User>;
|
3824
|
-
/**
|
3825
|
-
* 获取Org实例
|
3826
|
-
* @returns Org实例
|
3827
|
-
* @example
|
3828
|
-
* ```ts
|
3829
|
-
* const org = await GitHubClient.get_org()
|
3830
|
-
* ```
|
3831
|
-
*/
|
3832
|
-
get_org(): Promise<Org>;
|
3833
|
-
/**
|
3834
|
-
* 获取WebHook实例
|
3835
|
-
* @returns WebHook实例
|
3836
|
-
* @example
|
3837
|
-
* ```ts
|
3838
|
-
* const webhook = await GitHubClient.get_webhook()
|
3839
|
-
* ```
|
3840
|
-
*/
|
3841
|
-
get_webhook(): Promise<WebHook>;
|
3842
|
-
/**
|
3843
|
-
* 获取Pull_request实例
|
3844
|
-
* @returns Pull_request实例
|
3845
|
-
* @example
|
3846
|
-
* ```ts
|
3847
|
-
* const pull_request = await GitHubClient.get_pull_request()
|
3848
|
-
* ```
|
3849
|
-
*/
|
3850
|
-
get_pull_request(): Promise<Pull_Request>;
|
3851
|
-
/**
|
3852
|
-
* 获取Workflow实例
|
3853
|
-
* @returns Workflow实例
|
3854
|
-
* @example
|
3855
|
-
* ```ts
|
3856
|
-
* const workflow = await GitHubClient.get_workflow()
|
3857
|
-
* ```
|
3858
|
-
*/
|
3859
|
-
get_workflow(): Promise<Workflow>;
|
3860
|
-
/**
|
3861
|
-
* 获取Search实例
|
3862
|
-
* @returns Search实例
|
3863
|
-
* @example
|
3864
|
-
* ```ts
|
3865
|
-
* const search = await GitHubClient.get_search()
|
3866
|
-
* ```
|
3867
|
-
*/
|
3868
|
-
get_search(): Promise<Search>;
|
3869
|
-
/**
|
3870
|
-
* 设置请求代理
|
3871
|
-
* @param proxy 代理参数
|
3872
|
-
* @example
|
3873
|
-
* ```ts
|
3874
|
-
* setProxy({
|
3875
|
-
* type: 'http',
|
3876
|
-
* address: 'http://127.0.0.1:7890'
|
3877
|
-
* })
|
3878
|
-
* ```
|
3879
|
-
*/
|
3880
|
-
/**
|
3881
|
-
* 设置请求代理
|
3882
|
-
* @param proxy 代理参数
|
3883
|
-
* @example
|
3884
|
-
* setProxy({
|
3885
|
-
* type: 'http',
|
3886
|
-
* address: 'http://127.0.0.1:7890'
|
3887
|
-
* })
|
3888
|
-
*/
|
3889
|
-
setProxy(proxy: ProxyParamsType): void;
|
3890
|
-
/**
|
3891
|
-
* 设置 token
|
3892
|
-
* 传入的 token 必须以 ghu_ 或 ghp_ 或 ghs_ 开头,否则会抛出错误
|
3893
|
-
* @param token 传入的 token
|
3894
|
-
* @example
|
3895
|
-
* ```ts
|
3896
|
-
* setToken('ghu_xxxx')
|
3897
|
-
* ```
|
3898
|
-
*/
|
3899
|
-
setToken(token: string): void;
|
3900
|
-
/**
|
3901
|
-
* 生成 JWT Token
|
3902
|
-
* @param options 生成 JWT 所需的参数
|
3903
|
-
* @param options.APP_ID GitHub App ID
|
3904
|
-
* @param options.Private_Key 私钥内容
|
3905
|
-
* @returns 返回生成的 JWT
|
3906
|
-
* @example
|
3907
|
-
* ```ts
|
3908
|
-
* const jwt = await client.generate_jwt()
|
3909
|
-
* -> 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MjYxNjEyMjAsImlhdCI6MTYyNjE2MTIyMCwiaXNzIjoiMTIzNDU2Nzg5In0.XxXxXxXxXx
|
3910
|
-
* ```
|
3911
|
-
*/
|
3912
|
-
private generate_jwt;
|
3913
|
-
/**
|
3914
|
-
* 获取当前请求的配置
|
3915
|
-
* @returns 当前请求的配置对象
|
3916
|
-
*/
|
3917
|
-
private getCurrentRequestConfig;
|
3918
|
-
/**
|
3919
|
-
* 设置当前请求的配置
|
3920
|
-
* @protected - 仅在父类与子类中方法中可访问
|
3921
|
-
* @param config - 配置对象,包含以下属性:
|
3922
|
-
* - url: 请求的URL
|
3923
|
-
* - token: 认证令牌
|
3924
|
-
* - tokenType: 认证令牌类型,默认为 'Bearer'
|
3925
|
-
*/
|
3926
|
-
protected setRequestConfig(config: RequestConfigType): void;
|
3927
|
-
/**
|
3928
|
-
* 创建一个新的请求实例
|
3929
|
-
* @returns 返回一个新的 Request 实例
|
3930
|
-
*/
|
3931
|
-
private createRequest;
|
3932
|
-
/**
|
3933
|
-
* Github GET 请求方法
|
3934
|
-
* @param path - 请求路径
|
3935
|
-
* @param parms - 请求参数
|
3936
|
-
* @param customHeaders - 请求头,选项
|
3937
|
-
* @returns 请求结果
|
3938
|
-
*/
|
3939
|
-
get(path: string, parms?: any, customHeaders?: Record<string, string>): Promise<ApiResponseType>;
|
3940
|
-
/**
|
3941
|
-
* Github POST 请求方法
|
3942
|
-
* @param path - 请求路径
|
3943
|
-
* @param data - 请求数据
|
3944
|
-
* @param customHeaders - 请求头,选项
|
3945
|
-
* @returns 请求结果
|
3946
|
-
*/
|
3947
|
-
post(path: string, data: any, customHeaders?: Record<string, string>): Promise<ApiResponseType>;
|
3948
|
-
/**
|
3949
|
-
* Github PATCH 请求方法
|
3950
|
-
* @param path - 请求路径
|
3951
|
-
* @param data - 请求数据
|
3952
|
-
* @param params - URL查询参数
|
3953
|
-
* @param customHeaders - 请求头,选项
|
3954
|
-
* @returns 请求结果
|
3955
|
-
*/
|
3956
|
-
patch(path: string, params: (Record<string, string> | null) | undefined, data: any, customHeaders?: Record<string, string>): Promise<ApiResponseType>;
|
3957
|
-
/**
|
3958
|
-
* Github PUT 请求方法
|
3959
|
-
* @param path - 请求路径
|
3960
|
-
* @param data - 请求数据
|
3961
|
-
* @param customHeaders - 请求头,选项
|
3962
|
-
* @returns 请求结果
|
3963
|
-
*/
|
3964
|
-
put(path: string, data: any, customHeaders?: Record<string, string>): Promise<ApiResponseType>;
|
3965
|
-
/**
|
3966
|
-
* Github DELETE 请求方法
|
3967
|
-
* @param path - 请求路径
|
3968
|
-
* @param params - URL查询参数
|
3969
|
-
* @param data - 请求体数据
|
3970
|
-
* @param customHeaders - 请求头,选项
|
3971
|
-
* @returns 请求结果
|
3972
|
-
*/
|
3973
|
-
delete(path: string, params?: Record<string, string> | null, data?: any, customHeaders?: Record<string, string>): Promise<ApiResponseType>;
|
3974
|
-
}
|
3975
|
-
|
3976
|
-
/**
|
3977
|
-
* GitHub 应用管理类
|
3978
|
-
*
|
3979
|
-
* 提供对GitHub App的完整管理功能,包括:
|
3980
|
-
* - 获取应用基本信息
|
3981
|
-
* - 生成应用安装链接
|
3982
|
-
* - 生成应用配置链接
|
3983
|
-
*
|
3984
|
-
*/
|
3985
|
-
declare class App extends GitHubClient {
|
3986
|
-
constructor(base: GitHubClient);
|
3987
|
-
/**
|
3988
|
-
* 获取应用基本信息
|
3989
|
-
* 权限:
|
3990
|
-
* - `none` 无
|
3991
|
-
* @param options - 应用标识符
|
3992
|
-
* @returns 应用基本信息
|
3993
|
-
* @example
|
3994
|
-
* ```ts
|
3995
|
-
* const app = base.get_app()
|
3996
|
-
* console.log(app.get_app_info({ app_slug: 'loli' }))
|
3997
|
-
* -> app的信息
|
3998
|
-
* ```
|
3999
|
-
*/
|
4000
|
-
get_app_info(options: AppInfoParamType): Promise<ApiResponseType<AppInfoResponseType>>;
|
4001
|
-
/**
|
4002
|
-
* 获取当前 Github App 信息
|
4003
|
-
* 权限:
|
4004
|
-
* - `none` 此节点仅App Client可用
|
4005
|
-
* @returns 返回 Github App 信息
|
4006
|
-
* @example
|
4007
|
-
* ```ts
|
4008
|
-
* const app = base.get_app()
|
4009
|
-
* console.log(app.get_app_info_by_auth())
|
4010
|
-
* -> app的信息
|
4011
|
-
* ```
|
4012
|
-
*/
|
4013
|
-
get_app_info_by_auth(): Promise<ApiResponseType<AppInfoResponseType>>;
|
4014
|
-
/**
|
4015
|
-
* 获取仓库的应用安装信息
|
4016
|
-
* 权限:
|
4017
|
-
* - `none` 此节点仅App Client可用
|
4018
|
-
* @param options - 仓库安装应用参数对象
|
4019
|
-
* - owner 拥有者
|
4020
|
-
* - repo 仓库名
|
4021
|
-
* @returns 返回应用安装信息
|
4022
|
-
* @example
|
4023
|
-
* ```ts
|
4024
|
-
* console.log(app.get_app_installation_by_repo({owner: 'owner', repo: 'repo'}))
|
4025
|
-
* -> 仓库安装应用信息
|
4026
|
-
* ```
|
4027
|
-
*/
|
4028
|
-
get_app_installation_by_repo(options: GetAppInfoByRepoParamType): Promise<ApiResponseType<GetAppInfoByRepoResponseType>>;
|
4029
|
-
/**
|
4030
|
-
* 获取用户的应用安装信息
|
4031
|
-
* 权限:
|
4032
|
-
* - `none` 此节点仅App Client可用
|
4033
|
-
* @param options - 仓库安装应用参数对象
|
4034
|
-
* - owner 拥有者
|
4035
|
-
* - repo 仓库名
|
4036
|
-
* @returns 返回应用安装信息
|
4037
|
-
* @example
|
4038
|
-
* ```ts
|
4039
|
-
* console.log(app.get_app_installation_by_repo({owner: 'owner', repo: 'repo'}))
|
4040
|
-
* -> 用户安装应用信息
|
4041
|
-
* ```
|
4042
|
-
*/
|
4043
|
-
get_app_installation_by_user(options: GetAppInfoByUserParamType): Promise<ApiResponseType<GetAppInfoByUserResponseType>>;
|
4044
|
-
/**
|
4045
|
-
* 获取组织的应用安装信息
|
4046
|
-
* 权限:
|
4047
|
-
* - `none` 此节点仅App Client可用
|
4048
|
-
* @param options - 仓库安装应用参数对象
|
4049
|
-
* - owner 拥有者
|
4050
|
-
* - repo 仓库名
|
4051
|
-
* @returns 返回应用安装信息
|
4052
|
-
* @example
|
4053
|
-
* ```ts
|
4054
|
-
* console.log(app.get_app_installation_by_repo({owner: 'owner', repo: 'repo'}))
|
4055
|
-
* -> 组织安装应用信息
|
4056
|
-
* ```
|
4057
|
-
*/
|
4058
|
-
get_app_installation_by_org(options: GetAppInfoByOrgParamType): Promise<ApiResponseType<GetAppInfoByOrgResponseType>>;
|
4059
|
-
/**
|
4060
|
-
* 为应用程序创建访问令牌
|
4061
|
-
* @param options
|
4062
|
-
* - installation_id - 安装 ID
|
4063
|
-
* @returns 创建访问令牌对象
|
4064
|
-
* @example
|
4065
|
-
* ```ts
|
4066
|
-
* const accessToken = await app.create_access_token_for_app({ installation_id: 123456 })
|
4067
|
-
* -> 创建访问令牌对象
|
4068
|
-
* ```
|
4069
|
-
*/
|
4070
|
-
create_access_token_for_app(options: CreateAccessTokenForAppParamType): Promise<ApiResponseType<CreateAccessTokenForAppResponseType>>;
|
4071
|
-
/**
|
4072
|
-
* 撤销应用程序访问令牌
|
4073
|
-
* @returns 撤销应用程序访问令牌
|
4074
|
-
* @example
|
4075
|
-
* ```ts
|
4076
|
-
* const res = await auth.revoke_access_token_for_app()
|
4077
|
-
* -> data: { 'success': true, 'message': '喵呜~ 访问令牌撤销成功' }
|
4078
|
-
*/
|
4079
|
-
revoke_access_token_for_app(): Promise<ApiResponseType<RevokeAccessTokenResponseType>>;
|
4080
|
-
/**
|
4081
|
-
* 生成Github App 安装链接
|
4082
|
-
* @param state_id - 随机生成的 state_id,用于验证授权请求的状态,可选,默认不使用
|
4083
|
-
* @returns install_link 安装链接,用于跳转 Github 安装页
|
4084
|
-
* @example
|
4085
|
-
* ```ts
|
4086
|
-
* const link = await app.create_install_link('state_id')
|
4087
|
-
* -> https://github.com/apps/<app_name>/installations/new?state=<state_id>
|
4088
|
-
* ```
|
4089
|
-
*/
|
4090
|
-
create_install_link(state_id?: string): Promise<string>;
|
4091
|
-
/**
|
4092
|
-
* 生成Github Apps 配置链接
|
4093
|
-
* @param state_id - 传入的 state_id, 随机字符串
|
4094
|
-
* @returns 返回配置链接对象
|
4095
|
-
* @returns config_install_link 配置链接
|
4096
|
-
* @example
|
4097
|
-
* ```ts
|
4098
|
-
* const link = await app.create_config_install_link('state_id')
|
4099
|
-
* -> // https://github.com/apps/<app_name>/installations/new?state=<state_id></state_id>
|
4100
|
-
* ```
|
4101
|
-
*/
|
4102
|
-
create_config_install_link(state_id?: string): Promise<string>;
|
4103
|
-
/**
|
4104
|
-
* 快速获取当前 Github App 名称
|
4105
|
-
* @returns 返回 Github App 名称
|
4106
|
-
* @example
|
4107
|
-
* ```ts
|
4108
|
-
* console.log(app.get_app_name())
|
4109
|
-
* -> 输出AppName
|
4110
|
-
* ```
|
4111
|
-
*/
|
4112
|
-
get_app_name(): Promise<string>;
|
4113
|
-
/**
|
4114
|
-
* 快速判断指定仓库是否安装了当前App 应用
|
4115
|
-
* @param options - 仓库安装应用参数对象
|
4116
|
-
* - owner 拥有者
|
4117
|
-
* - repo 仓库名
|
4118
|
-
* @returns 是否安装
|
4119
|
-
* @example
|
4120
|
-
* ```ts
|
4121
|
-
* // 当前App已安装在此仓库
|
4122
|
-
* const isInstalled = await app.is_app_inttalled_in_repo({ owner: 'owner', repo: 'repo' })
|
4123
|
-
* -> true
|
4124
|
-
* // 当前App未安装此仓库
|
4125
|
-
* const isInstalled = await app.is_app_inttalled_in_repo({ owner: 'owner', repo: 'repo' })
|
4126
|
-
* -> false
|
4127
|
-
*/
|
4128
|
-
is_app_installed_in_repo(options: isAppInstalledInRepo): Promise<boolean>;
|
4129
|
-
}
|
4130
|
-
|
4131
|
-
type index_App = App;
|
4132
|
-
declare const index_App: typeof App;
|
4133
|
-
type index_Auth = Auth;
|
4134
|
-
declare const index_Auth: typeof Auth;
|
4135
|
-
type index_Commit = Commit;
|
4136
|
-
declare const index_Commit: typeof Commit;
|
4137
|
-
type index_GitHubClient = GitHubClient;
|
4138
|
-
declare const index_GitHubClient: typeof GitHubClient;
|
4139
|
-
type index_Issue = Issue;
|
4140
|
-
declare const index_Issue: typeof Issue;
|
4141
|
-
type index_Org = Org;
|
4142
|
-
declare const index_Org: typeof Org;
|
4143
|
-
type index_Pull_Request = Pull_Request;
|
4144
|
-
declare const index_Pull_Request: typeof Pull_Request;
|
4145
|
-
type index_Repo = Repo;
|
4146
|
-
declare const index_Repo: typeof Repo;
|
4147
|
-
type index_Search = Search;
|
4148
|
-
declare const index_Search: typeof Search;
|
4149
|
-
type index_User = User;
|
4150
|
-
declare const index_User: typeof User;
|
4151
|
-
type index_WebHook = WebHook;
|
4152
|
-
declare const index_WebHook: typeof WebHook;
|
4153
|
-
type index_Workflow = Workflow;
|
4154
|
-
declare const index_Workflow: typeof Workflow;
|
4155
|
-
declare namespace index {
|
4156
|
-
export { index_App as App, index_Auth as Auth, index_Commit as Commit, index_GitHubClient as GitHubClient, index_Issue as Issue, index_Org as Org, index_Pull_Request as Pull_Request, index_Repo as Repo, index_Search as Search, index_User as User, index_WebHook as WebHook, index_Workflow as Workflow };
|
4157
|
-
}
|
4158
|
-
|
4159
|
-
/** 基本客户端 */
|
4160
|
-
declare class Client {
|
4161
|
-
github: GitHubClient;
|
4162
|
-
constructor(options: ClientType);
|
4163
|
-
}
|
4164
|
-
|
4165
|
-
export { type AccessCodeType, type AccessTokenClentTYpe, type AccessTokenPermissionsType, type AccessTokenType, type AddCollaboratorResponseType, type AddMemberParamType, type AddMemberResponseType, type ApiResponseType, type AppClientType, type AppInfoParamType, type AppInfoResponseType, type AppPermissions, type AppRepoInfoResponseType, type AppUser, type BaseProxyType, type CheckTokenResponseType, Client, type ClientType, type CloseIssueParamType, type CloseIssueResponseType, type CollaboratorInfoResponseType, type CollaboratorParamType, type CollaboratorPermissionType, type CommentIdParamType, type Commit$1 as Commit, type CommitInfoCommonParamType, type CommitInfoParamType, type CommitInfoResponseType, type CommitListParamType, type CommitListResponseType, type CommitStats, type ContributionData, type ContributionResult, type CreateAccessTokenForAppParamType, type CreateAccessTokenForAppResponseType, type CreateIssueResponseType, type CreatePullRequestCommentParamType, type CreatePullRequestCommentResponseType, type CreatePullRequestParamType, type CreatePullRequestResponseType, type CreateReleaseParamType, type CreateReleaseResponseType, type CreateSubIssueParamType, type CreateSubIssueResponseType, type CreteIssueCommentParamType, type CreteIssueCommentResponseType, type CreteIssueParamType, type DeletePullRequestCommentParamType, type DeletePullRequestCommentResponseType, type DeleteReleaseParamType, type DeleteReleaseResponseType, type DiffEntry, type DisEnableRepoWorkflowParamType, type DisEnableRepoWorkflowResponseType, type EnableRepoWorkflowParamType, type EnableRepoWorkflowResponseType, type GetAppInfoByOrgParamType, type GetAppInfoByOrgResponseType, type GetAppInfoByRepoParamType, type GetAppInfoByRepoResponseType, type GetAppInfoByUserParamType, type GetAppInfoByUserResponseType, type GetCollaboratorListParamType, type GetCollaboratorListResponseType, type GetOrgMemberInfoParamType, type GetOrgMemberInfoResponseType, type GetOrgMemberListParamType, type GetOrgMemberListResponseType, type GetOrgMemberListType, type GetPullRequestCommentInfoParamType, type GetPullRequestCommentInfoResponseType, type GetPullRequestCommentsListParamType, type GetPullRequestCommentsListResponseType, type GetPullRequestFilesListParamType, type GetPullRequestFilesListResponseType, type GetRepoDefaultBranchParamType, type GetRepoDefaultBranchResponseType, type GetRepoMainLanguageParamType, type GetRepoMainLanguageResponseType, type GetRepoVisibilityParamType, type GetRepoVisibilityResponseType, type GetRepoWorkflowsList, type GetRepoWorkflowsListResponseType, type GitHubBaseClient, GitHubClient, type GitHubClientType, type GitInfoListType, type GitRepoInfoListOptionsType, type GitRepoInfoType, type GitRepoType, type GitType, type GitUser, type IssueCommentInfoParamType, type IssueCommentInfoResponseType, type IssueCommentsListParamType, type IssueCommentsListResponseType, type IssueInfoParamType, type IssueInfoResponseType, type IssueLabelType, type IssueListResponseType, type IssueNumberParamType, type IssueUser, type LanguageInfo, type LockIssueParamType, type LockIssueResponseType, type MergeMethodType, type MergePullRequestParamType, type MergePullRequestResponseType, type MilestoneType, type NpmPackageInfoListOptionsType, type NpmPackageInfoListType, type NpmPackageInfoType, type OpenIssueParamType, type OpenIssueResponseType, type OrgInfoParamType, type OrgInfoResponseType, type OrgNameParamType, type OrgRepoCreateParamType, type OrgRepoCreateResponseType, type OrgRepoListParmType, type OrgRepoListResponseType, type OrgUser, type ParentCommit, type PkgInfoType, type PrRepo, type PrUser, type ProxyParamsType, ProxyProtocol, ProxyType, type ProxyUrlType, type PullRequestFilesListType, type PullRequestInfoParamType, type PullRequestInfoResponseType, type PullRequestListParamType, type PullRequestListResponseType, type PullRequestNumberParamType, type ReRunRepoWorkflowParamType, type ReRunRepoWorkflowResponseType, type ReactionInfoType, type RefreshTokenResponseType, type RefreshTokenType, type ReleaseAssetsType, type ReleaseInfoByTagParamType, type ReleaseInfoByTagResponseType, type ReleaseInfoParamType, type ReleaseInfoResponseType, type ReleaseLatestParamTypeType, type ReleaseLatestResponseType, type ReleaseListParamType, type ReleaseListResponseType, type ReleaseUser, type RemoveCollaboratorParamType, type RemoveCollaboratorResponseType, type RemoveIssueCommentParamType, type RemoveIssueCommentResponseType, type RemoveOrgMemberParamType, type RemoveOrgMemberResponseType, type RemoveSubIssueParamType, type RemoveSubIssueResponseType, type RepoBaseParamType, type RepoCommentsListParamType, type RepoCommentsListResponseType, type RepoInfoParamType, type RepoInfoResponseType, type RepoIssueListParamType, type RepoLanguagesListParamType, type RepoLanguagesListResponseType, type RepoListBaseParamType, type RepoNameParamType, type RepoOwnerParamType, type RepoParamType, type RepoUrlParamType, type RepoUser, type ReprioritizeSubIssueParamType, type ReprioritizeSubIssueResponseType, type RequestConfigType, type RequestTokenType, type ResponseHeadersType, type ResponseMsgType, type ResponseStatusCodeType, type ResponseSuccessType, type ResponseType, type RevokeAccessTokenResponseType, type RoleNameType, type RunRepoWorkflow, type RunRepoWorkflowResponseType, type SearchRepo, type SearchReposParamType, type SearchReposResponseType, type SearchUser, type SearchUsersParamType, type SearchUsersResponseType, type ShaParamType, type SubIssueListParamType, type SubIssueListResponseType, type TokenResponseType, type UnLockIssueParamType, type UnLockIssueResponseType, type UpdateIssueCommentParamType, type UpdateIssueCommentResponseType, type UpdateIssueParamType, type UpdateIssueResponseType, type UpdatePullRequestCommentParamType, type UpdatePullRequestCommentResponseType, type UpdatePullRequestParamType, type UpdatePullRequestResponseType, type UpdateReleaseParamType, type UpdateReleaseResponseType, type UserByTokenRepoListParamType, type UserIdParamType, type UserInfoByIdParamType, type UserInfoParamType, type UserInfoResponseType, type UserNameParamType, type UserRepoCreateParamType, type UserRepoCreateResponseType, type UserRepoListParamType, type UserRepoListType, type WebHookSignatureParamType, type WebHookSignatureResponseType, type WorkflowInfoParamType, type WorkflowInfoResponseType, WorkflowState, create_state_id, Client as default, type formatParamType, format_date, get_langage_color, get_local_git_repo_info, get_local_git_repos_list, get_local_npm_package_info, get_local_npm_packages_list, get_local_repo_default_branch, get_relative_time, get_remote_repo_default_branch, index as github, type isAppInstalledInRepo, render_markdown, type workflowIdParamType };
|