github

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MIT Imports: 8 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 NewClient

func NewClient(log *zap.Logger, token string) Client

NewClient returns "logged in" GitHub client if the token is not empty.

func (Client) CreateRelease

func (c Client) CreateRelease(ctx context.Context, release Release, dryRun bool) (int64, error)

CreateRelease creates release (if it doesn't exist) and returns release id

func (Client) ReleaseAndAssetExists added in v0.0.4

func (c Client) ReleaseAndAssetExists(ctx context.Context, owner, repo, tag, assetPath string) (bool, bool, error)

ReleaseAndAssetExists checks if the release and asset already exists

func (Client) UploadAsset added in v0.0.4

func (c Client) UploadAsset(ctx context.Context, releaseId int64, release Release) (string, error)

UploadAsset upload asset and return asset download url

type Release

type Release struct {
	Owner string
	Repo  string
	Tag   string

	Name        string
	Description string
	AssetPath   string
	PreRelease  bool
}

Jump to

Keyboard shortcuts

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