Documentation
¶
Index ¶
- type BranchSHAComment
- type BranchesWithCommits
- type BranchesWithError
- type Client
- func (g *Client) GetCommit(sha, repo string) (*github.RepositoryCommit, error)
- func (g *Client) GetRepos(reposConf []string) (map[string][]BranchSHAComment, error)
- func (g *Client) ListBranchesByRepo(repo string) ([]*github.Branch, error)
- func (g *Client) ListBranchesByRepoWithComment(repo string) BranchesWithError
- type Commit
- type CommitSpec
- type RepositoriesResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BranchSHAComment ¶
type BranchSHAComment struct {
BranchName string `json:"branch"`
Sha string `json:"sha"`
Comment string `json:"comment"`
}
BranchSHAComment s a struct that combines Branch with latest sha and related comment
type BranchesWithCommits ¶
BranchesWithCommits is a map with list of commits for each branch
type BranchesWithError ¶
type BranchesWithError struct {
Repo string
Branches []BranchSHAComment
Error error
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a struct that describe necessary fields for describing git with client, context and owner
func NewGitClient ¶
NewGitClient is a static function needed for tests
func (*Client) GetCommit ¶
func (g *Client) GetCommit(sha, repo string) (*github.RepositoryCommit, error)
GetCommit is a function that implements the interface GitClient with a sha and repo param that return a github.RepositoryCommit and an error interface
func (*Client) GetRepos ¶
func (g *Client) GetRepos(reposConf []string) (map[string][]BranchSHAComment, error)
GetRepos is a function that implements the interface GitClient with a RepositoriesProperties param that return a list of of BranchSHAComment and an error interface
func (*Client) ListBranchesByRepo ¶
ListBranchesByRepo is a function that implements the interface GitClient with a repo param that return a list of branches and an error interface
func (*Client) ListBranchesByRepoWithComment ¶
func (g *Client) ListBranchesByRepoWithComment(repo string) BranchesWithError
ListBranchesByRepoWithComment is a function that implements the interface GitClient with a repo param that return a list of of BranchSHAComment and an error interface
type Commit ¶
type Commit struct {
Message string `json:"message,omitempty" yaml:"message,omitempty"`
Branch string `json:"branch" yaml:"branch"`
Sha string `json:"sha" yaml:"sha"`
}
Commit is a struct needed to define an object `commit` defined with message and sha
type CommitSpec ¶
CommitSpec is a type def as map of string and Commit
type RepositoriesResponse ¶
type RepositoriesResponse map[string]BranchesWithCommits
RepositoriesResponse is a map with name of the repo and BranchesWithCommits