Documentation ¶
Overview ¶
Copyright (C) 2021-2023, Kubefirst
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Index ¶
- func VerifyTokenPermissions(githubToken string) error
- type Session
- func (g Session) AddSSHKey(keyTitle, publicKey string) (*github.Key, error)
- func (g Session) CheckRepoExists(owner, name string) int
- func (g Session) CheckTeamExists(owner, name string) int
- func (g Session) CommentPR(pullRequesrt *github.PullRequest, gitHubUser, body string) error
- func (g Session) CreatePR(branchName string, repoName string, gitHubUser string, baseBranch string, ...) (*github.PullRequest, error)
- func (g Session) CreatePrivateRepo(org, name, description string) error
- func (g Session) CreateWebhookRepo(org, repo, hookName, hookURL, hookSecret string, hookEvents []string) error
- func (g Session) DeleteRepositoryWebhook(owner, repository, url string) error
- func (g Session) GetRepo(owner, name string) (*github.Repository, error)
- func (g Session) ListRepoWebhooks(owner, repo string) ([]*github.Hook, error)
- func (g Session) RemoveRepo(owner, name string) (*github.Response, error)
- func (g Session) RemoveSSHKey(keyID int64) error
- func (g Session) RemoveSSHKeyByPublicKey(user, publicKey string) error
- func (g Session) RemoveTeam(owner, team string) error
- func (g Session) RetrySearchPullRequestComment(gitHubUser string, gitOpsRepo string, pullRequest *github.PullRequest, ...) (bool, error)
- func (g Session) SearchWordInPullRequestComment(gitHubUser string, gitOpsRepo string, pullRequest *github.PullRequest, ...) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VerifyTokenPermissions ¶
VerifyTokenPermissions compares scope of the provided token to the required scopes for kubefirst functionality
Types ¶
type Session ¶ added in v0.106.0
type Session struct {
// contains filtered or unexported fields
}
func (Session) AddSSHKey ¶ added in v0.106.0
AddSSHKey - Add ssh keys to a user account to allow kubefirst installer to use its own token during installation
func (Session) CheckRepoExists ¶ added in v0.106.0
GetRepo - Always returns a status code for whether a repository exists or not
func (Session) CheckTeamExists ¶ added in v0.106.0
GetRepo - Always returns a status code for whether a team exists or not
func (Session) CommentPR ¶ added in v0.106.0
func (g Session) CommentPR(pullRequesrt *github.PullRequest, gitHubUser, body string) error
func (Session) CreatePrivateRepo ¶ added in v0.106.0
CreatePrivateRepo - Use github API to create a private repo
func (Session) CreateWebhookRepo ¶ added in v0.106.0
func (Session) DeleteRepositoryWebhook ¶ added in v0.106.0
DeleteRepositoryWebhook
func (Session) GetRepo ¶ added in v0.106.0
func (g Session) GetRepo(owner, name string) (*github.Repository, error)
GetRepo - Returns a repo
func (Session) ListRepoWebhooks ¶ added in v0.106.0
ListRepoWebhooks returns all webhooks for a repository
func (Session) RemoveRepo ¶ added in v0.106.0
RemoveRepo Removes a repository based on repository owner and name. It returns github.Response that hold http data, as http status code, the caller can make use of the http status code to validate the response.
func (Session) RemoveSSHKey ¶ added in v0.106.0
RemoveSSHKey - Removes SSH Key from github user
func (Session) RemoveSSHKeyByPublicKey ¶ added in v0.106.0
RemoveSSHKeyByPublicKey deletes a GitHub key that matches the provided public key.
func (Session) RemoveTeam ¶ added in v0.106.0
RemoveTeam - Remove a team
func (Session) RetrySearchPullRequestComment ¶ added in v0.106.0
func (Session) SearchWordInPullRequestComment ¶ added in v0.106.0
func (g Session) SearchWordInPullRequestComment(gitHubUser string, gitOpsRepo string, pullRequest *github.PullRequest, searchFor string, ) (bool, error)
SearchWordInPullRequestComment look for a specific sentence in a GitHub Pull Request comment