Documentation ¶
Index ¶
- Constants
- func BlameWithGitCommand(repository *git.Repository, commit *object.Commit, file string) ([]*git.Line, error)
- func CloneRepository(url string, path string) (*git.Repository, error)
- func FindLoginByEmail(email string) (string, error)
- func GetRemoteLocation(repository *git.Repository) (string, error)
- func GetRemoteUrl(value string) string
- func GetSource(value string) string
- func IsGitHubAccessTokenProvided() bool
- func IsUseGitCommandProvided() bool
- func OpenRepository(path string) (*git.Repository, error)
- func RenderChartHtml(generateResult *GenerateResult) (string, error)
- func SearchCommits(repository *git.Repository, options *SearchCommitsOptions) ([]*object.Commit, error)
- func ShowSlowMessage()
- type Area
- type AreaAuthor
- type AreaInfo
- type AuthorRegex
- type CountLinesOption
- type CountLinesResult
- type GenerateOptions
- type GenerateResult
- type GenerateResultCommit
- type GenerateResultCommitLineCount
- type GenerateResultCommitLineCountArea
- type GenerateResultCommitLineCountAuthor
- type SearchCommitsOptions
Constants ¶
View Source
const GitHubAccessTokenKey = "KUNITORI_GITHUB_ACCESS_TOKEN"
View Source
const KunitoriSkipRequestGitHubApi = "KUNITORI_SKIP_REQUEST_GITHUB_API"
View Source
const KunitoriUseGitCommandProvidedKey = "KUNITORI_USE_GIT_COMMAND"
View Source
const SearchCommitMaxLimit = 15
Variables ¶
This section is empty.
Functions ¶
func BlameWithGitCommand ¶
func CloneRepository ¶
func FindLoginByEmail ¶
func GetRemoteLocation ¶
func GetRemoteUrl ¶
func IsGitHubAccessTokenProvided ¶
func IsGitHubAccessTokenProvided() bool
func IsUseGitCommandProvided ¶
func IsUseGitCommandProvided() bool
func OpenRepository ¶
func RenderChartHtml ¶
func RenderChartHtml(generateResult *GenerateResult) (string, error)
func SearchCommits ¶
func SearchCommits(repository *git.Repository, options *SearchCommitsOptions) ([]*object.Commit, error)
func ShowSlowMessage ¶
func ShowSlowMessage()
Types ¶
type AreaAuthor ¶
func AllocateAreas ¶
func AllocateAreas(areaInfo *AreaInfo, result *CountLinesResult) ([]*AreaAuthor, error)
type AreaInfo ¶
func GetAreaInfo ¶
type AuthorRegex ¶
type CountLinesOption ¶
type CountLinesOption struct { Filters []*regexp2.Regexp AuthorRegexes []AuthorRegex }
type CountLinesResult ¶
type CountLinesResult struct { Filter *regexp2.Regexp LinesByAuthor map[string]int NameByAuthor map[string]string MatchedFiles []string }
func CountLines ¶
func CountLines(repository *git.Repository, commit *object.Commit, options *CountLinesOption) ([]*CountLinesResult, error)
type GenerateOptions ¶
type GenerateOptions struct { RepositoryUrl string RepositoryPath string Region string SearchCommitsOptions *SearchCommitsOptions CountLinesOption *CountLinesOption }
type GenerateResult ¶
type GenerateResult struct { Repository string `json:"repository"` Source string `json:"source"` GeneratedAt time.Time `json:"generatedAt"` Commits []GenerateResultCommit `json:"commits"` }
func Generate ¶
func Generate(options *GenerateOptions) (*GenerateResult, error)
type GenerateResultCommit ¶
type GenerateResultCommit struct { Hash string `json:"hash"` CommittedAt time.Time `json:"committedAt"` LineCounts []GenerateResultCommitLineCount `json:"lineCounts"` }
type GenerateResultCommitLineCount ¶
type GenerateResultCommitLineCount struct { FilterRegex string `json:"filterRegex"` FileCount int `json:"fileCount"` Areas []GenerateResultCommitLineCountArea `json:"areas"` Authors []GenerateResultCommitLineCountAuthor `json:"authors"` }
Click to show internal directories.
Click to hide internal directories.