Documentation ¶
Index ¶
- func NewGithubClient(token string) *github.Client
- type GHClient
- func (g *GHClient) AddLabels(org, repo string, number int, labels []string) error
- func (g *GHClient) CreateComment(org, repo string, number int, comment string)
- func (g *GHClient) GetComments(org, repo string, number int) ([]*github.IssueComment, error)
- func (g *GHClient) GetIssueLabels(org, repo string, number int) ([]*github.Label, error)
- func (g *GHClient) GetPullRequest(org, repo string, number int) (*github.PullRequest, error)
- func (g *GHClient) IsMember(org, user string) (bool, error)
- func (g *GHClient) ListIssueComments(org, repo string, number int) ([]*github.IssueComment, error)
- func (g *GHClient) ListRepoLabels(org, repo string) ([]*github.Label, error)
- func (g *GHClient) RemoveLabel(org, repo string, number int, label string) error
- func (g *GHClient) SetStatus(org, repo, sha, state, message string) error
- func (g *GHClient) ValidateSignature(receivedHash []string, bodyBuffer []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGithubClient ¶
NewGithubClient creates a new GitHub client.
Types ¶
type GHClient ¶
type GHClient struct { GitHubClient *github.Client GitHubSecret string // contains filtered or unexported fields }
GHClient set the confiuration needed.
func NewGitHubConfig ¶
func NewGitHubConfig(gitHubToken, gitHubSecret string, logger log.FieldLogger) *GHClient
NewGitHubConfig creates a new KopsProvisioner.
func (*GHClient) CreateComment ¶
CreateComment sends a GitHub Comment to a specific issue/pull request.
func (*GHClient) GetComments ¶
GetComments get comments a specific issue/pull request.
func (*GHClient) GetIssueLabels ¶
GetIssueLabels get all the labels for a specific issue/pull request.
func (*GHClient) GetPullRequest ¶
GetPullRequest get a Pull Request
func (*GHClient) ListIssueComments ¶
ListIssueComments get all the comment for a specific issue/pull request.
func (*GHClient) ListRepoLabels ¶
ListRepoLabels list all labels for a repo
func (*GHClient) RemoveLabel ¶
RemoveLabel remove a GitHub label from a specific issue/pull request.
Click to show internal directories.
Click to hide internal directories.