Documentation ¶
Index ¶
- Constants
- func BuildCommitChangelog(commitHistory []*model.Commit, progressChan chan *model.ProgressUpdate, ...) ([]*model.Commit, []error)
- func CheckLocalRepoAvailable(dir string) bool
- func ConvertGithubCommitsIntoModel(ghCommits []*APICommit, progressChan chan *model.ProgressUpdate, ...) ([]*model.Commit, []error)
- func ExtractHistoryFromFile(repoDirectory, filePath string, progressChan chan *model.ProgressUpdate, ...) ([]*model.Commit, []error)
- func ExtractPathAndFile(location string) (string, string)
- func GetTopLevel(dir string) (string, error)
- func PopulateHistoryWithChanges(commitHistory []*model.Commit, limit int, ...) ([]*model.Commit, []error)
- func ProcessGithubRepo(username string, repo string, filePath string, ...) ([]*model.Commit, []error)
- type APICommit
- type APICommitAuthor
- type APICommitDetails
- type APIFile
Constants ¶
View Source
const ( GIT = "git" LOG = "log" SHOW = "show" REVPARSE = "rev-parse" TOPLEVEL = "--show-toplevel" NOPAGER = "--no-pager" LOGFORMAT = "--pretty=%cD||%h||%s||%an||%ae" DIV = "--" )
View Source
const GithubAuthHeader = "Authorization"
View Source
const GithubRepoAPI = "https://api.github.com/repos/"
View Source
const GithubToken = "GH_TOKEN"
Variables ¶
This section is empty.
Functions ¶
func BuildCommitChangelog ¶
func CheckLocalRepoAvailable ¶
func ConvertGithubCommitsIntoModel ¶
func ConvertGithubCommitsIntoModel(ghCommits []*APICommit, progressChan chan *model.ProgressUpdate, progressErrorChan chan model.ProgressError, base string, remote bool) ([]*model.Commit, []error)
func ExtractHistoryFromFile ¶
func ExtractHistoryFromFile(repoDirectory, filePath string, progressChan chan *model.ProgressUpdate, errorChan chan model.ProgressError) ([]*model.Commit, []error)
func ExtractPathAndFile ¶
func GetTopLevel ¶
Types ¶
type APICommit ¶
type APICommit struct { Hash string `json:"sha"` CommitDetails *APICommitDetails `json:"commit"` URL string `json:"url"` Files []*APIFile `json:"files"` }
func GetCommitsForGithubFile ¶
func GetCommitsForGithubFile(user, repo, path string, progressChan chan *model.ProgressUpdate, progressErrorChan chan model.ProgressError, forceCutoff bool, limit int) ([]*APICommit, error)
type APICommitAuthor ¶
type APICommitDetails ¶
type APICommitDetails struct { Author *APICommitAuthor `json:"author"` Message string `json:"message"` URL string `json:"url"` }
Click to show internal directories.
Click to hide internal directories.