Documentation
¶
Index ¶
- Variables
- func SplitRepo(repo string) (string, string)
- type GQLAssociatedPRs
- type GQLAuthor
- type GQLClient
- func (c GQLClient) CommitByRef(repo, tag string) (string, error)
- func (c GQLClient) HistoryGraphQl(repo, branch, commitLimit string) ([]GQLCommit, error)
- func (c GQLClient) ReleaseGraphQL(repo string) ([]GQLRelease, error)
- func (c GQLClient) UpsertRelease(ctx context.Context, repo string, releaseName string, tagName string, ...) error
- type GQLCommit
- type GQLData
- type GQLHistoryRepo
- type GQLObjectRelease
- type GQLObjectRepo
- type GQLOutput
- type GQLPRNode
- type GQLPageInfo
- type GQLRef
- type GQLRefTarget
- type GQLRelease
- type GQLRepo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrGitHubTokenNotFound = errors.New("GitHub token not found: use --use-gh-auth flag or set GITHUB_TOKEN or GH_TOKEN environment variable") ErrGHNotInstalled = errors.New("'gh' command not found in PATH") ErrGHAuthFailed = errors.New("failed to get token from 'gh auth token'") ErrGHAuthEmptyToken = errors.New("'gh auth token' returned empty output") )
Functions ¶
Types ¶
type GQLAssociatedPRs ¶
type GQLAssociatedPRs struct {
Nodes []GQLPRNode `json:"nodes"`
}
type GQLClient ¶
func NewGQLClient ¶ added in v1.3.0
NewGQLClient creates a new GitHub GraphQL client with flexible authentication. Uses priority cascade: --use-gh-auth flag → GITHUB_TOKEN → GITHUB_API_TOKEN → GH_TOKEN → interactive prompt.
func (GQLClient) HistoryGraphQl ¶
func (GQLClient) ReleaseGraphQL ¶
func (c GQLClient) ReleaseGraphQL(repo string) ([]GQLRelease, error)
type GQLCommit ¶
type GQLCommit struct {
Oid string `json:"oid"`
Message string `json:"message,omitempty"`
AssociatedPullRequests GQLAssociatedPRs `json:"associatedPullRequests,omitempty"`
}
type GQLHistoryRepo ¶
type GQLHistoryRepo struct {
PageInfo GQLPageInfo `json:"pageInfo"`
Nodes []GQLCommit `json:"nodes"`
}
type GQLObjectRelease ¶
type GQLObjectRelease struct {
Nodes []GQLRelease `json:"nodes"`
PageInfo GQLPageInfo `json:"pageInfo"`
}
type GQLObjectRepo ¶
type GQLObjectRepo struct {
History GQLHistoryRepo `json:"history"`
}
type GQLPageInfo ¶
type GQLRef ¶
type GQLRef struct {
Target GQLRefTarget `json:"target"`
}
type GQLRefTarget ¶
func (GQLRefTarget) Commit ¶ added in v0.7.0
func (r GQLRefTarget) Commit() string
type GQLRelease ¶
type GQLRelease struct {
Name string `json:"name"`
CreatedAt time.Time `json:"createdAt"`
PublishedAt time.Time `json:"publishedAt"`
IsDraft bool `json:"isDraft"`
IsPrerelease bool `json:"isPrerelease"`
Description string `json:"description"`
Id int `json:"databaseId"`
IsLatest bool `json:"isLatest"`
}
func (GQLRelease) Branch ¶ added in v0.6.0
func (r GQLRelease) Branch() string
Branch branch that this release was first on
func (GQLRelease) ExtractReleaseDate ¶ added in v0.6.0
func (r GQLRelease) ExtractReleaseDate() (time.Time, error)
ExtractReleaseDate returns the date this was published, if there's a `> Released on YYYY/MM/DD` in the description it uses this, otherwise it uses the PublishedAt data from Github.
func (GQLRelease) IsLTS ¶ added in v0.11.0
func (r GQLRelease) IsLTS() bool
func (GQLRelease) IsReleased ¶ added in v0.6.0
func (r GQLRelease) IsReleased() bool
IsReleased returns if the release in not prerelease not a draft
func (GQLRelease) SemVer ¶ added in v0.10.0
func (r GQLRelease) SemVer() *semver.Version
type GQLRepo ¶
type GQLRepo struct {
Ref GQLRef `json:"ref"`
Object GQLObjectRepo `json:"object"`
Releases GQLObjectRelease `json:"releases"`
}
Click to show internal directories.
Click to hide internal directories.