Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBreak = errors.New("break") ErrNotFound = errors.New("not found") )
Functions ¶
Types ¶
type Author ¶
type Author struct {
Login string `json:"login"` // github-actions[bot]
ID int `json:"id"` // 41898282
NodeID string `json:"node_id"` // MDM6Qm90NDE4OTgyODI=
AvatarURL string `json:"avatar_url"` // https://avatars.githubusercontent.com/in/15368?v=4
URL string `json:"url"` // https://api.github.com/users/github-actions%5Bbot%5D
HtmlURL string `json:"html_url"` // https://github.com/apps/github-actions
Type string `json:"type"` // Bot
SiteAdmin bool `json:"site_admin"` // false
}
Author represents a github user or bot.
type CommitAuthor ¶
type CommitAuthor struct {
Name string `json:"name"` // xushiwei
Email string `json:"email"` // x@goplus.org
Date string `json:"date"` // 2025-04-21T14:13:29Z
}
CommitAuthor represents the author of a GitHub commit.
type CommitDetail ¶
type CommitDetail struct {
NodeID string `json:"node_id"` // C_kwDOAtpGOtoAKDE2OGEwODlmOWY5ZTNhNDdhMTliMTRjZDczODQ4N2M2ZTJkMTMxYmE
Commit CommitSummary `json:"commit"`
Author Author `json:"author"`
}
CommitDetail represents the details of a GitHub commit.
func GetCommit ¶
func GetCommit(pkgPath, shaOrURL string) (ret *CommitDetail, err error)
GetCommit retrieves the details of a specific commit from a GitHub repository.
type CommitSummary ¶
type CommitSummary struct {
Author CommitAuthor `json:"author"`
Message string `json:"message"` // Merge pull request #2296 from goplus/main\n\nv1.4.0
}
CommitSummary represents the summary of a GitHub commit.
type Release ¶
type Release struct {
URL string `json:"url"` // https://api.github.com/repos/flintlib/flint/releases/209285187
ID int `json:"id"` // 209285187
NodeID string `json:"node_id"` // RE_kwDOAC8YHs4MeXBD
TagName string `json:"tag_name"` // v3.2.2
TargetCommitish string `json:"target_commitish"` // b8223680e38ad048355a421bf7f617bb6c5d5e12
Name string `json:"name"` // FLINT v3.2.2
PublishedAt string `json:"published_at"` // 2025-03-31T08:54:16Z
Body string `json:"body"` // Release Notes
TarballURL string `json:"tarball_url"` // https://api.github.com/repos/flintlib/flint/tarball/v3.2.2
ZipballURL string `json:"zipball_url"` // https://api.github.com/repos/flintlib/flint/zipball/v3.2.2
Author Author `json:"author"`
Assets []*ReleaseAsset `json:"assets"`
Prerelease bool `json:"prerelease"`
}
Release represents a GitHub release.
func GetRelease ¶
GetRelease fetches the release information from GitHub.
type ReleaseAsset ¶
type ReleaseAsset struct {
URL string `json:"url"` // https://api.github.com/repos/flintlib/flint/releases/assets/242245930
ID int `json:"id"` // 242245930
NodeID string `json:"node_id"` // RA_kwDOAC8YHs4OcGEq
Name string `json:"name"` // flint-3.2.2.tar.gz
ContentType string `json:"content_type"` // application/x-gtar
State string `json:"state"` // uploaded
Size int64 `json:"size"` // 123456
DownloadCount int `json:"download_count"` // 176
UpdatedAt string `json:"updated_at"` // 2025-03-31T08:54:16Z
BrowserDownloadURL string `json:"browser_download_url"` // https://github.com/flintlib/flint/releases/download/v3.2.2/flint-3.2.2.tar.gz
}
ReleaseAsset represents a GitHub release asset.
Click to show internal directories.
Click to hide internal directories.