tasks

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0, MIT Imports: 12 Imported by: 1

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",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE},
}
View Source
var CollectProjectMeta = core.SubTaskMeta{
	Name:             "collectProject",
	EntryPoint:       CollectProject,
	EnabledByDefault: true,
	Description:      "Collect analysis project data from AE api",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ConvertCommitsMeta = core.SubTaskMeta{
	Name:             "convertCommits",
	EntryPoint:       ConvertCommits,
	EnabledByDefault: true,
	Description:      "Add domain layer commits dev_eq field according to ae_commits",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE},
}
View Source
var ExtractCommitsMeta = core.SubTaskMeta{
	Name:             "extractCommits",
	EntryPoint:       ExtractCommits,
	EnabledByDefault: true,
	Description:      "Extract raw commit data into tool layer table ae_commits",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE},
}
View Source
var ExtractProjectMeta = core.SubTaskMeta{
	Name:             "extractProject",
	EntryPoint:       ExtractProject,
	EnabledByDefault: true,
	Description:      "Extract raw project data into tool layer table ae_projects",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}

Functions

func CollectCommits

func CollectCommits(taskCtx core.SubTaskContext) errors.Error

func CollectProject

func CollectProject(taskCtx core.SubTaskContext) errors.Error

func ConvertCommits

func ConvertCommits(taskCtx core.SubTaskContext) errors.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, connection *models.AeConnection) (*helper.ApiAsyncClient, errors.Error)

func ExtractCommits

func ExtractCommits(taskCtx core.SubTaskContext) errors.Error

func ExtractProject

func ExtractProject(taskCtx core.SubTaskContext) errors.Error

Types

type AeApiCommit

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

type AeApiParams

type AeApiParams struct {
	ConnectionId uint64 `json:"connectionId"`
	ProjectId    int
}

type AeOptions

type AeOptions struct {
	ConnectionId uint64 `json:"connectionId"`
	ProjectId    int
}

type AeTaskData

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

type ApiCommitsResponse

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