Versions in this module Expand all Collapse all v0 v0.22.0 Oct 21, 2020 Changes in this version + func ContainsSkipCI(s string) bool + func FilterIgnorePath(files []string, pattern string) ([]string, error) + func FilterPath(files []string, pattern string) ([]string, error) + func IsInsidePath(parent, child string) bool + func MatchesBaseBranch(baseBranch string, baseRefName string) bool + type ChangedFileObject struct + Path string + type CheckRequest struct + Source Source + Version Version + type CheckResponse []Version + func Check(request CheckRequest, manager Github) (CheckResponse, error) + func (r CheckResponse) Len() int + func (r CheckResponse) Less(i, j int) bool + func (r CheckResponse) Swap(i, j int) + type CommitObject struct + Author struct{ ... } + CommittedDate githubv4.DateTime + ID string + Message string + OID string + type GetParameters struct + FetchTags bool + GitDepth int + IntegrationTool string + ListChangedFiles bool + SkipDownload bool + Submodules bool + type GetRequest struct + Params GetParameters + Source Source + Version Version + type GetResponse struct + Metadata Metadata + Version Version + func Get(request GetRequest, github Github, git Git, outputDir string) (*GetResponse, error) + type Git interface + Checkout func(string, string, bool) error + Fetch func(string, int, int, bool) error + GitCryptUnlock func(string) error + Init func(string) error + Merge func(string, bool) error + Pull func(string, string, int, bool, bool) error + Rebase func(string, string, bool) error + RevParse func(string) (string, error) + type GitClient struct + AccessToken string + Directory string + Output io.Writer + func NewGitClient(source *Source, dir string, output io.Writer) (*GitClient, error) + func (g *GitClient) Checkout(branch, sha string, submodules bool) error + func (g *GitClient) Endpoint(uri string) (string, error) + func (g *GitClient) Fetch(uri string, prNumber int, depth int, submodules bool) error + func (g *GitClient) GitCryptUnlock(base64key string) error + func (g *GitClient) Init(branch string) error + func (g *GitClient) Merge(sha string, submodules bool) error + func (g *GitClient) Pull(uri, branch string, depth int, submodules bool, fetchTags bool) error + func (g *GitClient) Rebase(baseRef string, headSha string, submodules bool) error + func (g *GitClient) RevParse(branch string) (string, error) + type Github interface + DeletePreviousComments func(string) error + GetChangedFiles func(string, string) ([]ChangedFileObject, error) + GetPullRequest func(string, string) (*PullRequest, error) + ListModifiedFiles func(int) ([]string, error) + ListOpenPullRequests func() ([]*PullRequest, error) + PostComment func(string, string) error + UpdateCommitStatus func(string, string, string, string, string, string) error + type GithubClient struct + Owner string + Repository string + V3 *github.Client + V4 *githubv4.Client + func NewGithubClient(s *Source) (*GithubClient, error) + func (m *GithubClient) DeletePreviousComments(prNumber string) error + func (m *GithubClient) GetChangedFiles(prNumber string, commitRef string) ([]ChangedFileObject, error) + func (m *GithubClient) GetPullRequest(prNumber, commitRef string) (*PullRequest, error) + func (m *GithubClient) ListModifiedFiles(prNumber int) ([]string, error) + func (m *GithubClient) ListOpenPullRequests() ([]*PullRequest, error) + func (m *GithubClient) PostComment(prNumber, comment string) error + func (m *GithubClient) UpdateCommitStatus(commitRef, baseContext, statusContext, status, targetURL, description string) error + type LabelObject struct + Name string + type Metadata []*MetadataField + func (m *Metadata) Add(name, value string) + type MetadataField struct + Name string + Value string + type PullRequest struct + ApprovedReviewCount int + Labels []LabelObject + Tip CommitObject + func (p *PullRequest) UpdatedDate() githubv4.DateTime + type PullRequestObject struct + BaseRefName string + ClosedAt githubv4.DateTime + HeadRefName string + ID string + IsCrossRepository bool + IsDraft bool + MergedAt githubv4.DateTime + Number int + Repository struct{ ... } + State githubv4.PullRequestState + Title string + URL string + type PutParameters struct + BaseContext string + Comment string + CommentFile string + Context string + DeletePreviousComments bool + Description string + DescriptionFile string + Path string + Status string + TargetURL string + func (p *PutParameters) Validate() error + type PutRequest struct + Params PutParameters + Source Source + type PutResponse struct + Metadata Metadata + Version Version + func Put(request PutRequest, manager Github, inputDir string) (*PutResponse, error) + type Source struct + AccessToken string + BaseBranch string + DisableCISkip bool + DisableForks bool + DisableGitLFS bool + GitCryptKey string + IgnoreDrafts bool + IgnorePaths []string + Labels []string + Paths []string + Repository string + RequiredReviewApprovals int + SkipSSLVerification bool + States []githubv4.PullRequestState + V3Endpoint string + V4Endpoint string + func (s *Source) Validate() error + type Version struct + ApprovedReviewCount string + Commit string + CommittedDate time.Time + PR string + State githubv4.PullRequestState + func NewVersion(p *PullRequest) Version