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 CollectPullRequestComments(owner string, repo string, apiClient *GithubApiClient, ...) error
- func CollectPullRequestCommits(owner string, repo string, apiClient *GithubApiClient, ...) error
- func CollectPullRequestReviews(owner string, repo string, apiClient *GithubApiClient, ...) 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) 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 GithubSearchPaginationHandler
- 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, 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
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 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, 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 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"` }
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 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.