MCPcopy
hub / github.com/apache/devlake / CreateRawDataSubTaskArgs

Function CreateRawDataSubTaskArgs

backend/plugins/tapd/tasks/shared.go:157–177  ·  view source on GitHub ↗

CreateRawDataSubTaskArgs creates a new instance of api.RawDataSubTaskArgs based on the provided task context, raw table name, and a flag to determine if the company ID should be used. It returns a pointer to the created api.RawDataSubTaskArgs and a pointer to the filtered TapdTaskData.

(taskCtx plugin.SubTaskContext, rawTable string)

Source from the content-addressed store, hash-verified

155// task context, raw table name, and a flag to determine if the company ID should be used.
156// It returns a pointer to the created api.RawDataSubTaskArgs and a pointer to the filtered TapdTaskData.
157func CreateRawDataSubTaskArgs(taskCtx plugin.SubTaskContext, rawTable string) (*api.RawDataSubTaskArgs, *TapdTaskData) {
158 // Retrieve task data from the provided task context and cast it to TapdTaskData
159 data := taskCtx.GetData().(*TapdTaskData)
160 // Create a filtered copy of the original data
161 filteredData := *data
162 filteredData.Options = &TapdOptions{}
163 *filteredData.Options = *data.Options
164 // Set up TapdApiParams based on the original data
165 var params = TapdApiParams{
166 ConnectionId: data.Options.ConnectionId,
167 WorkspaceId: data.Options.WorkspaceId,
168 }
169 // Create the RawDataSubTaskArgs with the task context, params, and raw table name
170 rawDataSubTaskArgs := &api.RawDataSubTaskArgs{
171 Ctx: taskCtx,
172 Params: params,
173 Table: rawTable,
174 }
175 // Return the created RawDataSubTaskArgs and the filtered TapdTaskData
176 return rawDataSubTaskArgs, &filteredData
177}
178
179// getTapdTypeMappings retrieves story types from _tool_tapd_workitem_types and maps them to
180// typeMapping. It takes TapdTaskData, a Dal interface, and a system string as arguments.

Callers 15

CollectStoryBugsFunction · 0.70
CollectStoryStatusFunction · 0.70
CollectStorysFunction · 0.70
CollectBugsFunction · 0.70
ExtractAccountsFunction · 0.70
ExtractStoriesFunction · 0.70
CollectBugCommitsFunction · 0.70
ConvertTaskChangelogFunction · 0.70
CollectTaskCommitsFunction · 0.70
ExtractStoryBugsFunction · 0.70
ExtractBugStatusFunction · 0.70
ConvertStoryChangelogFunction · 0.70

Calls 1

GetDataMethod · 0.65

Tested by

no test coverage detected