Documentation ¶
Index ¶
- func NewGitHubClient() *github.Client
- type GitHubRepoID
- type GitHubService
- type HTTPGitHubService
- func (service *HTTPGitHubService) CreatePullRequest(newPr *NewPullRequest, repoID GitHubRepoID) (*github.PullRequest, error)
- func (service *HTTPGitHubService) GetRepository(repoID GitHubRepoID) (*github.Repository, error)
- func (service *HTTPGitHubService) ListReleases(repoID GitHubRepoID) ([]*github.RepositoryRelease, error)
- type NewPullRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGitHubClient ¶
NewGitHubClient - creates a new client using the GITHUB_TOKEN (if set)
Types ¶
type GitHubRepoID ¶
GitHubRepoID - unique identifier for a repo
func ParseRepoID ¶
func ParseRepoID(repo string) (GitHubRepoID, error)
ParseRepoID - parses a string in the form owner/repo
type GitHubService ¶
type GitHubService interface { GetRepository(repo GitHubRepoID) (*github.Repository, error) CreatePullRequest(newPr *NewPullRequest, repo GitHubRepoID) (*github.PullRequest, error) ListReleases(repo GitHubRepoID) ([]*github.RepositoryRelease, error) }
GitHubService - service for interacting with the GitHub API
type HTTPGitHubService ¶
type HTTPGitHubService struct {
// contains filtered or unexported fields
}
HTTPGitHubService - concrete implementation of GitHubService
func NewGitHubService ¶
func NewGitHubService() *HTTPGitHubService
NewGitHubService - creates a new instance of an HTTPGitHubService
func (*HTTPGitHubService) CreatePullRequest ¶
func (service *HTTPGitHubService) CreatePullRequest(newPr *NewPullRequest, repoID GitHubRepoID) (*github.PullRequest, error)
CreatePullRequest - creates a pull request in the given repository
func (*HTTPGitHubService) GetRepository ¶
func (service *HTTPGitHubService) GetRepository(repoID GitHubRepoID) (*github.Repository, error)
GetRepository - returns the repository for the given context
func (*HTTPGitHubService) ListReleases ¶
func (service *HTTPGitHubService) ListReleases(repoID GitHubRepoID) ([]*github.RepositoryRelease, error)
ListReleases - list the releases in the repo
type NewPullRequest ¶
NewPullRequest - represents a new pull request
Click to show internal directories.
Click to hide internal directories.