tasks

package
v0.11.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: Apache-2.0 Imports: 21 Imported by: 4

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

func CollectApiComments(taskCtx core.SubTaskContext) error

func CollectApiCommitStats

func CollectApiCommitStats(taskCtx core.SubTaskContext) error

func CollectApiCommits

func CollectApiCommits(taskCtx core.SubTaskContext) error

func CollectApiEvents

func CollectApiEvents(taskCtx core.SubTaskContext) error

func CollectApiIssues

func CollectApiIssues(taskCtx core.SubTaskContext) error

func CollectApiPullRequestCommits

func CollectApiPullRequestCommits(taskCtx core.SubTaskContext) error

func CollectApiPullRequestReviews

func CollectApiPullRequestReviews(taskCtx core.SubTaskContext) error

func CollectApiPullRequests

func CollectApiPullRequests(taskCtx core.SubTaskContext) error

func CollectApiRepositories

func CollectApiRepositories(taskCtx core.SubTaskContext) error

func ConvertCommits

func ConvertCommits(taskCtx core.SubTaskContext) error

func ConvertIssueComments

func ConvertIssueComments(taskCtx core.SubTaskContext) error

func ConvertIssueLabels

func ConvertIssueLabels(taskCtx core.SubTaskContext) error

func ConvertIssues

func ConvertIssues(taskCtx core.SubTaskContext) error

func ConvertPullRequestComments

func ConvertPullRequestComments(taskCtx core.SubTaskContext) error

func ConvertPullRequestCommits

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

func ConvertPullRequestIssues

func ConvertPullRequestIssues(taskCtx core.SubTaskContext) error

func ConvertPullRequestLabels

func ConvertPullRequestLabels(taskCtx core.SubTaskContext) error

func ConvertPullRequests

func ConvertPullRequests(taskCtx core.SubTaskContext) error

func ConvertRepo

func ConvertRepo(taskCtx core.SubTaskContext) error

func ConvertUsers

func ConvertUsers(taskCtx core.SubTaskContext) error

func CreateApiClient

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

func EnrichPullRequestIssues

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

func ExtractApiComments

func ExtractApiComments(taskCtx core.SubTaskContext) error

func ExtractApiCommitStats

func ExtractApiCommitStats(taskCtx core.SubTaskContext) error

func ExtractApiCommits

func ExtractApiCommits(taskCtx core.SubTaskContext) error

func ExtractApiEvents

func ExtractApiEvents(taskCtx core.SubTaskContext) error

func ExtractApiIssues

func ExtractApiIssues(taskCtx core.SubTaskContext) error

func ExtractApiPullRequestCommits

func ExtractApiPullRequestCommits(taskCtx core.SubTaskContext) error

func ExtractApiPullRequestReviews

func ExtractApiPullRequestReviews(taskCtx core.SubTaskContext) error

func ExtractApiPullRequests

func ExtractApiPullRequests(taskCtx core.SubTaskContext) error

func ExtractApiRepositories

func ExtractApiRepositories(taskCtx core.SubTaskContext) error

func GetTotalPagesFromResponse

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

Types

type ApiRepoResponse

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  helper.Iso8601Time
		}
	}
}

type Commit

type Commit struct {
	Author struct {
		Name  string
		Email string
		Date  helper.Iso8601Time
	}
	Committer struct {
		Name  string
		Email string
		Date  helper.Iso8601Time
	}
	Message string
}

type CommitsResponse

type CommitsResponse struct {
	Sha       string `json:"sha"`
	Commit    Commit
	Url       string
	Author    *models.GithubUser
	Committer *models.GithubUser
}

type GithubApiParams

type GithubApiParams struct {
	Owner string
	Repo  string
}

this struct should be moved to `gitub_api_common.go`

type GithubApiPullRequest

type GithubApiPullRequest struct {
	GithubId int `json:"id"`
	Number   int
	State    string
	Title    string
	Body     json.RawMessage
	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        *helper.Iso8601Time `json:"closed_at"`
	MergedAt        *helper.Iso8601Time `json:"merged_at"`
	GithubCreatedAt helper.Iso8601Time  `json:"created_at"`
	GithubUpdatedAt helper.Iso8601Time  `json:"updated_at"`
	MergeCommitSha  string              `json:"merge_commit_sha"`
	Head            struct {
		Ref string
		Sha string
	}
	Base struct {
		Ref string
		Sha string
	}
}

type GithubApiRepo

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   helper.Iso8601Time  `json:"created_at"`
	UpdatedAt   *helper.Iso8601Time `json:"updated_at"`
}

type GithubOptions

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

type GithubTaskData

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

type IssueComment

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

type IssueEvent

type IssueEvent struct {
	GithubId int `json:"id"`
	Event    string
	Actor    struct {
		Login string
	}
	Issue struct {
		Id int
	}
	GithubCreatedAt helper.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
	}
	User *struct {
		Login string
		Id    int
	}
	ClosedAt        *helper.Iso8601Time `json:"closed_at"`
	GithubCreatedAt helper.Iso8601Time  `json:"created_at"`
	GithubUpdatedAt helper.Iso8601Time  `json:"updated_at"`
}

type PrCommitsResponse

type PrCommitsResponse struct {
	Sha    string `json:"sha"`
	Commit PullRequestCommit
	Url    string
}

type PullRequestCommit

type PullRequestCommit struct {
	Author struct {
		Id    int
		Name  string
		Email string
		Date  helper.Iso8601Time
	}
	Committer struct {
		Name  string
		Email string
		Date  helper.Iso8601Time
	}
	Message string
}

type PullRequestReview

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

type SimplePr

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