Documentation
¶
Index ¶
- Constants
- type BasicContributor
- type Contributor
- type ContributorDetailedSummary
- type CountContributorsCommand
- func (cc *CountContributorsCommand) CommandName() string
- func (cc *CountContributorsCommand) GetCommitsWithQueryOptions(repo string, options vcsclient.GitCommitsQueryOptions) ([]vcsclient.CommitInfo, error)
- func (cc *CountContributorsCommand) Run() error
- func (cc *CountContributorsCommand) ServerDetails() (*config.ServerDetails, error)
- type CountContributorsParams
- type LastCommit
- type RepoLastCommit
- type Report
- type RepositoryDetailedSummary
- type ScmType
Constants ¶
View Source
const ( Github = scmTypeName("github") Gitlab = scmTypeName("gitlab") BitbucketServer = scmTypeName("bitbucket") DefaultContContributorsMonths = 1 GithubTokenEnvVar = "JFROG_CLI_GITHUB_TOKEN" // #nosec G101 GitlabTokenEnvVar = "JFROG_CLI_GITLAB_TOKEN" // #nosec G101 BitbucketTokenEnvVar = "JFROG_CLI_BITBUCKET_TOKEN" // #nosec G101 GenericGitTokenEnvVar = "JF_GIT_TOKEN" // #nosec G101 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicContributor ¶
type Contributor ¶
type Contributor struct {
Email string `json:"email"`
Name string `json:"name"`
RepoLastCommit RepoLastCommit `json:"last_commit"`
}
type ContributorDetailedSummary ¶
type ContributorDetailedSummary struct {
RepoPath string `json:"repo_path"`
LastCommit LastCommit `json:"last_commit"`
}
type CountContributorsCommand ¶
type CountContributorsCommand struct {
CountContributorsParams
// contains filtered or unexported fields
}
func NewCountContributorsCommand ¶
func NewCountContributorsCommand(params *CountContributorsParams) (*CountContributorsCommand, error)
func (*CountContributorsCommand) CommandName ¶
func (cc *CountContributorsCommand) CommandName() string
The command name for the usage report.
func (*CountContributorsCommand) GetCommitsWithQueryOptions ¶
func (cc *CountContributorsCommand) GetCommitsWithQueryOptions(repo string, options vcsclient.GitCommitsQueryOptions) ([]vcsclient.CommitInfo, error)
func (*CountContributorsCommand) Run ¶
func (cc *CountContributorsCommand) Run() error
func (*CountContributorsCommand) ServerDetails ¶
func (cc *CountContributorsCommand) ServerDetails() (*config.ServerDetails, error)
Returns the Server details. The usage report is sent to this server.
type CountContributorsParams ¶
type CountContributorsParams struct {
// SCM type.
ScmType vcsutils.VcsProvider
// SCM API URL. For example: 'https://api.github.com'.
ScmApiUrl string
// SCM API token.
Token string
// Depends on the git provider - on GitHub and GitLab the owner is usually an individual or an organization, on bitbucket it is a project.
Owner string
// Specific repository name to analyze, If not provided all repositories in the project will be analyzed.
Repository string
// Number of months to analyze.
MonthsNum int
// Detailed summery flag.
DetailedSummery bool
// Progress bar.
Progress ioUtils.ProgressMgr
}
func (*CountContributorsParams) SetProgress ¶
func (ccp *CountContributorsParams) SetProgress(progress ioUtils.ProgressMgr)
type LastCommit ¶
type RepoLastCommit ¶
type RepoLastCommit struct {
Repo string `json:"repo,omitempty"`
LastCommit
}
type Report ¶
type Report struct {
TotalUniqueContributors int `json:"total_unique_contributors"`
TotalCommits int `json:"total_commits"`
ScannedRepos []string `json:"scanned_repos"`
SkippedRepos []string `json:"skipped_repos,omitempty"`
ReportDate string `json:"report_date"`
NumberOfMonths string `json:"number_of_months"`
UniqueContributorsList []Contributor `json:"unique_contributors_list"`
DetailedContributorsList map[string][]ContributorDetailedSummary `json:"detailed_contributors_list,omitempty"`
DetailedReposList map[string][]RepositoryDetailedSummary `json:"detailed_repos_list,omitempty"`
}
type RepositoryDetailedSummary ¶
type RepositoryDetailedSummary struct {
Email string `json:"email"`
LastCommit LastCommit `json:"last_commit"`
}
type ScmType ¶
type ScmType struct {
ScmTypeMap map[string]vcsutils.VcsProvider
}
ScmType represents the valid values that can be provided to the 'scmTypeName' flag.
func NewScmType ¶
func NewScmType() *ScmType
func (*ScmType) GetOptionalScmTypeTokenEnvVars ¶
func (*ScmType) GetValidScmTypeString ¶
Click to show internal directories.
Click to hide internal directories.