github

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, logger *slog.Logger, input *InputNew) (*Client, error)

func (*Client) EditRelease

func (c *Client) EditRelease(ctx context.Context, owner, repo string, id int64) error

func (*Client) ListReleases

func (c *Client) ListReleases(ctx context.Context, owner, repo string) ([]*Release, error)

type GraphQL

type GraphQL interface {
	Query(ctx context.Context, q any, variables map[string]any) error
}

type InputNew

type InputNew struct {
	AccessToken string
}

type ListReleasesQuery

type ListReleasesQuery struct {
	Repository *Repository `graphql:"repository(owner: $repoOwner, name: $repoName)"`
}

func (*ListReleasesQuery) Nodes

func (q *ListReleasesQuery) Nodes() []*Release

func (*ListReleasesQuery) PageInfo

func (q *ListReleasesQuery) PageInfo() *PageInfo

type PageInfo

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

type Release

type Release struct {
	Immutable  bool   `json:"immutable"`
	IsDraft    bool   `json:"isDraft"`
	TagName    string `json:"tagName"`
	DatabaseID int64  `json:"databaseId"`
}

type Releases

type Releases struct {
	PageInfo *PageInfo  `json:"pageInfo"`
	Nodes    []*Release `json:"nodes"`
}

type RepositoriesService

type RepositoriesService interface {
	EditRelease(ctx context.Context, owner, repo string, id int64, release *github.RepositoryRelease) (*github.RepositoryRelease, *github.Response, error)
}

type Repository

type Repository struct {
	Releases *Releases `graphql:"releases(first:100, after:$cursor)"`
}

Jump to

Keyboard shortcuts

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