Documentation ¶
Index ¶
- func CollectAllPipelines(projectId int, gitlabApiClient *GitlabApiClient) error
- func CollectChildrenOnPipelines(projectIdInt int, gitlabApiClient *GitlabApiClient) error
- func CollectCommits(ctx context.Context, projectId int, gitlabApiClient *GitlabApiClient) error
- func CollectMergeRequestCommits(ctx context.Context, projectId int, rateLimitPerSecondInt int, ...) error
- func CollectMergeRequestNotes(ctx context.Context, projectId int, rateLimitPerSecondInt int, ...) error
- func CollectMergeRequests(ctx context.Context, projectId int, gitlabApiClient *GitlabApiClient) error
- func CollectProject(ctx context.Context, projectId int, gitlabApiClient *GitlabApiClient) error
- func CollectTags(ctx context.Context, projectId int, gitlabApiClient *GitlabApiClient) error
- func ConvertCommit(commit *GitlabApiCommit) (*models.GitlabCommit, error)
- func ConvertCommits(projectId int) error
- func ConvertMrs(ctx context.Context, projectId int) error
- func ConvertNotes(ctx context.Context, projectId int) error
- func ConvertProjects(ctx context.Context, projectId int) error
- func CreateReviewers(projectId int, mergeRequestId int, reviewers []Reviewer)
- func EnrichMergeRequests(ctx context.Context, projectId int) error
- type ApiCommitResponse
- type ApiMergeRequestCommitResponse
- type ApiMergeRequestNoteResponse
- type ApiMergeRequestResponse
- type ApiPipeline
- type ApiPipelineResponse
- type ApiSinglePipelineResponse
- type ApiTagsResponse
- type GitlabApiClient
- type GitlabApiCommit
- type GitlabApiProject
- type GitlabApiProjectResponse
- type GitlabApiTag
- type GitlabPaginationHandler
- type MergeRequestNote
- type MergeRequestRes
- type Reviewer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectAllPipelines ¶
func CollectAllPipelines(projectId int, gitlabApiClient *GitlabApiClient) error
func CollectChildrenOnPipelines ¶
func CollectChildrenOnPipelines(projectIdInt int, gitlabApiClient *GitlabApiClient) error
func CollectCommits ¶
func CollectCommits(ctx context.Context, projectId int, gitlabApiClient *GitlabApiClient) error
func CollectMergeRequests ¶
func CollectMergeRequests(ctx context.Context, projectId int, gitlabApiClient *GitlabApiClient) error
func CollectProject ¶
func CollectProject(ctx context.Context, projectId int, gitlabApiClient *GitlabApiClient) error
func CollectTags ¶ added in v0.9.0
func CollectTags(ctx context.Context, projectId int, gitlabApiClient *GitlabApiClient) error
func ConvertCommit ¶ added in v0.9.0
func ConvertCommit(commit *GitlabApiCommit) (*models.GitlabCommit, error)
Convert the API response to our DB model instance
func ConvertCommits ¶ added in v0.6.0
func ConvertProjects ¶ added in v0.6.0
func CreateReviewers ¶
Types ¶
type ApiCommitResponse ¶
type ApiCommitResponse []GitlabApiCommit
type ApiMergeRequestCommitResponse ¶
type ApiMergeRequestCommitResponse []GitlabApiCommit
type ApiMergeRequestNoteResponse ¶
type ApiMergeRequestNoteResponse []MergeRequestNote
type ApiMergeRequestResponse ¶
type ApiMergeRequestResponse []MergeRequestRes
type ApiPipeline ¶ added in v0.4.0
type ApiPipelineResponse ¶
type ApiPipelineResponse []ApiPipeline
type ApiSinglePipelineResponse ¶
type ApiSinglePipelineResponse struct { GitlabId int `json:"id"` ProjectId int `json:"project_id"` GitlabCreatedAt core.Iso8601Time `json:"created_at"` Ref string Sha string WebUrl string `json:"web_url"` Duration int StartedAt *core.Iso8601Time `json:"started_at"` FinishedAt *core.Iso8601Time `json:"finished_at"` Coverage string Status string }
type ApiTagsResponse ¶ added in v0.9.0
type ApiTagsResponse []GitlabApiTag
type GitlabApiClient ¶
func CreateApiClient ¶
func CreateApiClient(scheduler *utils.WorkerScheduler) *GitlabApiClient
func (*GitlabApiClient) FetchWithPagination ¶
func (gitlabApiClient *GitlabApiClient) FetchWithPagination(path string, queryParams *url.Values, pageSize int, handler GitlabPaginationHandler) error
fetch paginated without ANTS worker pool
func (*GitlabApiClient) FetchWithPaginationAnts ¶
func (gitlabApiClient *GitlabApiClient) FetchWithPaginationAnts(path string, queryParams *url.Values, pageSize int, handler GitlabPaginationHandler) error
run all requests in an Ants worker pool
type GitlabApiCommit ¶ added in v0.4.0
type GitlabApiCommit struct { GitlabId string `json:"id"` Title string Message string ProjectId int ShortId string `json:"short_id"` AuthorName string `json:"author_name"` AuthorEmail string `json:"author_email"` AuthoredDate core.Iso8601Time `json:"authored_date"` CommitterName string `json:"committer_name"` CommitterEmail string `json:"committer_email"` CommittedDate core.Iso8601Time `json:"committed_date"` WebUrl string `json:"web_url"` Stats struct { Additions int Deletions int Total int } }
type GitlabApiProject ¶ added in v0.6.0
type GitlabApiProject struct { GitlabId int `json:"id"` Name string `josn:"name"` Description string `json:"description"` DefaultBranch string `json:"default_branch"` PathWithNamespace string `json:"path_with_namespace"` WebUrl string `json:"web_url"` CreatorId int Visibility string `json:"visibility"` OpenIssuesCount int `json:"open_issues_count"` StarCount int `json:"star_count"` ForkedFromProject *GitlabApiProject `json:"forked_from_project"` CreatedAt core.Iso8601Time `json:"created_at"` LastActivityAt *core.Iso8601Time `json:"last_activity_at"` }
type GitlabApiProjectResponse ¶ added in v0.6.0
type GitlabApiProjectResponse GitlabApiProject
type GitlabApiTag ¶ added in v0.9.0
type GitlabPaginationHandler ¶
type MergeRequestNote ¶
type MergeRequestNote struct { GitlabId int `json:"id"` MergeRequestId int `json:"noteable_id"` MergeRequestIid int `json:"noteable_iid"` NoteableType string `json:"noteable_type"` Body string GitlabCreatedAt core.Iso8601Time `json:"created_at"` Confidential bool Resolvable bool `json:"resolvable"` System bool `json:"system"` Author struct { Username string `json:"username"` } }
type MergeRequestRes ¶
type MergeRequestRes struct { GitlabId int `json:"id"` Iid int ProjectId int `json:"project_id"` State string Title string Description string WebUrl string `json:"web_url"` UserNotesCount int `json:"user_notes_count"` WorkInProgress bool `json:"work_in_progress"` SourceBranch string `json:"source_branch"` GitlabCreatedAt core.Iso8601Time `json:"created_at"` MergedAt *core.Iso8601Time `json:"merged_at"` ClosedAt *core.Iso8601Time `json:"closed_at"` MergedBy struct { Username string `json:"username"` } `json:"merged_by"` Author struct { Username string `json:"username"` } Reviewers []Reviewer FirstCommentTime core.Iso8601Time }
Source Files ¶
- gitlab_api_client.go
- gitlab_commit_collector.go
- gitlab_commit_converter.go
- gitlab_merge_request_collector.go
- gitlab_merge_request_commits_collector.go
- gitlab_merge_request_converter.go
- gitlab_merge_request_enricher.go
- gitlab_merge_request_notes_collector.go
- gitlab_merge_request_reviewer.go
- gitlab_note_converter.go
- gitlab_pipeline_collector.go
- gitlab_project_collector.go
- gitlab_project_converter.go
- gitlab_tag_collector.go
Click to show internal directories.
Click to hide internal directories.