github

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitRepo

func SplitRepo(repo string) (string, string)

Types

type GQLAssociatedPRs

type GQLAssociatedPRs struct {
	Nodes []GQLPRNode `json:"nodes"`
}

type GQLAuthor

type GQLAuthor struct {
	Login string `json:"login"`
}

type GQLClient

type GQLClient struct {
	Token string
	Cl    *github.Client
}

func GqlClientFromEnv

func GqlClientFromEnv() *GQLClient

func (GQLClient) CommitByRef

func (c GQLClient) CommitByRef(repo, tag string) (string, error)

func (GQLClient) HistoryGraphQl

func (c GQLClient) HistoryGraphQl(repo, branch, commitLimit string) ([]GQLCommit, error)

func (GQLClient) ReleaseGraphQL

func (c GQLClient) ReleaseGraphQL(repo string) ([]GQLRelease, error)

func (GQLClient) UpsertRelease

func (c GQLClient) UpsertRelease(ctx context.Context, repo string, release string, contentModifier func(repositoryRelease *github.RepositoryRelease) error) error

type GQLCommit

type GQLCommit struct {
	Oid                    string           `json:"oid"`
	Message                string           `json:"message"`
	AssociatedPullRequests GQLAssociatedPRs `json:"associatedPullRequests"`
}

type GQLData

type GQLData struct {
	Repository GQLRepo `json:"repository"`
}

type GQLHistoryRepo

type GQLHistoryRepo struct {
	PageInfo GQLPageInfo `json:"pageInfo"`
	Nodes    []GQLCommit `json:"nodes"`
}

type GQLObjectRelease

type GQLObjectRelease struct {
	Nodes []GQLRelease `json:"nodes"`
}

type GQLObjectRepo

type GQLObjectRepo struct {
	History GQLHistoryRepo `json:"history"`
}

type GQLOutput

type GQLOutput struct {
	Data GQLData `json:"data"`
}

type GQLPRNode

type GQLPRNode struct {
	Author GQLAuthor `json:"author"`
	Number int       `json:"number"`
	Title  string    `json:"title"`
	Body   string    `json:"body"`
}

type GQLPageInfo

type GQLPageInfo struct {
	HasNextPage bool   `json:"hasNextPage"`
	EndCursor   string `json:"endCursor"`
}

type GQLRef

type GQLRef struct {
	Target GQLRefTarget `json:"target"`
}

type GQLRefTarget

type GQLRefTarget struct {
	CommitUrl string `json:"commitUrl"`
	Oid       string `json:"oid"`
}

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"`
}

type GQLRepo

type GQLRepo struct {
	Ref      GQLRef           `json:"ref"`
	Object   GQLObjectRepo    `json:"object"`
	Releases GQLObjectRelease `json:"releases"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL