supergit

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: Apache-2.0 Imports: 12 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(baseURL string) *Client

type CommitResponse

type CommitResponse struct {
	Commit struct {
		CommitSHA string `json:"commit_sha"`
	} `json:"commit"`
	Result struct {
		NewSHA string `json:"new_sha"`
	} `json:"result"`
}

type CreateBranchRequest added in v0.26.0

type CreateBranchRequest struct {
	Branch  string `json:"branch"`
	FromRef string `json:"from_ref"`
}

type GetCommitResponse

type GetCommitResponse struct {
	CommitSHA string `json:"commit_sha"`
}

type ListBranchesResponse added in v0.26.0

type ListBranchesResponse struct {
	Branches []string `json:"branches"`
}

type ListFilesResponse

type ListFilesResponse struct {
	Paths []string `json:"paths"`
	Ref   string   `json:"ref"`
}

type MergeBranchRequest added in v0.26.0

type MergeBranchRequest struct {
	SourceBranch string `json:"source_branch"`
	TargetBranch string `json:"target_branch"`
	Message      string `json:"message"`
	Author       struct {
		Name  string `json:"name"`
		Email string `json:"email"`
	} `json:"author"`
}

type MergeBranchResponse added in v0.26.0

type MergeBranchResponse struct {
	CommitSHA string `json:"commit_sha"`
}

type Provider

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

func NewProvider

func NewProvider() (*Provider, error)

func (*Provider) Commit

func (p *Provider) Commit(ctx context.Context, repoID string, options provider.CommitOptions) (string, error)

func (*Provider) CreateBranch added in v0.26.0

func (p *Provider) CreateBranch(ctx context.Context, repoID, branch, fromRef string) error

func (*Provider) CreateRepository

func (p *Provider) CreateRepository(ctx context.Context, repoID string) (*provider.Repository, error)

func (*Provider) DeleteBranch added in v0.26.0

func (p *Provider) DeleteBranch(ctx context.Context, repoID, branch string) error

func (*Provider) DeleteRepository

func (p *Provider) DeleteRepository(ctx context.Context, repoID string) error

func (*Provider) GetFile

func (p *Provider) GetFile(ctx context.Context, repoID, path, ref string) (io.ReadCloser, error)

func (*Provider) GetRepositoryID

func (p *Provider) GetRepositoryID(options provider.RepositoryOptions) string

func (*Provider) Head

func (p *Provider) Head(ctx context.Context, repoID, ref string) (string, error)

func (*Provider) ListBranches added in v0.26.0

func (p *Provider) ListBranches(ctx context.Context, repoID, prefix string) ([]string, error)

func (*Provider) ListFiles

func (p *Provider) ListFiles(ctx context.Context, repoID, ref string) ([]string, error)

func (*Provider) MergeBranch added in v0.26.0

func (p *Provider) MergeBranch(ctx context.Context, repoID, sourceBranch, targetBranch, message string, author provider.CommitAuthor) (string, error)

func (*Provider) Name

func (p *Provider) Name() string

type RepoRequest

type RepoRequest struct {
	ID            string `json:"id"`
	DefaultBranch string `json:"default_branch"`
}

type RepoResponse

type RepoResponse struct {
	ID            string `json:"id"`
	DefaultBranch string `json:"default_branch"`
}

Jump to

Keyboard shortcuts

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