tasks

package
v0.10.0-k8s3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const RAW_COMMENTS_TABLE = "github_api_comments"
View Source
const RAW_COMMIT_STATS_TABLE = "github_api_commit_stats"
View Source
const RAW_COMMIT_TABLE = "github_api_commits"
View Source
const RAW_EVENTS_TABLE = "github_api_events"
View Source
const RAW_ISSUE_TABLE = "github_api_issues"
View Source
const RAW_PULL_REQUEST_COMMIT_TABLE = "github_api_pull_request_commits"
View Source
const RAW_PULL_REQUEST_REVIEW_TABLE = "github_api_pull_request_reviews"
View Source
const RAW_PULL_REQUEST_TABLE = "github_api_pull_requests"
View Source
const RAW_REPOSITORIES_TABLE = "github_api_repositories"

Variables

View Source
var CollectApiCommentsMeta = core.SubTaskMeta{
	Name:             "collectApiComments",
	EntryPoint:       CollectApiComments,
	EnabledByDefault: true,
	Description:      "Collect comments data from Github api",
}
View Source
var CollectApiCommitStatsMeta = core.SubTaskMeta{
	Name:             "collectApiCommitStats",
	EntryPoint:       CollectApiCommitStats,
	EnabledByDefault: false,
	Description:      "Collect commitStats data from Github api",
}
View Source
var CollectApiCommitsMeta = core.SubTaskMeta{
	Name:             "collectApiCommits",
	EntryPoint:       CollectApiCommits,
	EnabledByDefault: false,
	Description:      "Collect commits data from Github api",
}
View Source
var CollectApiEventsMeta = core.SubTaskMeta{
	Name:             "collectApiEvents",
	EntryPoint:       CollectApiEvents,
	EnabledByDefault: true,
	Description:      "Collect Events data from Github api",
}
View Source
var CollectApiIssuesMeta = core.SubTaskMeta{
	Name:             "collectApiIssues",
	EntryPoint:       CollectApiIssues,
	EnabledByDefault: true,
	Description:      "Collect issues data from Github api",
}
View Source
var CollectApiPullRequestCommitsMeta = core.SubTaskMeta{
	Name:             "collectApiPullRequestCommits",
	EntryPoint:       CollectApiPullRequestCommits,
	EnabledByDefault: true,
	Description:      "Collect PullRequestCommits data from Github api",
}
View Source
var CollectApiPullRequestReviewsMeta = core.SubTaskMeta{
	Name:             "collectApiPullRequestReviews",
	EntryPoint:       CollectApiPullRequestReviews,
	EnabledByDefault: true,
	Description:      "Collect PullRequestReviews data from Github api",
}
View Source
var CollectApiPullRequestsMeta = core.SubTaskMeta{
	Name:             "collectApiPullRequests",
	EntryPoint:       CollectApiPullRequests,
	EnabledByDefault: true,
	Description:      "Collect PullRequests data from Github api",
}
View Source
var CollectApiRepoMeta = core.SubTaskMeta{
	Name:        "collectApiRepo",
	EntryPoint:  CollectApiRepositories,
	Required:    true,
	Description: "Collect repositories data from Github api",
}
View Source
var ConvertCommitsMeta = core.SubTaskMeta{
	Name:             "convertCommits",
	EntryPoint:       ConvertCommits,
	EnabledByDefault: false,
	Description:      "Convert tool layer table github_commits into  domain layer table commits",
}
View Source
var ConvertIssueCommentsMeta = core.SubTaskMeta{
	Name:             "convertIssueComments",
	EntryPoint:       ConvertIssueComments,
	EnabledByDefault: true,
	Description:      "ConvertIssueComments data from Github api",
}
View Source
var ConvertIssueLabelsMeta = core.SubTaskMeta{
	Name:             "convertIssueLabels",
	EntryPoint:       ConvertIssueLabels,
	EnabledByDefault: true,
	Description:      "Convert tool layer table github_issue_labels into  domain layer table issue_labels",
}
View Source
var ConvertIssuesMeta = core.SubTaskMeta{
	Name:             "convertIssues",
	EntryPoint:       ConvertIssues,
	EnabledByDefault: true,
	Description:      "Convert tool layer table github_issues into  domain layer table issues",
}
View Source
var ConvertPullRequestCommentsMeta = core.SubTaskMeta{
	Name:             "convertPullRequestComments",
	EntryPoint:       ConvertPullRequestComments,
	EnabledByDefault: true,
	Description:      "ConvertPullRequestComments data from Github api",
}
View Source
var ConvertPullRequestCommitsMeta = core.SubTaskMeta{
	Name:             "convertPullRequestCommits",
	EntryPoint:       ConvertPullRequestCommits,
	EnabledByDefault: true,
	Description:      "Convert tool layer table github_pull_request_commits into  domain layer table pull_request_commits",
}
View Source
var ConvertPullRequestIssuesMeta = core.SubTaskMeta{
	Name:             "convertPullRequestIssues",
	EntryPoint:       ConvertPullRequestIssues,
	EnabledByDefault: true,
	Description:      "Convert tool layer table github_pull_request_issues into  domain layer table pull_request_issues",
}
View Source
var ConvertPullRequestLabelsMeta = core.SubTaskMeta{
	Name:             "convertPullRequestLabels",
	EntryPoint:       ConvertPullRequestLabels,
	EnabledByDefault: true,
	Description:      "Convert tool layer table github_pull_request_labels into  domain layer table pull_request_labels",
}
View Source
var ConvertPullRequestsMeta = core.SubTaskMeta{
	Name:             "convertPullRequests",
	EntryPoint:       ConvertPullRequests,
	EnabledByDefault: true,
	Description:      "ConvertPullRequests data from Github api",
}
View Source
var ConvertRepoMeta = core.SubTaskMeta{
	Name:             "convertRepo",
	EntryPoint:       ConvertRepo,
	EnabledByDefault: true,
	Description:      "Convert tool layer table github_repos into  domain layer table repos and boards",
}
View Source
var ConvertUsersMeta = core.SubTaskMeta{
	Name:             "convertUsers",
	EntryPoint:       ConvertUsers,
	EnabledByDefault: true,
	Description:      "Convert tool layer table github_users into  domain layer table users",
}
View Source
var EnrichPullRequestIssuesMeta = core.SubTaskMeta{
	Name:             "enrichPullRequestIssues",
	EntryPoint:       EnrichPullRequestIssues,
	EnabledByDefault: true,
	Description:      "Create tool layer table github_pull_request_issues from github_pull_reqeusts",
}
View Source
var ExtractApiCommentsMeta = core.SubTaskMeta{
	Name:             "extractApiComments",
	EntryPoint:       ExtractApiComments,
	EnabledByDefault: true,
	Description: "Extract raw comment data  into tool layer table github_pull_request_comments" +
		"and github_issue_comments",
}
View Source
var ExtractApiCommitStatsMeta = core.SubTaskMeta{
	Name:             "extractApiCommitStats",
	EntryPoint:       ExtractApiCommitStats,
	EnabledByDefault: false,
	Description:      "Extract raw commit stats data into tool layer table github_commit_stats",
}
View Source
var ExtractApiCommitsMeta = core.SubTaskMeta{
	Name:             "extractApiCommits",
	EntryPoint:       ExtractApiCommits,
	EnabledByDefault: false,
	Description:      "Extract raw commit data into tool layer table github_commits",
}
View Source
var ExtractApiEventsMeta = core.SubTaskMeta{
	Name:             "extractApiEvents",
	EntryPoint:       ExtractApiEvents,
	EnabledByDefault: true,
	Description:      "Extract raw Events data into tool layer table github_issue_events",
}
View Source
var ExtractApiIssuesMeta = core.SubTaskMeta{
	Name:             "extractApiIssues",
	EntryPoint:       ExtractApiIssues,
	EnabledByDefault: true,
	Description:      "Extract raw Issues data into tool layer table github_issues",
}
View Source
var ExtractApiPullRequestCommitsMeta = core.SubTaskMeta{
	Name:             "extractApiPullRequestCommits",
	EntryPoint:       ExtractApiPullRequestCommits,
	EnabledByDefault: true,
	Description:      "Extract raw PullRequestCommits data into tool layer table github_commits",
}
View Source
var ExtractApiPullRequestReviewsMeta = core.SubTaskMeta{
	Name:             "extractApiPullRequestReviews",
	EntryPoint:       ExtractApiPullRequestReviews,
	EnabledByDefault: true,
	Description:      "Extract raw PullRequestReviews data into tool layer table github_reviewers",
}
View Source
var ExtractApiPullRequestsMeta = core.SubTaskMeta{
	Name:             "extractApiPullRequests",
	EntryPoint:       ExtractApiPullRequests,
	EnabledByDefault: true,
	Description:      "Extract raw PullRequests data into tool layer table github_pull_requests",
}
View Source
var ExtractApiRepoMeta = core.SubTaskMeta{
	Name:        "extractApiRepo",
	EntryPoint:  ExtractApiRepositories,
	Required:    true,
	Description: "Extract raw Repositories data into tool layer table github_repos",
}

Functions

func CollectApiComments added in v0.10.0

func CollectApiComments(taskCtx core.SubTaskContext) error

func CollectApiCommitStats added in v0.10.0

func CollectApiCommitStats(taskCtx core.SubTaskContext) error

func CollectApiCommits added in v0.10.0

func CollectApiCommits(taskCtx core.SubTaskContext) error

func CollectApiEvents added in v0.10.0

func CollectApiEvents(taskCtx core.SubTaskContext) error

func CollectApiIssues added in v0.10.0

func CollectApiIssues(taskCtx core.SubTaskContext) error

func CollectApiPullRequestCommits added in v0.10.0

func CollectApiPullRequestCommits(taskCtx core.SubTaskContext) error

func CollectApiPullRequestReviews added in v0.10.0

func CollectApiPullRequestReviews(taskCtx core.SubTaskContext) error

func CollectApiPullRequests added in v0.10.0

func CollectApiPullRequests(taskCtx core.SubTaskContext) error

func CollectApiRepositories added in v0.10.0

func CollectApiRepositories(taskCtx core.SubTaskContext) error

func ConvertCommits added in v0.6.0

func ConvertCommits(taskCtx core.SubTaskContext) error

func ConvertIssueComments added in v0.10.0

func ConvertIssueComments(taskCtx core.SubTaskContext) error

func ConvertIssueLabels added in v0.7.0

func ConvertIssueLabels(taskCtx core.SubTaskContext) error

func ConvertIssues added in v0.6.0

func ConvertIssues(taskCtx core.SubTaskContext) error

func ConvertPullRequestComments added in v0.10.0

func ConvertPullRequestComments(taskCtx core.SubTaskContext) error

func ConvertPullRequestCommits added in v0.10.0

func ConvertPullRequestCommits(taskCtx core.SubTaskContext) (err error)

func ConvertPullRequestIssues added in v0.9.0

func ConvertPullRequestIssues(taskCtx core.SubTaskContext) error

func ConvertPullRequestLabels added in v0.8.0

func ConvertPullRequestLabels(taskCtx core.SubTaskContext) error

func ConvertPullRequests added in v0.6.0

func ConvertPullRequests(taskCtx core.SubTaskContext) error

func ConvertRepo added in v0.10.0

func ConvertRepo(taskCtx core.SubTaskContext) error

func ConvertUsers added in v0.6.0

func ConvertUsers(taskCtx core.SubTaskContext) error

func CreateApiClient

func CreateApiClient(taskCtx core.TaskContext) (*helper.ApiAsyncClient, error)

func EnrichPullRequestIssues added in v0.9.0

func EnrichPullRequestIssues(taskCtx core.SubTaskContext) (err error)

func ExtractApiComments added in v0.10.0

func ExtractApiComments(taskCtx core.SubTaskContext) error

func ExtractApiCommitStats added in v0.10.0

func ExtractApiCommitStats(taskCtx core.SubTaskContext) error

func ExtractApiCommits added in v0.10.0

func ExtractApiCommits(taskCtx core.SubTaskContext) error

func ExtractApiEvents added in v0.10.0

func ExtractApiEvents(taskCtx core.SubTaskContext) error

func ExtractApiIssues added in v0.10.0

func ExtractApiIssues(taskCtx core.SubTaskContext) error

func ExtractApiPullRequestCommits added in v0.10.0

func ExtractApiPullRequestCommits(taskCtx core.SubTaskContext) error

func ExtractApiPullRequestReviews added in v0.10.0

func ExtractApiPullRequestReviews(taskCtx core.SubTaskContext) error

func ExtractApiPullRequests added in v0.10.0

func ExtractApiPullRequests(taskCtx core.SubTaskContext) error

func ExtractApiRepositories added in v0.10.0

func ExtractApiRepositories(taskCtx core.SubTaskContext) error

func GetTotalPagesFromResponse added in v0.10.0

func GetTotalPagesFromResponse(res *http.Response, args *helper.ApiCollectorArgs) (int, error)

Types

type ApiRepoResponse added in v0.10.0

type ApiRepoResponse GithubApiRepo

type ApiSingleCommitResponse

type ApiSingleCommitResponse struct {
	Sha   string
	Stats struct {
		Additions int
		Deletions int
	}
	Commit struct {
		Committer struct {
			Name  string
			Email string
			Date  core.Iso8601Time
		}
	}
}

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 GithubApiParams added in v0.10.0

type GithubApiParams struct {
	Owner string
	Repo  string
}

this struct should be moved to `gitub_api_common.go`

type GithubApiPullRequest added in v0.7.0

type GithubApiPullRequest struct {
	GithubId int `json:"id"`
	Number   int
	State    string
	Title    string
	Body     string
	HtmlUrl  string `json:"html_url"`
	Labels   []struct {
		Name string `json:"name"`
	} `json:"labels"`
	Assignee *struct {
		Login string
		Id    int
	}
	User *struct {
		Id    int
		Login string
	}
	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 GithubOptions added in v0.10.0

type GithubOptions struct {
	Tasks []string `json:"tasks,omitempty"`
	Since string
	Owner string
	Repo  string
}

type GithubTaskData added in v0.10.0

type GithubTaskData struct {
	Options   *GithubOptions
	ApiClient *helper.ApiAsyncClient
	Since     *time.Time
	Repo      *models.GithubRepo
}

type IssueComment added in v0.3.0

type IssueComment struct {
	GithubId int `json:"id"`
	Body     string
	User     struct {
		Login string
		Id    int
	}
	IssueUrl        string           `json:"issue_url"`
	GithubCreatedAt core.Iso8601Time `json:"created_at"`
	GithubUpdatedAt core.Iso8601Time `json:"updated_at"`
}

type IssueEvent added in v0.3.0

type IssueEvent struct {
	GithubId int `json:"id"`
	Event    string
	Actor    struct {
		Login string
	}
	Issue struct {
		Id int
	}
	GithubCreatedAt core.Iso8601Time `json:"created_at"`
}

type IssuesResponse

type IssuesResponse struct {
	GithubId    int `json:"id"`
	Number      int
	State       string
	Title       string
	Body        string
	HtmlUrl     string `json:"html_url"`
	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 {
		Id    int
		Name  string
		Email string
		Date  core.Iso8601Time
	}
	Committer struct {
		Name  string
		Email string
		Date  core.Iso8601Time
	}
	Message string
}

type PullRequestReview

type PullRequestReview struct {
	GithubId int `json:"id"`
	User     struct {
		Id    int
		Login string
	}
	Body        string
	State       string
	SubmittedAt core.Iso8601Time `json:"submitted_at"`
}

type SimplePr added in v0.10.0

type SimplePr struct {
	Number   int
	GithubId int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL