Documentation ¶
Index ¶
- Constants
- func CollectCommit(owner string, repo string, repoId int, commit *models.GithubCommit, ...) error
- func CollectCommits(owner string, repo string, repoId int, scheduler *utils.WorkerScheduler, ...) error
- func CollectCommitsStat(owner string, repo string, repoId int, scheduler *utils.WorkerScheduler, ...) error
- func CollectIssueComments(owner string, repo string, scheduler *utils.WorkerScheduler, ...) error
- func CollectIssueEvents(owner string, repo string, scheduler *utils.WorkerScheduler, ...) error
- func CollectIssues(owner string, repo string, repoId int, scheduler *utils.WorkerScheduler, ...) error
- func CollectPullRequestComments(owner string, repo string, scheduler *utils.WorkerScheduler, ...) error
- func CollectPullRequestCommits(owner string, repo string, scheduler *utils.WorkerScheduler, ...) error
- func CollectPullRequestReviews(owner string, repo string, scheduler *utils.WorkerScheduler, ...) error
- func CollectPullRequests(owner string, repo string, repoId int, scheduler *utils.WorkerScheduler, ...) error
- func CollectRepository(owner string, repo string, apiClient *GithubApiClient) (int, error)
- func ConvertCommits(githubRepoId int, ctx context.Context) error
- func ConvertIssueLabels(ctx context.Context) error
- func ConvertIssues(repoId int, ctx context.Context) error
- func ConvertNotes(ctx context.Context) error
- func ConvertPullRequestLabels() error
- func ConvertPullRequests(ctx context.Context) error
- func ConvertRepos(ctx context.Context) error
- func ConvertUsers(ctx context.Context) error
- func EnrichGithubIssues(ctx context.Context) (err error)
- func EnrichGithubPullRequests(repoId int, ctx context.Context) (err error)
- func PrCommitConvertor(ctx context.Context) (err error)
- func ProcessCollection(owner string, repo string, pr *models.GithubPullRequest, ...) error
- type ApiCommitsResponse
- type ApiIssueCommentResponse
- type ApiIssueEventResponse
- type ApiIssuesResponse
- type ApiPullRequestCommentResponse
- type ApiPullRequestCommitResponse
- type ApiPullRequestResponse
- type ApiPullRequestReviewResponse
- type ApiRepositoryResponse
- type ApiSingleCommitResponse
- type Commit
- type CommitsResponse
- type GithubApiClient
- type GithubApiPullRequest
- type GithubApiRepo
- type GithubPaginationHandler
- type IssueComment
- type IssueEvent
- type IssuesResponse
- type PrCommitsResponse
- type PullRequestComment
- type PullRequestCommit
- type PullRequestReview
Constants ¶
View Source
const BatchSize = 100
Variables ¶
This section is empty.
Functions ¶
func CollectCommit ¶
func CollectCommit( owner string, repo string, repoId int, commit *models.GithubCommit, apiClient *GithubApiClient, ) error
for addtions and deletions
func CollectCommits ¶
func CollectCommits(owner string, repo string, repoId int, scheduler *utils.WorkerScheduler, apiClient *GithubApiClient) error
func CollectCommitsStat ¶ added in v0.7.0
func CollectCommitsStat( owner string, repo string, repoId int, scheduler *utils.WorkerScheduler, apiClient *GithubApiClient, ) error
func CollectIssueComments ¶ added in v0.3.0
func CollectIssueComments(owner string, repo string, scheduler *utils.WorkerScheduler, apiClient *GithubApiClient) error
func CollectIssueEvents ¶ added in v0.3.0
func CollectIssueEvents(owner string, repo string, scheduler *utils.WorkerScheduler, apiClient *GithubApiClient) error
func CollectIssues ¶
func CollectIssues(owner string, repo string, repoId int, scheduler *utils.WorkerScheduler, apiClient *GithubApiClient) error
func CollectPullRequestComments ¶
func CollectPullRequestComments(owner string, repo string, scheduler *utils.WorkerScheduler, apiClient *GithubApiClient) error
func CollectPullRequestCommits ¶
func CollectPullRequestCommits(owner string, repo string, scheduler *utils.WorkerScheduler, apiClient *GithubApiClient) error
func CollectPullRequestReviews ¶
func CollectPullRequestReviews(owner string, repo string, scheduler *utils.WorkerScheduler, apiClient *GithubApiClient) error
func CollectPullRequests ¶ added in v0.7.0
func CollectPullRequests( owner string, repo string, repoId int, scheduler *utils.WorkerScheduler, apiClient *GithubApiClient, ) error
func CollectRepository ¶
func CollectRepository(owner string, repo string, apiClient *GithubApiClient) (int, error)
func ConvertCommits ¶ added in v0.6.0
func ConvertIssueLabels ¶ added in v0.7.0
func ConvertNotes ¶ added in v0.6.0
func ConvertPullRequestLabels ¶ added in v0.8.0
func ConvertPullRequestLabels() error
func ConvertPullRequests ¶ added in v0.6.0
func ConvertRepos ¶ added in v0.6.0
func ConvertUsers ¶ added in v0.6.0
func EnrichGithubIssues ¶ added in v0.7.0
func EnrichGithubPullRequests ¶ added in v0.7.0
func PrCommitConvertor ¶ added in v0.7.0
func ProcessCollection ¶ added in v0.7.0
func ProcessCollection(owner string, repo string, pr *models.GithubPullRequest, scheduler *utils.WorkerScheduler, apiClient *GithubApiClient) error
Types ¶
type ApiCommitsResponse ¶
type ApiCommitsResponse []CommitsResponse
type ApiIssueCommentResponse ¶ added in v0.3.0
type ApiIssueCommentResponse []IssueComment
type ApiIssueEventResponse ¶ added in v0.3.0
type ApiIssueEventResponse []IssueEvent
type ApiIssuesResponse ¶
type ApiIssuesResponse []IssuesResponse
type ApiPullRequestCommentResponse ¶
type ApiPullRequestCommentResponse []PullRequestComment
type ApiPullRequestCommitResponse ¶
type ApiPullRequestCommitResponse []PrCommitsResponse
type ApiPullRequestResponse ¶ added in v0.7.0
type ApiPullRequestResponse []GithubApiPullRequest
type ApiPullRequestReviewResponse ¶
type ApiPullRequestReviewResponse []PullRequestReview
type ApiRepositoryResponse ¶
type ApiRepositoryResponse GithubApiRepo
type ApiSingleCommitResponse ¶
type Commit ¶
type Commit struct { Author struct { Name string Email string Date core.Iso8601Time } Committer struct { Name string Email string Date core.Iso8601Time } Message string }
type CommitsResponse ¶
type CommitsResponse struct { Sha string `json:"sha"` Commit Commit Url string Author *models.GithubUser Committer *models.GithubUser }
type GithubApiClient ¶
func CreateApiClient ¶
func CreateApiClient(endpoint string, tokens []string, ctx context.Context) *GithubApiClient
func (*GithubApiClient) FetchWithPaginationAnts ¶
func (githubApiClient *GithubApiClient) FetchWithPaginationAnts(path string, queryParams *url.Values, pageSize int, conc int, scheduler *utils.WorkerScheduler, handler GithubPaginationHandler) error
run all requests in an Ants worker pool conc - number of concurent requests you want to run
func (*GithubApiClient) RunConcurrently ¶ added in v0.4.0
func (githubApiClient *GithubApiClient) RunConcurrently(path string, queryParams *url.Values, pageSize int, conc int, scheduler *utils.WorkerScheduler, handler GithubPaginationHandler) error
This method exists in the case where we do not know how many pages of data we have to fetch This loops through the data in chunks of `conc` and if there is any request in there with no data returned, we assume we are at the end of the data required to fetch This is needed since we do not want to make a request to get the paging details first since the rate limit for github is so low
type GithubApiPullRequest ¶ added in v0.7.0
type GithubApiPullRequest struct { GithubId int `json:"id"` Number int State string Title string Body string Labels []struct { Name string `json:"name"` } `json:"labels"` Assignee *struct { Login string Id int } ClosedAt *core.Iso8601Time `json:"closed_at"` MergedAt *core.Iso8601Time `json:"merged_at"` GithubCreatedAt core.Iso8601Time `json:"created_at"` GithubUpdatedAt *core.Iso8601Time `json:"updated_at"` MergeCommitSha string `json:"merge_commit_sha"` }
type GithubApiRepo ¶ added in v0.6.0
type GithubApiRepo struct { Name string `json:"name"` GithubId int `json:"id"` HTMLUrl string `json:"html_url"` Language string `json:"language"` Description string `json:"description"` Owner models.GithubUser Parent *GithubApiRepo `json:"parent"` CreatedAt core.Iso8601Time `json:"created_at"` UpdatedAt *core.Iso8601Time `json:"updated_at"` }
type GithubPaginationHandler ¶
type IssueComment ¶ added in v0.3.0
type IssueComment struct { GithubId int `json:"id"` Body string User struct { Login string } GithubCreatedAt core.Iso8601Time `json:"created_at"` }
type IssueEvent ¶ added in v0.3.0
type IssueEvent struct { GithubId int `json:"id"` Event string Actor struct { Login string } GithubCreatedAt core.Iso8601Time `json:"created_at"` }
type IssuesResponse ¶
type IssuesResponse struct { GithubId int `json:"id"` Number int State string Title string Body string PullRequest struct { Url string `json:"url"` HtmlUrl string `json:"html_url"` } `json:"pull_request"` Labels []struct { Name string `json:"name"` } `json:"labels"` Assignee *struct { Login string Id int } ClosedAt *core.Iso8601Time `json:"closed_at"` GithubCreatedAt core.Iso8601Time `json:"created_at"` GithubUpdatedAt core.Iso8601Time `json:"updated_at"` }
type PrCommitsResponse ¶
type PrCommitsResponse struct { Sha string `json:"sha"` Commit PullRequestCommit Url string }
type PullRequestComment ¶ added in v0.3.0
type PullRequestComment struct { GithubId int `json:"id"` Body string User struct { Login string } GithubCreatedAt core.Iso8601Time `json:"created_at"` }
type PullRequestCommit ¶ added in v0.7.0
type PullRequestCommit struct { Author struct { Name string Email string Date core.Iso8601Time } Committer struct { Name string Email string Date core.Iso8601Time } Message string }
type PullRequestReview ¶
Source Files ¶
- github_api_client.go
- github_commit_collector.go
- github_commit_converter.go
- github_issue_collector.go
- github_issue_comments_collector.go
- github_issue_converter.go
- github_issue_enricher.go
- github_issue_events_collector.go
- github_issue_labels_convertor.go
- github_note_converter.go
- github_pull_request_collector.go
- github_pull_request_comments_collector.go
- github_pull_request_commit_convertor.go
- github_pull_request_commits_collector.go
- github_pull_request_converter.go
- github_pull_request_enricher.go
- github_pull_request_labels_convertor.go
- github_pull_request_reviewer_collector.go
- github_repo_collector.go
- github_repo_converter.go
- github_user_converter.go
Click to show internal directories.
Click to hide internal directories.