Documentation
¶
Overview ¶
Package github 封装 release-note 流程使用的 GitHub REST 读写边界。
Index ¶
- func ValidRepository(repository string) bool
- type Client
- func (client Client) GetJSON(ctx context.Context, path string, destination any) error
- func (client Client) PullRequest(ctx context.Context, repository string, number int) (model.GitHubPullRequest, error)
- func (client Client) PullRequestsForCommit(ctx context.Context, repository, commit string) ([]model.GitHubPullRequest, error)
- func (client Client) RequestJSON(ctx context.Context, method, path string, input, destination any) error
- type HTTPError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidRepository ¶
ValidRepository 判断 owner/name 形式的 GitHub 仓库标识。
Types ¶
type Client ¶
Client 是 release-note 流程使用的 GitHub HTTP 客户端。 Token 只用于请求头,不会被错误信息或报告序列化。
func (Client) PullRequest ¶
func (client Client) PullRequest(ctx context.Context, repository string, number int) (model.GitHubPullRequest, error)
PullRequest 读取指定 PR 的完整信息。
func (Client) PullRequestsForCommit ¶
func (client Client) PullRequestsForCommit(ctx context.Context, repository, commit string) ([]model.GitHubPullRequest, error)
PullRequestsForCommit 查询一个 commit 关联的 PR。
Click to show internal directories.
Click to hide internal directories.