Documentation
¶
Index ¶
- func CreateNewBranch(ghClient *github.Client, githubBranch string, githubUser string, ...) error
- func CreateNewPullRequest(ghClient *github.Client, githubBranch string, githubUser string, ...) (string, error)
- func DisplaySuccess(w http.ResponseWriter, githubAccessToken string, prURL string) error
- func GetFileBlobSHA(ghClient *github.Client, githubBranch string, githubUser string, ...) (string, error)
- func GetGithubAccessToken(code string) string
- func GetGithubClientID() string
- func GetGithubClientSecret() string
- func GetGithubData(accessToken string) (string, error)
- func UpdateFile(ghClient *github.Client, githubBranch string, fileSHA string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNewBranch ¶
func CreateNewBranch(ghClient *github.Client, githubBranch string, githubUser string, githubRepoName string) error
CreateNewBranch creates a new branch from main branch
func CreateNewPullRequest ¶
func CreateNewPullRequest(ghClient *github.Client, githubBranch string, githubUser string, githubRepoName string) (string, error)
CreateNewPullRequest creates a new pull request from specified `githubBranch` to `main` branch
func DisplaySuccess ¶
func DisplaySuccess(w http.ResponseWriter, githubAccessToken string, prURL string) error
DisplaySuccess function displays success message
func GetFileBlobSHA ¶
func GetFileBlobSHA(ghClient *github.Client, githubBranch string, githubUser string, githubRepoName string, githubFileName string) (string, error)
GetFileBlobSHA returns SHA of given file from given branch
func GetGithubAccessToken ¶
GetGithubAccessToken returns Github access token
func GetGithubClientID ¶
func GetGithubClientID() string
GetGithubClientID returns Github OAuth app client ID from set environment variable CLIENT_ID
func GetGithubClientSecret ¶
func GetGithubClientSecret() string
GetGithubClientSecret returns Github OAuth app client secret from set environment variable CLIENT_SECRET
func GetGithubData ¶
GetGithubData returns Github user data of autorized user
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.