Documentation ¶
Index ¶
- Constants
- func ToVCSRepositoryPullRequest(repoOwner, repoName string, pr *githubsdk.PullRequest) vcs.VCSRepositoryPullRequest
- type GithubAppConf
- type GithubBranch
- type GithubCommitsComparison
- type GithubVCSProvider
- type GithubVCSRepository
- func (g *GithubVCSRepository) CompareCommits(base, head string) (vcs.VCSCommitsComparison, error)
- func (g *GithubVCSRepository) CreateOrUpdatePullRequest(tenantId, workflowRunId string, opts *vcs.CreatePullRequestOpts) (*db.GithubPullRequestModel, error)
- func (g *GithubVCSRepository) GetArchiveLink(ref string) (*url.URL, error)
- func (g *GithubVCSRepository) GetBranch(name string) (vcs.VCSBranch, error)
- func (g *GithubVCSRepository) GetKind() vcs.VCSRepositoryKind
- func (g *GithubVCSRepository) GetRepoName() string
- func (g *GithubVCSRepository) GetRepoOwner() string
- func (g *GithubVCSRepository) ReadDirectory(ref, path string) ([]vcs.DirectoryItem, error)
- func (g *GithubVCSRepository) ReadFile(ref, path string) (io.ReadCloser, error)
- func (g *GithubVCSRepository) SetupRepository(tenantId string) error
Constants ¶
View Source
const ( GithubAuthURL string = "https://github.com/login/oauth/authorize" GithubTokenURL string = "https://github.com/login/oauth/access_token" // #nosec G101 )
Variables ¶
This section is empty.
Functions ¶
func ToVCSRepositoryPullRequest ¶
func ToVCSRepositoryPullRequest(repoOwner, repoName string, pr *githubsdk.PullRequest) vcs.VCSRepositoryPullRequest
Types ¶
type GithubAppConf ¶
func NewGithubAppConf ¶
func NewGithubAppConf( cfg *oauth.Config, appName, appSecretPath, appWebhookSecret, appWebhookURL, appID string) (*GithubAppConf, error)
func (*GithubAppConf) GetAppName ¶
func (g *GithubAppConf) GetAppName() string
func (*GithubAppConf) GetGithubClient ¶
func (g *GithubAppConf) GetGithubClient(installationID int64) (*githubsdk.Client, error)
func (*GithubAppConf) GetWebhookSecret ¶
func (g *GithubAppConf) GetWebhookSecret() string
func (*GithubAppConf) GetWebhookURL ¶
func (g *GithubAppConf) GetWebhookURL() string
type GithubBranch ¶
func (*GithubBranch) GetLatestRef ¶
func (g *GithubBranch) GetLatestRef() string
func (*GithubBranch) GetName ¶
func (g *GithubBranch) GetName() string
type GithubCommitsComparison ¶
type GithubCommitsComparison struct {
*githubsdk.CommitsComparison
}
func (*GithubCommitsComparison) GetFiles ¶
func (g *GithubCommitsComparison) GetFiles() []vcs.CommitFile
type GithubVCSProvider ¶
type GithubVCSProvider struct {
// contains filtered or unexported fields
}
func NewGithubVCSProvider ¶
func NewGithubVCSProvider(appConf *GithubAppConf, repo repository.APIRepository, serverURL string, enc encryption.EncryptionService) GithubVCSProvider
func ToGithubVCSProvider ¶
func ToGithubVCSProvider(provider vcs.VCSProvider) (res GithubVCSProvider, err error)
func (GithubVCSProvider) GetGithubAppConfig ¶
func (g GithubVCSProvider) GetGithubAppConfig() *GithubAppConf
func (GithubVCSProvider) GetVCSRepositoryFromWorkflow ¶
func (g GithubVCSProvider) GetVCSRepositoryFromWorkflow(workflow *db.WorkflowModel) (vcs.VCSRepository, error)
type GithubVCSRepository ¶
type GithubVCSRepository struct {
// contains filtered or unexported fields
}
func (*GithubVCSRepository) CompareCommits ¶
func (g *GithubVCSRepository) CompareCommits(base, head string) (vcs.VCSCommitsComparison, error)
CompareCommits compares a base commit with a head commit
func (*GithubVCSRepository) CreateOrUpdatePullRequest ¶
func (g *GithubVCSRepository) CreateOrUpdatePullRequest(tenantId, workflowRunId string, opts *vcs.CreatePullRequestOpts) (*db.GithubPullRequestModel, error)
func (*GithubVCSRepository) GetArchiveLink ¶
func (g *GithubVCSRepository) GetArchiveLink(ref string) (*url.URL, error)
GetArchiveLink returns an archive link for a specific repo SHA
func (*GithubVCSRepository) GetBranch ¶
func (g *GithubVCSRepository) GetBranch(name string) (vcs.VCSBranch, error)
GetBranch gets a full branch (name and sha)
func (*GithubVCSRepository) GetKind ¶
func (g *GithubVCSRepository) GetKind() vcs.VCSRepositoryKind
GetKind returns the kind of VCS provider -- used for downstream integrations
func (*GithubVCSRepository) GetRepoName ¶
func (g *GithubVCSRepository) GetRepoName() string
func (*GithubVCSRepository) GetRepoOwner ¶
func (g *GithubVCSRepository) GetRepoOwner() string
func (*GithubVCSRepository) ReadDirectory ¶
func (g *GithubVCSRepository) ReadDirectory(ref, path string) ([]vcs.DirectoryItem, error)
func (*GithubVCSRepository) ReadFile ¶
func (g *GithubVCSRepository) ReadFile(ref, path string) (io.ReadCloser, error)
ReadFile returns a file by a SHA reference or path
func (*GithubVCSRepository) SetupRepository ¶
func (g *GithubVCSRepository) SetupRepository(tenantId string) error
SetupRepository sets up a VCS repository on Hatchet.
Click to show internal directories.
Click to hide internal directories.