tasks

package
v0.10.0-test1 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: 15 Imported by: 0

Documentation

Index

Constants

View Source
const RAW_COMMITS_TABLE = "ae_commits"
View Source
const RAW_PROJECT_TABLE = "ae_project"

Variables

View Source
var CollectCommitsMeta = core.SubTaskMeta{
	Name:             "collectCommits",
	EntryPoint:       CollectCommits,
	EnabledByDefault: true,
	Description:      "Collect commit analysis data from AE api",
}
View Source
var CollectProjectMeta = core.SubTaskMeta{
	Name:             "collectProject",
	EntryPoint:       CollectProject,
	EnabledByDefault: true,
	Description:      "Collect analysis project data from AE api",
}
View Source
var ConvertCommitsMeta = core.SubTaskMeta{
	Name:             "convertCommits",
	EntryPoint:       ConvertCommits,
	EnabledByDefault: true,
	Description:      "Update domain layer commits dev_eq field according to ae_commits",
}
View Source
var ExtractCommitsMeta = core.SubTaskMeta{
	Name:             "extractCommits",
	EntryPoint:       ExtractCommits,
	EnabledByDefault: true,
	Description:      "Extract raw commit data into tool layer table ae_commits",
}
View Source
var ExtractProjectMeta = core.SubTaskMeta{
	Name:             "extractProject",
	EntryPoint:       ExtractProject,
	EnabledByDefault: true,
	Description:      "Extract raw project data into tool layer table ae_projects",
}

Functions

func CollectCommits

func CollectCommits(taskCtx core.SubTaskContext) error

func CollectProject

func CollectProject(taskCtx core.SubTaskContext) error

func ConvertCommits added in v0.8.0

func ConvertCommits(taskCtx core.SubTaskContext) error

NOTE: This only works on Commits in the Domain layer. You need to run Github or Gitlab collection and Domain layer enrichemnt first.

func CreateApiClient

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

func ExtractCommits added in v0.10.0

func ExtractCommits(taskCtx core.SubTaskContext) error

func ExtractProject added in v0.10.0

func ExtractProject(taskCtx core.SubTaskContext) error

func RandString added in v0.8.0

func RandString(n int) string

Types

type AeApiCommit added in v0.10.0

type AeApiCommit struct {
	HexSha      string `json:"hexsha"`
	AnalysisId  string `json:"analysis_id"`
	AuthorEmail string `json:"author_email"`
	DevEq       int    `json:"dev_eq"`
}

type AeApiParams added in v0.10.0

type AeApiParams struct {
	ProjectId int
}

type AeOptions added in v0.10.0

type AeOptions struct {
	ProjectId int
	Tasks     []string `json:"tasks,omitempty"`
}

type AeTaskData added in v0.10.0

type AeTaskData struct {
	Options   *AeOptions
	ApiClient *helper.ApiAsyncClient
}

type ApiCommitsResponse added in v0.10.0

type ApiCommitsResponse []AeApiCommit

type ApiProjectResponse

type ApiProjectResponse struct {
	Id           int        `json:"id"`
	GitUrl       string     `json:"git_url"`
	Priority     int        `json:"priority"`
	AECreateTime *time.Time `json:"create_time"`
	AEUpdateTime *time.Time `json:"update_time"`
}

Jump to

Keyboard shortcuts

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