Documentation ¶
Index ¶
- Constants
- type Github
- func (g *Github) CheckIfReleaseExist(owner, repositoryName, releaseURL string) bool
- func (g *Github) CheckIfRepositoryExist(repository string) bool
- func (g *Github) CreateFile(repository, pathToFile, fileContent, branchName string) (*github.RepositoryContentResponse, error)
- func (g *Github) CreatePullRequest(repository, title, body, head, base string) (*github.PullRequest, error)
- func (g *Github) CreateRef(repository, baseBranchName, sha, newBranchName string) error
- func (g *Github) CreateRefInOrg(githubOrg, repository, baseBranchName, sha, newBranchName string) error
- func (g *Github) CreateWebhook(repository, url string) (int64, error)
- func (g *Github) DeleteFile(repository, pathToFile, branchName string) error
- func (g *Github) DeleteRef(repository, branchName string) error
- func (g *Github) DeleteRefFromOrg(githubOrg, repository, branchName string) error
- func (g *Github) DeleteRelease(owner, repositoryName, releaseURL string) bool
- func (g *Github) DeleteRepository(repository *github.Repository) error
- func (g *Github) DeleteRepositoryIfExists(name string) error
- func (g *Github) DeleteWebhook(repository string, ID int64) error
- func (g *Github) ExistsRef(repository, branchName string) (bool, error)
- func (g *Github) ExistsRefInOrg(githubOrg, repository, branchName string) (bool, error)
- func (g *Github) ForkRepository(sourceName, targetName string) (*github.Repository, error)
- func (g *Github) GetAllRepositories() ([]*github.Repository, error)
- func (g *Github) GetCheckRun(repository string, id int64) (*github.CheckRun, error)
- func (g *Github) GetCheckRunConclusion(checkRunName, repoName, prHeadSha string, prNumber int) (string, error)
- func (g *Github) GetFile(repository, pathToFile, branchName string) (*github.RepositoryContent, error)
- func (g *Github) GetPRDetails(ghRepo string, prID int) (string, string, error)
- func (g *Github) GetPullRequest(repository string, id int) (*github.PullRequest, error)
- func (g *Github) ListCheckRuns(repository string, ref string) ([]*github.CheckRun, error)
- func (g *Github) ListPullRequestCommentsSince(repository string, prNumber int, since time.Time) ([]*github.IssueComment, error)
- func (g *Github) ListPullRequests(repository string) ([]*github.PullRequest, error)
- func (g *Github) ListRepoWebhooks(repository string) ([]*github.Hook, error)
- func (g *Github) MergePullRequest(repository string, prNumber int) (*github.PullRequestMergeResult, error)
- func (g *Github) UpdateFile(repository, pathToFile, newContent, branchName, fileSHA string) (*github.RepositoryContentResponse, error)
- type Webhook
Constants ¶
View Source
const (
HEADS = "heads/%s"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Github ¶
type Github struct {
// contains filtered or unexported fields
}
func NewGithubClient ¶
func (*Github) CheckIfReleaseExist ¶
func (*Github) CheckIfRepositoryExist ¶
func (*Github) CreateFile ¶
func (g *Github) CreateFile(repository, pathToFile, fileContent, branchName string) (*github.RepositoryContentResponse, error)
func (*Github) CreatePullRequest ¶
func (g *Github) CreatePullRequest(repository, title, body, head, base string) (*github.PullRequest, error)
func (*Github) CreateRef ¶
CreateRef creates a new ref (GitHub branch) in a specified GitHub repository, that will be based on the commit specified with sha. If sha is not specified the latest commit from base branch will be used.
func (*Github) CreateRefInOrg ¶
func (*Github) CreateWebhook ¶
func (*Github) DeleteFile ¶
func (*Github) DeleteRefFromOrg ¶
func (*Github) DeleteRelease ¶
func (*Github) DeleteRepository ¶
func (g *Github) DeleteRepository(repository *github.Repository) error
func (*Github) DeleteRepositoryIfExists ¶
func (*Github) ExistsRefInOrg ¶
func (*Github) ForkRepository ¶
func (g *Github) ForkRepository(sourceName, targetName string) (*github.Repository, error)
func (*Github) GetAllRepositories ¶
func (g *Github) GetAllRepositories() ([]*github.Repository, error)
func (*Github) GetCheckRun ¶
func (*Github) GetCheckRunConclusion ¶
func (g *Github) GetCheckRunConclusion(checkRunName, repoName, prHeadSha string, prNumber int) (string, error)
GetCheckRunConclusion fetches a specific CheckRun within a given repo by matching the CheckRun's name with the given checkRunName, and then returns the CheckRun conclusion
func (*Github) GetFile ¶
func (g *Github) GetFile(repository, pathToFile, branchName string) (*github.RepositoryContent, error)
func (*Github) GetPRDetails ¶
func (*Github) GetPullRequest ¶
func (*Github) ListCheckRuns ¶
func (*Github) ListPullRequestCommentsSince ¶
func (*Github) ListPullRequests ¶
func (g *Github) ListPullRequests(repository string) ([]*github.PullRequest, error)
func (*Github) ListRepoWebhooks ¶
func (*Github) MergePullRequest ¶
func (*Github) UpdateFile ¶
func (g *Github) UpdateFile(repository, pathToFile, newContent, branchName, fileSHA string) (*github.RepositoryContentResponse, error)
Click to show internal directories.
Click to hide internal directories.