Documentation
¶
Index ¶
- type Auth
- type GitHubApp
- func (ghApp *GitHubApp) Add(path string) error
- func (ghApp *GitHubApp) Clone() error
- func (ghApp *GitHubApp) Commit(msg string, user UserInfo) error
- func (ghApp *GitHubApp) GetAccessToken() (string, error)
- func (ghApp *GitHubApp) HasChanges() bool
- func (ghApp *GitHubApp) NewBranch(name string, checkout bool) error
- func (ghApp *GitHubApp) NewPullRequest(source, target, title, body string) error
- func (ghApp *GitHubApp) Push() error
- type GitHubAppConfig
- type PullRequest
- type TokenResponse
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHubApp ¶
type GitHubApp struct { Config *GitHubAppConfig Auth Auth // contains filtered or unexported fields }
GitHubApp is a struct to interact with GitHub App's API
func NewGitHubApp ¶
func NewGitHubApp(cfg *GitHubAppConfig) (*GitHubApp, error)
Creates a new GitHubApp struct configured by GitHubAppConfig
func (*GitHubApp) GetAccessToken ¶
Gets the access token to authenticate with github
func (*GitHubApp) HasChanges ¶
Check if repo has local changes
func (*GitHubApp) NewPullRequest ¶ added in v0.1.11
Create new pull request
type GitHubAppConfig ¶
type GitHubAppConfig struct { RepoURL string ApplicationID int64 InstallationID int64 LocalPath string PrivateKey []byte PrivateKeyFile string // contains filtered or unexported fields }
Configuration for the GitHub App interaction
type PullRequest ¶ added in v0.1.11
PullRequest information
type TokenResponse ¶
type TokenResponse struct {
Token string `json:"token"`
}
TokenResponse is a struct that represents the response from the API
Click to show internal directories.
Click to hide internal directories.