client

package
v0.0.0-...-588a758 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientService

type ClientService interface {
	GetOwner(repository string) string
	PullRequestByCommitRepo(owner, repo, sha string) ([]*PullRequest, error)
	DownloadFile(repository, version, file string) ([]byte, error)
	CompareCommitsRepo(owner, repo, base, head string) (*CommitsComparison, error)
	FirstCommit(owner, repo string) (*Commit, error)
}

ClientService client service

type Commit

type Commit struct {
	SHA     string `json:"sha,omitempty"`
	HTMLURL string `json:"html_url,omitempty"`
	Message string `json:"message,omitempty"`
}

type CommitsComparison

type CommitsComparison struct {
	TotalCommits int       `json:"total_commits,omitempty"`
	Status       string    `json:"status,omitempty"`
	AheadBy      int       `json:"ahead_by,omitempty"`
	BehindBy     int       `json:"behind_by,omitempty"`
	Commits      []*Commit `json:"commits,omitempty"`
	DiffURL      string    `json:"diff_url,omitempty"`
	HTMLURL      string    `json:"html_url,omitempty"`
}

type PullRequest

type PullRequest struct {
	ID       int64     `json:"id,omitempty"`
	Number   int       `json:"number,omitempty"`
	Title    string    `json:"title,omitempty"`
	Labels   []string  `json:"labels,omitempty"`
	HTMLURL  string    `json:"html_url,omitempty"`
	MergedAt time.Time `json:"merged_at,omitempty"`
}

Jump to

Keyboard shortcuts

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