Documentation
¶
Index ¶
- func CalculateGitHubBlobSHA(fileContent []byte) string
- func CalculateLocalFileSHA(fileContent []byte) string
- type CommitInfo
- type GitFileContentMap
- type GitFilePathInfo
- type RepoFileStatus
- type RepoInfo
- func (r *RepoInfo) BuildRepoRenderConfig() map[string]interface{}
- func (r *RepoInfo) BuildScmURL() string
- func (r *RepoInfo) BuildWebhookInfo(baseURL, appName, token string) *WebhookConfig
- func (r *RepoInfo) CheckValid() error
- func (r *RepoInfo) Encode() map[string]any
- func (r *RepoInfo) GetBranchWithDefault() string
- func (r *RepoInfo) GetRepoNameWithBranch() string
- func (r *RepoInfo) GetRepoOwner() string
- func (r *RepoInfo) GetRepoPath() string
- func (r *RepoInfo) UpdateRepoPathByCloneURL(cloneURL string) error
- type WebhookConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateGitHubBlobSHA ¶ added in v0.10.0
func CalculateLocalFileSHA ¶ added in v0.10.0
CalculateLocalFileSHA is used to calculate file content's md5
Types ¶
type CommitInfo ¶
type CommitInfo struct { CommitMsg string CommitBranch string GitFileMap GitFileContentMap }
type GitFileContentMap ¶
type GitFilePathInfo ¶
GitFilePathInfo contains file local path and remote git path
func GenerateGitFileInfo ¶
func GenerateGitFileInfo(filePaths []string, gitDirPath string) ([]*GitFilePathInfo, error)
unused
type RepoFileStatus ¶
func (*RepoFileStatus) EncodeToGitHubContentOption ¶
func (f *RepoFileStatus) EncodeToGitHubContentOption(commitMsg string) *github.RepositoryContentFileOptions
type RepoInfo ¶
type RepoInfo struct { Owner string `validate:"required_without=Org" mapstructure:"owner,omitempty"` Org string `validate:"required_without=Owner" mapstructure:"org,omitempty"` Repo string `validate:"required" mapstructure:"repo,omitempty"` Branch string `mapstructure:"branch,omitempty"` RepoType string `validate:"oneof=gitlab github" mapstructure:"repoType,omitempty"` // This is config for gitlab CloneURL string `mapstructure:"url,omitempty"` SSHPrivateKey string `mapstructure:"sshPrivateKey,omitempty"` // used for gitlab Namespace string `mapstructure:"nameSpace,omitempty"` BaseURL string `mapstructure:"baseURL,omitempty"` Visibility string `mapstructure:"visibility,omitempty"` // used for GitHub WorkPath string `mapstructure:"workPath,omitempty"` NeedAuth bool `mapstructure:"needAuth,omitempty"` }
func (*RepoInfo) BuildRepoRenderConfig ¶ added in v0.10.0
BuildRepoRenderConfig will generate template render variables
func (*RepoInfo) BuildScmURL ¶ added in v0.10.0
BuildURL return url build from repo struct
func (*RepoInfo) BuildWebhookInfo ¶ added in v0.10.0
func (r *RepoInfo) BuildWebhookInfo(baseURL, appName, token string) *WebhookConfig
func (*RepoInfo) CheckValid ¶ added in v0.10.0
func (*RepoInfo) GetBranchWithDefault ¶ added in v0.10.0
func (*RepoInfo) GetRepoNameWithBranch ¶
func (*RepoInfo) GetRepoOwner ¶
func (*RepoInfo) GetRepoPath ¶
func (*RepoInfo) UpdateRepoPathByCloneURL ¶ added in v0.10.0
type WebhookConfig ¶
Click to show internal directories.
Click to hide internal directories.