@142vip.changelog.类.GithubAPI - 142vip/core-x GitHub Wiki
API 参考 / @142vip/changelog / GithubAPI
定义于: changelog/src/core/apis/github.api.ts:288
GitHub REST 与 Release 相关 API
new GithubAPI():
GithubAPI
GithubAPI
buildGithubReleaseRequestBody: (
options) =>Record<string,unknown>
定义于: changelog/src/core/apis/github.api.ts:292
构建 GitHub Release API 请求体
- 非预发布时附带
make_latest: true
string
boolean
boolean
仅 POST 新建 Release 时可传 make_latest;PATCH 携带会触发 422
string
boolean
string
Record<string, unknown>
createGithubRelease: (
options) =>Promise<void>
定义于: changelog/src/core/apis/github.api.ts:297
创建或更新 GitHub Release
string
string
boolean
string
boolean
string
string
string
Promise<void>
fetchGitHubJson: <
T>(url,init) =>Promise<T>
定义于: changelog/src/core/apis/github.api.ts:293
GitHub REST 请求(Node 18+ 原生 fetch)
T
string
Record<string, unknown>
string
string
Promise<T>
generateReleaseUrl: (
markdown,config) =>string
定义于: changelog/src/core/apis/github.api.ts:291
生成 GitHub Web「新建 Release」链接(token 缺失时手动发布)
string
string
string
boolean
string
string
string
getAuthorInfo: (
options,info) =>Promise<GitAuthorInfo>
定义于: changelog/src/core/apis/github.api.ts:289
string
string
string
Promise<GitAuthorInfo>
getHeaders: (
token) =>object
定义于: changelog/src/core/apis/github.api.ts:295
string
object
accept:
string='application/vnd.github.v3+json'
authorization:
string
isExistTag: (
tag,options) =>Promise<boolean>
定义于: changelog/src/core/apis/github.api.ts:290
检查远程 tag 是否存在
string
string
string
string
Promise<boolean>
printReleaseUrl: (
webUrl,success) =>void
定义于: changelog/src/core/apis/github.api.ts:294
string
boolean = true
void
resolveAuthors: (
commits,options) =>Promise<GitAuthorInfo[]>
定义于: changelog/src/core/apis/github.api.ts:296
为 commit 列表解析 GitHub 贡献者 login
Commit[]
string
string
string
Promise<GitAuthorInfo[]>