Documentation ¶
Index ¶
Constants ¶
View Source
const ( Name = "clutch.service.github" CurrentUser = "" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface { GetFile(ctx context.Context, ref *RemoteRef, path string) (*File, error) GetDirectory(ctx context.Context, ref *RemoteRef, path string) (*Directory, error) CreateBranch(ctx context.Context, req *CreateBranchRequest) error CreatePullRequest(ctx context.Context, ref *RemoteRef, base, title, body string) (*PullRequestInfo, error) CreateRepository(ctx context.Context, req *sourcecontrolv1.CreateRepositoryRequest) (*sourcecontrolv1.CreateRepositoryResponse, error) CreateIssueComment(ctx context.Context, ref *RemoteRef, number int, body string) error CompareCommits(ctx context.Context, ref *RemoteRef, compareSHA string) (*githubv3.CommitsComparison, error) GetCommit(ctx context.Context, ref *RemoteRef) (*Commit, error) GetRepository(ctx context.Context, ref *RemoteRef) (*Repository, error) GetOrganization(ctx context.Context, organization string) (*githubv3.Organization, error) ListOrganizations(ctx context.Context, user string) ([]*githubv3.Organization, error) ListPullRequestsWithCommit(ctx context.Context, ref *RemoteRef, sha string, opts *githubv3.ListOptions) ([]*PullRequestInfo, error) GetOrgMembership(ctx context.Context, user, org string) (*githubv3.Membership, error) GetUser(ctx context.Context, username string) (*githubv3.User, error) }
Client allows various interactions with remote repositories on GitHub.
type CreateBranchRequest ¶
type CreateBranchRequest struct { // The base for the new branch. Ref *RemoteRef // The name of the new branch. BranchName string // Files and their content. Files will be clobbered with new content or created if they don't already exist. Files FileMap // The commit message for files added. CommitMessage string // Fetch only ReferenceName specified branch. SingleBranch bool }
type File ¶
type File struct { Path string Contents io.ReadCloser SHA string LastModifiedTime time.Time LastModifiedSHA string }
File contains information about a requested file, including its content.
type FileMap ¶
type FileMap map[string]io.ReadCloser
type PullRequestInfo ¶
type RemoteRef ¶
type RemoteRef struct { // Organization or user that owns the repository. RepoOwner string // Name of the repository. RepoName string // SHA, branch name, or tag. Ref string }
Remote ref points to a git reference using a combination of the repository and the reference itself.
type Repository ¶
Repository contains information about a requested repository.
type StatsRoundTripper ¶
type StatsRoundTripper struct { Wrapped http.RoundTripper // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.