Documentation
¶
Index ¶
- Constants
- func CollectCommit(owner string, repo string, repoId int, commit *models.GithubCommit, ...) error
- func CollectCommits(owner string, repo string, repoId int, apiClient *GithubApiClient) error
- func CollectCommitsStat(owner string, repo string, repoId int, apiClient *GithubApiClient, ...) error
- func CollectIssueComments(owner string, repo string, apiClient *GithubApiClient) error
- func CollectIssueEvents(owner string, repo string, apiClient *GithubApiClient) error
- func CollectIssues(owner string, repo string, repoId int, apiClient *GithubApiClient) error
- func CollectPullRequestCommits(ctx context.Context, owner string, repo string, repoId int, ...) error
- func CollectPullRequestReviews(ctx context.Context, owner string, repo string, repoId int, ...) error
- func CollectPullRequests(owner string, repo string, repoId int, apiClient *GithubApiClient) error
- func CollectRepository(owner string, repo string, apiClient *GithubApiClient) (int, error)
- func ConvertCommits(githubRepoId int, ctx context.Context) error
- func ConvertIssueLabels(ctx context.Context, repoId int) error
- func ConvertIssues(ctx context.Context, repoId int) error
- func ConvertNotes(ctx context.Context, repoId int) error
- func ConvertPullRequestIssues(ctx context.Context, repoId int) error
- func ConvertPullRequestLabels(ctx context.Context, repoId int) error
- func ConvertPullRequests(ctx context.Context, repoId int) error
- func ConvertRepos(ctx context.Context) error
- func ConvertUsers(ctx context.Context) error
- func EnrichComments(ctx context.Context, repoId int) error
- func EnrichIssues(ctx context.Context, repoId int) (err error)
- func EnrichPullRequestIssues(ctx context.Context, repoId int, owner string, repo string) (err error)
- func EnrichPullRequests(ctx context.Context, repoId int) (err error)
- func PrCommitConvertor(ctx context.Context, repoId int) (err error)
- func ProcessCollection(owner string, repo string, pr *models.GithubPullRequest, ...) error
- type ApiCommitsResponse
- type ApiIssueCommentResponse
- type ApiIssueEventResponse
- type ApiIssuesResponse
- type ApiPullRequestCommitResponse
- type ApiPullRequestResponse
- type ApiPullRequestReviewResponse
- type ApiRepositoryResponse
- type ApiSingleCommitResponse
- type Commit
- type CommitsResponse
- type GithubApiClient
- type GithubApiPullRequest
- type GithubApiRepo
- type GithubPaginationHandler
- type GithubSearchPaginationHandler
- type IssueComment
- type IssueEvent
- type IssuesResponse
- type PrCommitsResponse
- 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, ctx context.Context, ) error
for addtions and deletions
func CollectCommits ¶
func CollectCommits(owner string, repo string, repoId int, apiClient *GithubApiClient) error
func CollectCommitsStat ¶ added in v0.7.0
func CollectIssueComments ¶ added in v0.3.0
func CollectIssueComments(owner string, repo string, apiClient *GithubApiClient) error
CollectIssueComments will collect both issue and pr comments
func CollectIssueEvents ¶ added in v0.3.0
func CollectIssueEvents(owner string, repo string, apiClient *GithubApiClient) error
func CollectIssues ¶
func CollectIssues(owner string, repo string, repoId int, apiClient *GithubApiClient) error
func CollectPullRequests ¶ added in v0.7.0
func CollectPullRequests( owner string, repo string, repoId int, 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 ConvertPullRequestIssues ¶ added in v0.9.0
func ConvertPullRequestLabels ¶ added in v0.8.0
func ConvertPullRequests ¶ added in v0.6.0
func ConvertRepos ¶ added in v0.6.0
func ConvertUsers ¶ added in v0.6.0
func EnrichComments ¶ added in v0.9.0
EnrichComments will enrich issue comments with issue number also move pr comments to github_pull_request_comments
func EnrichPullRequestIssues ¶ added in v0.9.0
func EnrichPullRequests ¶ added in v0.9.0
func PrCommitConvertor ¶ added in v0.7.0
func ProcessCollection ¶ added in v0.7.0
func ProcessCollection(owner string, repo string, pr *models.GithubPullRequest, 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 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 NewGithubApiClient ¶ added in v0.9.0
func NewGithubApiClient(endpoint string, tokens []string, ctx context.Context, scheduler *utils.WorkerScheduler) *GithubApiClient
func (*GithubApiClient) FetchPages ¶ added in v0.9.0
func (githubApiClient *GithubApiClient) FetchPages(path string, queryParams *url.Values, pageSize int, handler GithubPaginationHandler) error
run all requests in an Ants worker pool conc - number of concurent requests you want to run
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"`
Head struct {
Ref string
Sha string
}
Base struct {
Ref string
Sha string
}
}
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 GithubSearchPaginationHandler ¶ added in v0.9.0
type IssueComment ¶ added in v0.3.0
type IssueEvent ¶ added in v0.3.0
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 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_comments_enricher.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_commit_convertor.go
- github_pull_request_commits_collector.go
- github_pull_request_converter.go
- github_pull_request_enricher.go
- github_pull_request_issue_enricher.go
- github_pull_request_issues_convertor.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.